Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/File-input-output/Lang/file-input-output-1.lang
Normal file
12
Task/File-input-output/Lang/file-input-output-1.lang
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# Load the IO module
|
||||
# Replace "<pathToIO.lm>" with the location where the io.lm Lang module was installed to without "<" and ">"
|
||||
ln.loadModule(<pathToIO.lm>)
|
||||
|
||||
$fileIn = [[io]]::fp.openFile(input.txt)
|
||||
$fileOut = [[io]]::fp.openFile(output.txt)
|
||||
|
||||
$text = [[io]]::fp.readFile($fileIn)
|
||||
[[io]]::fp.writeFile($fileOut, $text)
|
||||
|
||||
[[io]]::fp.closeFile($fileIn)
|
||||
[[io]]::fp.closeFile($fileOut)
|
||||
12
Task/File-input-output/Lang/file-input-output-2.lang
Normal file
12
Task/File-input-output/Lang/file-input-output-2.lang
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# Load the IO module
|
||||
# Replace "<pathToIO.lm>" with the location where the io.lm Lang module was installed to without "<" and ">"
|
||||
ln.loadModule(<pathToIO.lm>)
|
||||
|
||||
$fileIn = [[io]]::fp.openFile(input.txt)
|
||||
$fileOut = [[io]]::fp.openFile(output.txt)
|
||||
|
||||
$bytes = [[io]]::fp.readBytes($fileIn)
|
||||
[[io]]::fp.writeBytes($fileOut, $bytes)
|
||||
|
||||
[[io]]::fp.closeFile($fileIn)
|
||||
[[io]]::fp.closeFile($fileOut)
|
||||
Loading…
Add table
Add a link
Reference in a new issue