Truncate a file: Difference between revisions

m (→‎{{header|Wren}}: Minor tidy)
 
Line 639:
0</syntaxhighlight>
 
=={{header|Forth}}==
<syntaxhighlight lang="forth">
: truncate-file ( fname fnamelen fsize -- )
0 2swap r/w open-file throw
dup >r resize-file throw
r> close-file throw ;
</syntaxhighlight>
=={{header|Fortran}}==
Fortran offers no access to any facilities the file system may offer for truncating a disc file via standard language features, thus in the absence of special routines or deviant compilers that do, you're stuck.
Line 699 ⟶ 706:
CALL FILEHACK("foobar.txt",12)
END</syntaxhighlight>
 
 
=={{header|FreeBASIC}}==
1

edit