Jump to content

File input/output: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 3,651:
while output = input :s(while)
end</syntaxhighlight>
 
=={{header|Standard ML}}==
{{works with|SML/NJ|110.59}}
<syntaxhighlight lang="sml">fun copyFile (from, to) =
let
val instream = TextIO.openIn from
val outstream = TextIO.openOut to
val () = TextIO.output (outstream, TextIO.inputAll instream)
val () = TextIO.closeIn instream
val () = TextIO.closeOut outstream
in
true
end handle _ => false;</syntaxhighlight>
 
=={{header|SparForte}}==
Line 3,708 ⟶ 3,695:
 
end filecopy;</syntaxhighlight>
 
=={{header|Standard ML}}==
{{works with|SML/NJ|110.59}}
<syntaxhighlight lang="sml">fun copyFile (from, to) =
let
val instream = TextIO.openIn from
val outstream = TextIO.openOut to
val () = TextIO.output (outstream, TextIO.inputAll instream)
val () = TextIO.closeIn instream
val () = TextIO.closeOut outstream
in
true
end handle _ => false;</syntaxhighlight>
 
=={{header|Stata}}==
76

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.