File input/output: Difference between revisions
Content added Content deleted
No edit summary |
(Add lang example) |
||
Line 2,557: | Line 2,557: | ||
{{VI snippet}}<br/> |
{{VI snippet}}<br/> |
||
[[File:LabVIEW File IO.png]] |
[[File:LabVIEW File IO.png]] |
||
=={{header|Lang}}== |
|||
Currently this task is only possible by using Standard Lang and the Lang IO Module. |
|||
<syntaxhighlight lang="lang"> |
|||
# 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) |
|||
</syntaxhighlight> |
|||
=={{header|Lang5}}== |
=={{header|Lang5}}== |