Jump to content

Truncate a file: Difference between revisions

m
→‎{{header|REXX}}: adjusted the truncation to the true value.
m (→‎{{header|REXX}}: added/changed whitespace and comments, simplified the program by not using a DO loop to read in one byte at a time; the program will need changing and testing to see if a modified version will run with ooRexx.)
m (→‎{{header|REXX}}: adjusted the truncation to the true value.)
Line 742:
'ERASE' FID /*invoke a command to delete the file */
call lineout FID /*close the file, maybe for REXX's use.*/
call charout FID, left(_,siz), 1 /*write a truncated version of the file*/
call lineout FID /*close the file used, just to be safe.*/
say 'file ' FID " truncated to " siz 'bytes.' /*display some info*/
Cookies help us deliver our services. By using our services, you agree to our use of cookies.