Re: Possible bug?

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu