String filename, text
Number fileID, nr
If (!OpenDialog(NULL, "Text file", GetApplicationDirectory(2,0) + "Test writ.ppt", filename)) Exit(0)
fileID = OpenFileForReadingAndWriting(filename)
ReadFile(fileID, fileID.GetFileSize())
Result("\n File size (bytes): " + fileID.GetFileSize() )
WriteFile(fileID, "\n Test to add something")
CloseFile(fileID)