[Gambas-user] BTst Function

Pablo Vera pvera at ...729...
Wed Jun 1 20:48:31 CEST 2005


I think that in the example below, the TRUE value is being converted
to -1 which is not equal to 1.

I haven't tested it but I am almost sure that the following will work:

   PRINT BTst(x,0) = -1  ' This should be TRUE


Saludos,
Pablo Vera

nando wrote:
> If that were true...
> 
> PRINT CBool(1)    ' <<-is TRUE 
> 
> I think that non-zero ought to revert to true
> and zero be false, then
> the example below works too!
> -Fernando
> 
> 
> ---------- Original Message -----------
> From: Pablo Vera <pvera at ...729...>
> To: gambas-user at lists.sourceforge.net
> Sent: Wed, 01 Jun 2005 07:53:49 -0500
> Subject: Re: [Gambas-user] BTst Function
> 
> 
>>I am only guessing, but I think that BTst(x,0) is equal to TRUE 
>>which is not equal to 1.
>>
>>Saludos,
>>Pablo Vera
>>
>>nando wrote:
>>
>>>I'm curious of the following
>>>
>>>DIM x AS INTEGER
>>>
>>>x=1
>>>
>>>PRINT BTst(x,0)    ' <<-result is TRUE  (correct)
>>>PRINT BTst(x,0)=1  ' <<-result is FALSE (unexpected)
>>
>>-------------------------------------------------------
>>This SF.Net email is sponsored by Yahoo.
>>Introducing Yahoo! Search Developer Network - Create apps using 
>>Yahoo! Search APIs Find out how you can build Yahoo! directly into 
>>your own Applications - visit http://developer.yahoo.net/?fr=offad-
>>ysdn-ostg-q22005 _______________________________________________ 
>>Gambas-user mailing list Gambas-user at lists.sourceforge.net 
>>https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
> ------- End of Original Message -------
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by Yahoo.
> Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
> Search APIs Find out how you can build Yahoo! directly into your own
> Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
> 
> 




More information about the User mailing list