From: Doni Pracner Date: Wed, 12 Feb 2014 11:50:45 +0000 (+0100) Subject: polinoml - Puta, memorija X-Git-Tag: v14a~8^2~11 X-Git-Url: https://svarog.pmf.uns.ac.rs/gitweb/?a=commitdiff_plain;h=bffae2605e62e461b1e0e2faf10389799f9eb74c;p=spa1skripta-public.git polinoml - Puta, memorija --- diff --git a/kodovi/polinomi/POLINOML.MOD b/kodovi/polinomi/POLINOML.MOD index 74af962..20e64ea 100644 --- a/kodovi/polinomi/POLINOML.MOD +++ b/kodovi/polinomi/POLINOML.MOD @@ -273,7 +273,7 @@ END MonomPuta; PROCEDURE Puta(p1, p2: Polinom; VAR pr: Polinom); VAR - pomocni: Polinom; + pomocni, brisi: Polinom; BEGIN Anuliraj(pr); IF (p1 <> NIL) AND (p2 <> NIL) THEN @@ -283,7 +283,9 @@ BEGIN MonomPuta(p1, p2, pomocni); REPEAT UbaciMonom(pomocni, pr); + brisi := pomocni; pomocni := pomocni^.veza + DISPOSE(brisi); UNTIL pomocni = NIL; p2 := p2^.veza END