[Gambas-user] =?utf-8?Q?=22=3D=22_?=versus =?utf-8?Q?=22=3D=3D=22_?=in IF statement

Yahoo olivier.cruilles at yahoo.fr
Thu Apr 2 16:14:54 CEST 2020


Hello,

I think only A = 1 is available in Gambas for test
but assignment using ‘==‘ exist for strings

Take a look here: http://gambaswiki.org/wiki/lang/stringop


Olivier
Le 2 avril 2020 à 10:02:04, roberto (roberto.premoli at tiscali.it) a écrit:

Hello,

when I do a IF statement

IF A = 1 then

  B=2

EndIf


it give me the same result of

IF A == 1 then

  B=2

EndIf


From C language, i know that "==" is for TEST of value and "=" is for  
ASSIGNEMENT of value

Does GAMBAS accept both "=" and "==" in case of IF statement?


----[ http://gambaswiki.org/wiki/doc/netiquette ]----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200402/d66b82f3/attachment.html>


More information about the User mailing list