[Gambas-user] operator precedence

Benoît Minisini gambas at ...1...
Thu Mar 26 13:41:35 CET 2009


> hi
> something is changed lately (gambas2-1916)?
>
> ' Gambas module file
>
> PUBLIC SUB Main()
>
> DIM a AS Integer = 1
> DIM b AS Integer = 2
> DIM r AS Integer
>
> r = TRUE
> PRINT NOT a, r
> r = a > b
> PRINT r
> r = NOT a > b
> PRINT r
> r = NOT (a > b)
> PRINT r
>
> END
>
> seems the not operator comes before the > evaluation...
> is there a reference in the docs?
>
> thanks
>

Nothing changed for a while. The NOT operator was always stronger than '>'.

I have updated the documentation wiki with a page about "Operator Evaluation 
Order".

Regards,

-- 
Benoît





More information about the User mailing list