Verify the size of a file called     input.txt     for a file in the current working directory, and another one in the file system root.




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
]