1. Re: I Need Help - BUG REPORT!
- Posted by Michael Bolin <michaeltom at GEOCITIES.COM> Jun 19, 1997
- 619 views
- Last edited Jun 20, 1997
> > -- modulo congruence test > > x = remainder(3,7) > > printf(1,"\nmodulo test 1\n %s for 3mod7=%d\n",{bool[x=3],x}) > > Why do you assign x=3? > "bool" has only a length of 2, and second you can't assign > there (it's not like C). This command doesn't attempt to assign x=3. The equals sign is not only an assignment operator, it is also a comparison operator. Try this: atom x x=5 ?x=6 ?x=5 The first will print zero (false), because x is NOT equal to 6. The next one will print one (true), because x IS equal to 5. It is completely legal to use comparison operators in an expression this way. Regards, Michael Bolin