gitweb on Svarog
projekti pod git sistemom za održavanje verzija -- projects under the git version control system
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aa1ba67)
raw | patch | inline | side by side (parent: aa1ba67)
author | Doni Pracner <quinnuendo@gmail.com> | |
Wed, 12 Feb 2014 11:06:44 +0000 (12:06 +0100) | ||
committer | Doni Pracner <quinnuendo@gmail.com> | |
Wed, 12 Feb 2014 11:06:44 +0000 (12:06 +0100) |
kodovi/polinomi/POLINOML.MOD | patch | blob | history |
index 6de51656eb818843353f71ae0033a74ea219b60c..4bc9ce6c47112853c616db8d0e5d4dfa2d52e311 100644 (file)
prethodni := cilj;\r
cilj := cilj^.veza;\r
END;\r
- IF cilj = NIL THEN\r
- IF k#0.0 THEN\r
+ (* da li upisujemo vrednost ili sklanjamo clan *)\r
+ IF k#0.0 THEN\r
+ (* da li menjamo clan ili pravimo novi *)\r
+ IF (cilj # NIL) AND (cilj^.st = st) THEN\r
+ cilj^.k:=k;\r
+ ELSE\r
NEW(cilj);\r
cilj^.k := k;\r
cilj^.st := st;\r
cilj^.veza := NIL;\r
IF p = NIL THEN\r
p := cilj;\r
+ ELSIF prethodni = NIL THEN\r
+ cilj^.veza := p^.veza;\r
+ p := cilj;\r
ELSE\r
+ cilj^.veza := prethodni^.veza;\r
prethodni^.veza := cilj;\r
END;\r
END;\r
- ELSIF cilj^.st=st THEN\r
- IF k # 0.0 THEN\r
- cilj^.k:=k;\r
- ELSE\r
+ ELSE\r
+ (* da li postoji ovakav clan *)\r
+ IF (cilj # NIL) AND (cilj^.st = st) THEN\r
IF p = cilj THEN\r
p := p^.veza;\r
ELSE\r
prethodni^.veza:= prethodni^.veza^.veza;\r
END;\r
- DISPOSE(cilj);\r
- END;\r
- ELSE\r
- IF k # 0.0 THEN\r
- NEW(cilj);\r
- cilj^.k := k;\r
- cilj^.st := st;\r
- cilj^.veza := prethodni^.veza;\r
- prethodni^.veza := cilj;\r
+ DISPOSE(cilj); \r
END;\r
END;\r
END PostaviClan;\r