Hello All,
I am a little confused as to why the following code loops for what seems to be forever. The DO UNTIL loop should bail out once the end of the file has been reached but I'm guessing the GET$ function resets this. Can someone please shed some light on this.
------------------
Cheers
I am a little confused as to why the following code loops for what seems to be forever. The DO UNTIL loop should bail out once the end of the file has been reached but I'm guessing the GET$ function resets this. Can someone please shed some light on this.
Code:
#compile exe function pbmain as long dim Opcode as word dim Length as word dim Buffer as string rem open/create data file open"records.dat" for binary as #1 do until eof(1) 'detect end of file get #1,,Opcode 'read record opcode get #1,,Length 'read record length get$ #1,Length,Buffer 'read record data loop close #1 msgbox"done." end function
Cheers
Comment