Re: Possible bug?
- Posted by Robert Craig <rds at RapidEuphoria.com> Sep 01, 2004
- 532 views
Hayden McKay wrote: > Lataly I was sick of my Specific_Drive_Info() routine from dosint.zip not > picking up my SCSI drive so I took a closer look. I tried to get floppy > infomation and found that it was always returning int 255. > > I had: > }}} <eucode> > if not registers[REG_AX] = #0FF then > get the info.... > else > return #0FF > </eucode> {{{ > I changed it to > }}} <eucode> > if registers[REG_AX] != #0FF > </eucode> {{{ > and it worked. The precedence of "not" is higher than the precedence of "=". So
if not registers[REG_AX] = #0FF then
is equivalent to:
if (not registers[REG_AX]) = #0FF then
which is always going to be false. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com