GT.M File Reading

Home

The following snippet shows how to read an OS file and display it on the current device. More data at this link.

showlines(filename) ;
 N io
 ;
 S io=$Io
 O filename:READONLY U filename
 F  R line Q:$Zeof  U io W line,! U filename
 U io C filename
 ;
 Q