[ milos04 @ 27.12.2009. 11:29 ] @
iz datoteke treba ocitati drzavu, pdv, carinsku stopu i cenu. kako da ucitam sve to ul lancanu listu? ja sam probao ovako, ali nece ![]() Code: program citanje; Type automobil = record drzava: string[30]; PDV: double; cs: double; cena: double; end; listpok = ^listzapis; listzapis = record zap: automobil; next: listpok; end; var f: file of automobil; glava, novi, posl,pok:listpok; podat: listzapis; unos:integer; begin assign(f, 'dz5.dat'); reset(f); posl:=nil; glava:=nil; while not eof(f) do begin read (f, podat); new(novi); novi^.next = nil; novi^.zap =podat.zap; if glava = nil then glava:= novi else posl^.next := novi; posl :=novi end; close(f); end. |