Skip to content

Instantly share code, notes, and snippets.

@lievencardoen
Created February 6, 2023 16:05
Show Gist options
  • Save lievencardoen/fc2807fcbe09428e78b7d69ca342ec2c to your computer and use it in GitHub Desktop.
Save lievencardoen/fc2807fcbe09428e78b7d69ca342ec2c to your computer and use it in GitHub Desktop.
Read contents of a file. Will read the last line into ContentsFile.
DEFINE VARIABLE ContentsFile AS CHARACTER NO-UNDO.
INPUT FROM VALUE(SESSION:TEMP-DIRECTORY + "/test.txt":U).
DO WHILE TRUE ON ENDKEY UNDO, LEAVE:
IMPORT UNFORMATTED ContentsFile.
END.
INPUT CLOSE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment