PDA

View Full Version : How to load file content manually.


kornalius
01-09-2007, 03:56 PM
Here is how to load file content manually byte by byte if you want to:</p>

SDIM(buf$, TBYTE, 4096);
f$ = fopen(&quot;c:\\ge.1&quot;, &quot;r&quot;);
x$ = 0;
repeat
r$=fread(&amp;buf$ + x$, 1, 10, f$);
x$ = x$ + r$;
until (r$ &lt; 10);
fclose(f$);
ShowMessage(buf$); </p>

This here reads 10 bytes at the time.</p>