langs a-z
This commit is contained in:
parent
db842d013d
commit
d066446780
11389 changed files with 98361 additions and 1020 deletions
1
Task/File-IO/PureBasic/file-io-1.purebasic
Normal file
1
Task/File-IO/PureBasic/file-io-1.purebasic
Normal file
|
|
@ -0,0 +1 @@
|
|||
CopyFile("input.txt","output.txt")
|
||||
13
Task/File-IO/PureBasic/file-io-2.purebasic
Normal file
13
Task/File-IO/PureBasic/file-io-2.purebasic
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
in = ReadFile(#PB_Any,"input.txt")
|
||||
If in
|
||||
out = CreateFile(#PB_Any,"output.txt")
|
||||
If out
|
||||
Define MyLine$
|
||||
While Not Eof(in)
|
||||
MyLine$ = ReadString(in)
|
||||
WriteString(out,MyLine$)
|
||||
Wend
|
||||
CloseFile(out)
|
||||
EndIf
|
||||
CloseFile(in)
|
||||
EndIf
|
||||
14
Task/File-IO/PureBasic/file-io-3.purebasic
Normal file
14
Task/File-IO/PureBasic/file-io-3.purebasic
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