Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //zameniti deo za uvoz i deklaracije
- FROM FIO IMPORT Open, Create, RdStr, EOF, File, Close, WrStr, WrLn;
- FROM InOut IMPORT WriteString, WriteLn, ReadString, Read;
- FROM Storage IMPORT ALLOCATE, DEALLOCATE;
- FROM Str IMPORT Compare;
- TYPE
- STRING = ARRAY [1..20] OF CHAR;
- pok = POINTER TO Slog;
- Slog = RECORD
- kinf : STRING;
- veza : pok
- END;
- VAR
- lista : pok;
- f : File;
- string1, string2, tacka, string3, ucitaj : STRING;
- nalaziseulisti, jestetacka, again, pro : BOOLEAN;
- odabir : CHAR;
- //ubaciti na pocetak;
- WriteString('Da li postoji fajl iz kojeg zelite da ucitate imena? (d/n) ');
- again := FALSE;
- REPEAT
- Read(odabir);
- IF again THEN
- WriteString('Unesite opet, unos mora biti (d/n) : ');
- WriteLn;
- END;
- WriteLn;
- again := TRUE;
- UNTIL (CAP(odabir) = 'D') OR (CAP(odabir) = 'N');
- IF CAP(odabir) = 'N' THEN
- tacka := '.';
- f := Create('imena.txt'); (*ime fajla koji ce se kreirati, *)
- (*a u kasnijem delu programa koristiti*)
- WriteString('Unosite imena, sa "." se unos zavrsava');
- WriteLn;
- ReadString(ucitaj);
- WriteLn;
- IF Compare(ucitaj,tacka) = 0 THEN
- pro := TRUE;
- END;
- WHILE NOT pro DO
- WrStr(f,ucitaj);
- WrLn(f);
- ReadString(ucitaj);
- IF Compare(ucitaj,tacka) = 0 THEN
- pro := TRUE;
- END
- END;
- Close(f);
- END; (*proveriti zasto puca exeption, i zasto preskace komandu za citanje*)
- //ReadString(***);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement