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.




$INCLUDE "rapidq.inc"
 
DIM file AS QFileStream
 
FUNCTION fileSize(name$) AS Integer
    file.Open(name$, fmOpenRead)
    Result = file.Size
    file.Close
END FUNCTION
 
PRINT "Size of input.txt is "; fileSize("input.txt")
PRINT "Size of \input.txt is "; fileSize("\input.txt")