[Gambas-user] stupid question about INC and boolean

Benoit Minisini gambas at ...1...
Sat Apr 12 19:05:21 CEST 2008


On samedi 12 avril 2008, Stefano Palmeri wrote:
> PUBLIC SUB Main()
>
>   DIM iCount AS Integer
>  
>   FOR iCount = 0 TO 10
>  
>     INC $bBoolValue
>  
>   NEXT
>  
>   PRINT $bBoolValue
>
> END

Actually I wanted that INC and DEC work on boolean values like toggles.

I mean:

INC $bBoolValue <=> $bBoolValue = NOT $bBoolValue

Same thing for DEC $bBoolValue.

Alas there is a bug in Gambas that prevents it from working correctly. I will 
fix it for the 2.6 version.

Regards,

-- 
Benoit Minisini




More information about the User mailing list