Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/File-input-output/Ring/file-input-output.ring
Normal file
19
Task/File-input-output/Ring/file-input-output.ring
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
fn1 = "ReadMe.txt"
|
||||
fn2 = "ReadMe2.txt"
|
||||
|
||||
fp = fopen(fn1,"r")
|
||||
str = fread(fp, getFileSize(fp))
|
||||
fclose(fp)
|
||||
|
||||
fp = fopen(fn2,"w")
|
||||
fwrite(fp, str)
|
||||
fclose(fp)
|
||||
see "OK" + nl
|
||||
|
||||
func getFileSize fp
|
||||
c_filestart = 0
|
||||
c_fileend = 2
|
||||
fseek(fp,0,c_fileend)
|
||||
nfilesize = ftell(fp)
|
||||
fseek(fp,0,c_filestart)
|
||||
return nfilesize
|
||||
Loading…
Add table
Add a link
Reference in a new issue