16 lines
375 B
Plaintext
16 lines
375 B
Plaintext
proc ShowSize(FileName);
|
|
char FileName; int Size, C;
|
|
[Trap(false); \disable abort on error
|
|
FSet(FOpen(FileName, 0), ^i);
|
|
Size:= 0;
|
|
repeat C:= ChIn(3); \reads 2 EOFs before
|
|
Size:= Size+1; \ read beyond end-of-file
|
|
until GetErr; \ is detected
|
|
IntOut(0, Size-2);
|
|
CrLf(0);
|
|
];
|
|
|
|
[ShowSize("input.txt");
|
|
ShowSize("/input.txt"); \root under Linux
|
|
]
|