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: 0395d88)
raw | patch | inline | side by side (parent: 0395d88)
author | Doni Pracner <quinnuendo@gmail.com> | |
Sat, 15 Feb 2014 17:55:23 +0000 (18:55 +0100) | ||
committer | Doni Pracner <quinnuendo@gmail.com> | |
Sat, 15 Feb 2014 17:55:23 +0000 (18:55 +0100) |
kodovi/fajlovi/ispis.mod | [new file with mode: 0644] | patch | blob |
diff --git a/kodovi/fajlovi/ispis.mod b/kodovi/fajlovi/ispis.mod
--- /dev/null
+++ b/kodovi/fajlovi/ispis.mod
@@ -0,0 +1,31 @@
+MODULE ispis;
+FROM FIO IMPORT File, Exists, Open, Close, EOF, RdStr;
+FROM InOut IMPORT WriteString, WriteLn, ReadString;
+
+PROCEDURE ispisF(ime: ARRAY OF CHAR);
+VAR
+ f:File;
+ s : ARRAY[1..100] OF CHAR;
+BEGIN
+ IF Exists(ime) THEN
+ f:=Open(ime);
+ EOF := FALSE;
+ WHILE NOT EOF DO
+ RdStr(f,s);
+ WriteString(s);
+ WriteLn;
+ END;
+ Close(f);
+ ELSE
+ WriteString("-- fajl ne postoji --");
+ WriteLn;
+ END;
+END ispisF;
+
+VAR
+ ime: ARRAY[1..100] OF CHAR;
+BEGIN
+ WriteString("unesite ime fajla:");
+ ReadString(ime);
+ ispisF(ime);
+END ispis.