File input/output: Difference between revisions
Content added Content deleted
(→{{header|Kotlin}}: Updated example see https://github.com/dkandalov/rosettacode-kotlin for details) |
No edit summary |
||
Line 1,120: | Line 1,120: | ||
w.close[] |
w.close[] |
||
</lang> |
</lang> |
||
=={{header|Gambas}}== |
|||
<lang gambas>Public Sub Main() |
|||
Dim sOutput As String = "Hello " |
|||
Dim sInput As String = File.Load(User.Home &/ "input.txt") 'Has the word 'World!' stored |
|||
File.Save(User.Home &/ "output.txt", sOutput) |
|||
File.Save(User.Home &/ "input.txt", sOutput & sInput) |
|||
Print "'input.txt' contains - " & sOutput & sInput |
|||
Print "'output.txt' contains - " & sOutput |
|||
End</lang> |
|||
Output: |
|||
<pre> |
|||
'input.txt' contains - Hello World! |
|||
'output.txt' contains - Hello |
|||
</pre> |
|||
=={{header|GAP}}== |
=={{header|GAP}}== |