Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
14
Task/File-input-output/PureBasic/file-input-output-3.basic
Normal file
14
Task/File-input-output/PureBasic/file-input-output-3.basic
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
If ReadFile(0,"input.txt")
|
||||
Define MyLine$, *Buffer, length
|
||||
length=FileSize("input.txt")
|
||||
*Buffer = AllocateMemory(length)
|
||||
If *Buffer
|
||||
If OpenFile(1,"output.txt")
|
||||
ReadData(0, *Buffer, length)
|
||||
WriteData(1, *Buffer, length)
|
||||
CloseFile(1)
|
||||
EndIf
|
||||
FreeMemory(*Buffer)
|
||||
EndIf
|
||||
CloseFile(0)
|
||||
EndIf
|
||||
Loading…
Add table
Add a link
Reference in a new issue