RosettaCodeData/Task/File-input-output/Oforth/file-input-output-1.oforth

8 lines
210 B
Text
Raw Permalink Normal View History

2016-12-05 23:44:36 +01:00
: fcopy(in, out)
| f g |
File newMode(in, File.BINARY) dup open(File.READ) ->f
File newMode(out, File.BINARY) dup open(File.WRITE) ->g
while(f >> dup notNull) [ g addChar ] drop
f close g close ;