RosettaCodeData/Task/File-size/BaCon/file-size.bacon

13 lines
319 B
Plaintext

' file size
' Return the entire message, FILELEN returns a NUMBER
FUNCTION printlen$(STRING name$)
IF FILEEXISTS(name$) THEN
RETURN name$ & ": " & STR$(FILELEN(name$))
ELSE
RETURN "file " & name$ & " not found"
END IF
END FUNCTION
PRINT printlen$("input.txt")
PRINT printlen$("/input.txt")