A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
16
Task/File-size/Modula-3/file-size.mod3
Normal file
16
Task/File-size/Modula-3/file-size.mod3
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
MODULE FSize EXPORTS Main;
|
||||
|
||||
IMPORT IO, Fmt, FS, File, OSError;
|
||||
|
||||
VAR fstat: File.Status;
|
||||
|
||||
BEGIN
|
||||
TRY
|
||||
fstat := FS.Status("input.txt");
|
||||
IO.Put("Size of input.txt: " & Fmt.LongInt(fstat.size) & "\n");
|
||||
fstat := FS.Status("/input.txt");
|
||||
IO.Put("Size of /input.txt: " & Fmt.LongInt(fstat.size) & "\n");
|
||||
EXCEPT
|
||||
| OSError.E => IO.Put("ERROR: Could not get file status.\n");
|
||||
END;
|
||||
END FSize.
|
||||
Loading…
Add table
Add a link
Reference in a new issue