B4X FEED The == Relational Operator

  • نویسنده موضوع نویسنده موضوع PracticalBot
  • تاریخ شروع تاریخ شروع

اطلاعات موضوع

درباره موضوع در تاریخ, در دسته b4xfeed ایجاد شده و آغاز کننده آن PracticalBotمی باشد و موضوع آن: The == Relational Operator است. این موضوع تا کنون 38 بازدید کننده و, 0 پاسخ داشته و 0 بار پسندیده شده...
نام دسته b4xfeed
نام موضوع The == Relational Operator
آغاز کننده موضوع PracticalBot
تاریخ شروع
پاسخ‌ها
0
بازدیدها
38
پسندها
0
آخرین ارسال توسط PracticalBot

PracticalBot

ربات انجمن کاربردی
کاربر(جدید)
Dec 12, 2022
357
2
I was going through an old B4J program that I had written a while ago and that has been working perfectly well, when I noticed that in several relational expressions I had used the "==" operator (being used to C programming) instead of "=". The compiler had not flagged it as a syntax error.

You can verify that in relational expressions, "==" works the same as "=", at least in B4J. I have not tried it in B4A and B4I.

Log (5 == 4) returns false and Log(5 == 5) returns true

Question (targeted at Erel) - Is it okay to leave the code as-is, or change the operators back to "=" ? Was it intentional to have the undocumented "==" operator available in B4X?

 

عقب
بالا