A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
12
Task/File-size/Clean/file-size.clean
Normal file
12
Task/File-size/Clean/file-size.clean
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import StdEnv
|
||||
|
||||
fileSize fileName world
|
||||
# (ok, file, world) = fopen fileName FReadData world
|
||||
| not ok = abort "Cannot open file"
|
||||
# (ok, file) = fseek file 0 FSeekEnd
|
||||
| not ok = abort "Cannot seek file"
|
||||
# (size, file) = fposition file
|
||||
(_, world) = fclose file world
|
||||
= (size, world)
|
||||
|
||||
Start world = fileSize "input.txt" world
|
||||
Loading…
Add table
Add a link
Reference in a new issue