Read entire file: Difference between revisions
Content deleted Content added
m →{{header|OCaml}}: typo |
typo |
||
Line 228:
There is no problem reading an entire file with the function <code>really_input</code> because this function is implemented appropriately with an internal loop, but it can only load files which size is equal or inferior to the maximum length of an ocaml string. This maximum size is available with the variable <code>Sys.max_string_length</code>. On 32 bit machines this size is about 16Mo.
To load bigger files several solutions exist, for example create a structure that contains several strings where the contents of the file can be split. Or
<lang ocaml>type big_string =
|