RosettaCodeData/Task/Secure-temporary-file/FreeBASIC/secure-temporary-file.basic

18 lines
278 B
Plaintext

Dim As Long f
Dim As String message
f = Freefile
Open "temp.txt" For Output As #f
If Err > 0 Then Print "Failed to open temp"; f : End
Print #f, "Hello world!"
Close #f
Open "temp.txt" For Input As #f
Line Input #f, message
Close #f
Print message
Shell "del temp.txt"
Sleep