nfordbscndrd Well-Known Member Licensed User Longtime User Mar 2, 2012 #1 I know the difference between "=" and "==" in Java, but is there any difference in B4A? I've been using "=" in place of "==" in my apps and they seem to work okay.
I know the difference between "=" and "==" in Java, but is there any difference in B4A? I've been using "=" in place of "==" in my apps and they seem to work okay.
joseluis Active Member Licensed User Longtime User Mar 2, 2012 #2 I used always '==' for comparisons, but then I saw other people using '=' so I guess it's indifferent (for comparsions). Upvote 0
I used always '==' for comparisons, but then I saw other people using '=' so I guess it's indifferent (for comparsions).
P Penko Active Member Licensed User Longtime User Mar 2, 2012 #3 Normally, in Visual Basic you use a single "=" but maybe there are double standards for the sake of making it easier for developers used to Java. Upvote 0
Normally, in Visual Basic you use a single "=" but maybe there are double standards for the sake of making it easier for developers used to Java.
Amalkotey Active Member Licensed User Longtime User Mar 3, 2012 #4 @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: Mar 3, 2012 Upvote 0
@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
Erel B4X founder Staff member Licensed User Longtime User Mar 3, 2012 #5 Basic4android only uses '='. '==' also works due to a missing check in the compiler. Upvote 0
joseluis Active Member Licensed User Longtime User Mar 3, 2012 #6 Lol, good to know. I'll change all the == to = just in case. Upvote 0