1 Jun 2012 01:01
Re: Mac bug: Maybe BINARY ACCESS READ rather than LOF is the culprit?
James Paige <Bob <at> HamsterRepublic.com>
2012-05-31 23:01:39 GMT
2012-05-31 23:01:39 GMT
On Thu, May 31, 2012 at 11:23:40AM -0700, James Paige wrote: > On Thu, May 31, 2012 at 09:46:46AM -0700, James Paige wrote: > > On Thu, May 31, 2012 at 09:34:19AM -0700, James Paige wrote: > > > On Mon, May 21, 2012 at 03:23:39PM -0700, James Paige wrote: > > > > I was messing around with trying to make a simplified test case for the > > > > LOF bug. I never did figure out exactly what to type to compile a simple > > > > .bas file, but I discovered it was easy to just add another compile > > > > target to SConscript using relump and unlump as my model. > > > > > > > > I couldn't reproduce any oddness with LOF, but I did discover some > > > > peculiar behavior when a file is opened BINARY ACCESS READ > > > > > > > > The following code works perfectly on Linux, but on Mac, it fails to > > > > read anything at all from the first two files. The third and fourth file > > > > work fine. > > > > > > > > If you change > > > > - OPEN filename FOR BINARY ACCESS READ AS #fh > > > > + OPEN filename FOR BINARY AS #fh > > > > Then the code works perfectly on Mac. > > > > > > > > ------------------------------------------------------ > > > > > > > > SUB test(filename as string) > > > > DIM size as integer > > > > DIM chunk as string = STRING(10, 0) > > > > > > > > DIM fh as integer = FREEFILE > > > > > > > > OPEN filename FOR BINARY ACCESS READ AS #fh(Continue reading)
RSS Feed