suppose I have this code
Code: Select all
dim as zstring ptr buffer = allocate(10000)
I tried
Code: Select all
open "testfile" for binary access read as 1 len=lof(1)
get #1,1,*buffer,10000
close 1
Code: Select all
dim as zstring ptr buffer = allocate(10000)
Code: Select all
open "testfile" for binary access read as 1 len=lof(1)
get #1,1,*buffer,10000
close 1
Code: Select all
dim as long fl
open "testfile" for binary access read as 1
fl=lof(1)
dim as ubyte buffer(fl)
get #1,,buffer()
close 1
dim as zstring ptr s=@buffer(0)
print *s
close
Code: Select all
dim as long fl
open "testfile" for binary access read as 1
fl=lof(1)
dim as string s=string(fl,0)
get #1,,s
close 1
print s
close
Code: Select all
dim as integer fnum
dim as string buffer
fnum = freefile()
if open ("myfilename", for input, as #fnum) <>0 then
? "can't open file"
end
endif
buffer = input(lof(fnum), fnum)
close fnum
? buffer