Data update
This commit is contained in:
parent
4d5544505c
commit
4924dd0264
3073 changed files with 55820 additions and 4408 deletions
1
Task/Write-entire-file/ArkScript/write-entire-file.ark
Normal file
1
Task/Write-entire-file/ArkScript/write-entire-file.ark
Normal file
|
|
@ -0,0 +1 @@
|
|||
(io:writeFile "output.txt" "hello, world!")
|
||||
|
|
@ -1,3 +1 @@
|
|||
w = new Writer["test.txt"]
|
||||
w.print["I am the captain now."]
|
||||
w.close[]
|
||||
w = new Writer["test.txt"].printAndClose["I am the captain now."]
|
||||
|
|
|
|||
|
|
@ -2,10 +2,19 @@ package main
|
|||
|
||||
import "core:fmt"
|
||||
import "core:os"
|
||||
import "core:c/libc"
|
||||
|
||||
|
||||
main :: proc() {
|
||||
|
||||
dummy := "henlo"
|
||||
succ:= os.write_entire_file("file",transmute([]u8)(dummy),false)
|
||||
dummy := "This is a string."
|
||||
write := os.write_entire_file("file",transmute([]u8)(dummy),false)
|
||||
|
||||
// Returns an error
|
||||
write2 := os.write_entire_file_or_err("file2",transmute([]u8)(dummy),false)
|
||||
|
||||
// If error than do something
|
||||
if (write2!=nil){
|
||||
fmt.println("err")
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
1
Task/Write-entire-file/R/write-entire-file.r
Normal file
1
Task/Write-entire-file/R/write-entire-file.r
Normal file
|
|
@ -0,0 +1 @@
|
|||
writeLines(text="This is a string.", con="file.txt")
|
||||
Loading…
Add table
Add a link
Reference in a new issue