gitweb on Svarog

projekti pod git sistemom za održavanje verzija -- projects under the git version control system
Ispis.mod dodat
authorDoni Pracner <quinnuendo@gmail.com>
Sat, 15 Feb 2014 17:55:23 +0000 (18:55 +0100)
committerDoni Pracner <quinnuendo@gmail.com>
Sat, 15 Feb 2014 17:55:23 +0000 (18:55 +0100)
kodovi/fajlovi/ispis.mod [new file with mode: 0644]

diff --git a/kodovi/fajlovi/ispis.mod b/kodovi/fajlovi/ispis.mod
new file mode 100644 (file)
index 0000000..6b897e4
--- /dev/null
@@ -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.
Svarog.pmf.uns.ac.rs/gitweb maintanance Doni Pracner