File size: Difference between revisions

m
OCaml: update links
(Omitted EasyLang)
m (OCaml: update links)
Line 1,139:
printFileSize "/input.txt" ;;</syntaxhighlight>
 
For files greater than Pervasives.max_int, one can use the module [httphttps://camlocaml.inria.fr/pub/docs/manual-ocamlorg/librefapi/PervasivesStdlib.LargeFile.html PervasivesStdlib.LargeFile]:
<syntaxhighlight lang="ocaml">let printLargeFileSize filename =
let ic = open_in filename in
Line 1,151:
Printf.printf "%d\n" (stat "/input.txt").st_size ;;</syntaxhighlight>
 
The module Unix has also a [httphttps://camlocaml.inria.fr/pub/docs/manual-ocamlorg/librefapi/Unix.LargeFile.html LargeFile sub-module].
 
=={{header|Oforth}}==
559

edits