"=" versus "=="

joseluis

Active Member
Licensed User
Longtime User
I used always '==' for comparisons, but then I saw other people using '=' so I guess it's indifferent (for comparsions).
 
Upvote 0

Amalkotey

Active Member
Licensed User
Longtime User
@all:

the "=" is an assignment of a1 = 0;
the "==" is a check for "True" and wind used only in the IF statement

B4X:
// Java-Code
if (A1 == 0) then {
  System.out.print("false");
} else {
  System.out.print("true");
}

best regards
Amalkotey
 
Last edited:
Upvote 0
Top