Truncate a file: Difference between revisions

(→‎{{header|Fortran}}: I wonder how general this would be...)
Line 662:
<lang ocaml>val ftruncate : file_descr -> int -> unit
(** Truncates the file corresponding to the given descriptor to the given size. *)</lang>
 
=={{header|PARI/GP}}==
 
Create a file /tmp/test.file and truncate to 20 bytes: (Linux only)
<lang parigp>install("truncate", "isL", "trunc")
 
trunc("/tmp/test.file", 20)</lang>
 
=={{header|Pascal}}==
Anonymous user