From: Doni Pracner Date: Wed, 12 Feb 2014 11:46:24 +0000 (+0100) Subject: polinoml - poliNaN memorija X-Git-Tag: v14a~8^2~12 X-Git-Url: https://svarog.pmf.uns.ac.rs/gitweb/?a=commitdiff_plain;h=391e0a12d2593ab45a8a0ab56daab8858f922f1d;p=spa1skripta-public.git polinoml - poliNaN memorija --- diff --git a/kodovi/polinomi/POLINOML.MOD b/kodovi/polinomi/POLINOML.MOD index 1f53f28..74af962 100644 --- a/kodovi/polinomi/POLINOML.MOD +++ b/kodovi/polinomi/POLINOML.MOD @@ -327,18 +327,19 @@ PROCEDURE PolinomNaN(p: Polinom; n: CARDINAL; VAR rez: Polinom); VAR i: CARDINAL; + pret : Polinom; BEGIN IF n = 0 THEN NEW(rez); rez^.k := 1.0; rez^.st := 0; rez^.veza := NIL; - ELSIF n = 1 THEN - Kopiraj( p, rez ); ELSE - rez := p; + Kopiraj( p, rez ); FOR i := 2 TO n DO - Puta(rez, p, rez) + pret := rez; + Puta(pret, p, rez); + DisposePolinom(pret); END END; END PolinomNaN;