Secure temporary file: Difference between revisions
Secure temporary file in FreeBASIC
No edit summary |
(Secure temporary file in FreeBASIC) |
||
Line 29:
end Temp_File;</syntaxhighlight>
=={{header|
==={{header|BBC BASIC}}===
{{works with|BBC BASIC for Windows}}
The file is automatically deleted when closed.
Line 63 ⟶ 64:
Hello world!
</pre>
==={{header|FreeBASIC}}===
{{trans|BBC BASIC}}
The file is deleted when closed.
<syntaxhighlight lang="vb">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</syntaxhighlight>
=={{header|C}}==
|