This example shows how to create a file with meta commands and read strings and numbers from the file.
When you run this example then a file named furniture.rtf will be written in the examples/file/output.
"File write example" "lib/modules/standard.whl" "lib/modules/file.whl" proc main() if fileExists("furniture.rtf") printS("The file exists and has a size of:") printN(fileSize("furniture.rtf")) printS("bytes") fileDelete("furniture.rtf") end number handle = fileOpenWrite("furniture.rtf") fileWriteNumber(handle, 1) fileWriteString(handle, "Chair") fileWriteNumber(handle, 2) fileWriteString(handle, "Table") fileWriteNumber(handle, 3) fileWriteString(handle, "Cupboard") end