Loading and saving whole files are essentially 3-step processes, but I think it's still useful to have them as one-liners, since this will meet the majority of file i/o needs.
uses corewin
function LoadFile(string name, any*data, int e)
===============================================
sys f
f=fopen name,"r" 'open for reading
e=fread @data,1,e,f 'load data
fclose f 'close file
return e
end function
function SaveFile(string name, any*data, int e)
===============================================
sys f
f=fopen name,"w" 'open for writing
e=fwrite @data,1,e,f 'save data
fclose f 'close file
return e
end function
'TEST
=====
float v[100],w[100]
for i=1 to 100 : v[i]=i*1.5 : next
SaveFile "t.bin",v,bytesof v
LoadFile "t.bin",w,bytesof v
print w[51] '76.5