[Gambas-user] Logical operators

Benoît Minisini gambas at ...1...
Thu Apr 23 19:07:31 CEST 2009


> If I write:
>
> IF expr1 OR expr2 THEN
>
> If expr1 evaluates to TRUE does the OR return TRUE or does it still go
> on to evaluate expr2?
>

Operators always evaluate all their operands.

But you can use the syntax IF expr1 OR IF expr2 THEN to evaluate <expr2> only 
if <expr1> is false.

Regards,

-- 
Benoît




More information about the User mailing list