Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
16
Task/Write-entire-file/PureBasic/write-entire-file.basic
Normal file
16
Task/Write-entire-file/PureBasic/write-entire-file.basic
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
EnableExplicit
|
||||
|
||||
Define fOutput$ = "output.txt" ; enter path of file to create or overwrite
|
||||
Define str$ = "This string is to be written to the file"
|
||||
|
||||
If OpenConsole()
|
||||
If CreateFile(0, fOutput$)
|
||||
WriteString(0, str$)
|
||||
CloseFile(0)
|
||||
Else
|
||||
PrintN("Error creating or opening output file")
|
||||
EndIf
|
||||
PrintN("Press any key to close the console")
|
||||
Repeat: Delay(10) : Until Inkey() <> ""
|
||||
CloseConsole()
|
||||
EndIf
|
||||
Loading…
Add table
Add a link
Reference in a new issue