abhishek007p Active Member Licensed User Longtime User Jan 27, 2013 #1 Is "Exit If" Supported? B4X: If strNumber = 1234 Then Msgbox("Hello World", "Title") Exit If End If I get this error when compiling the program. B4X: javac 1.7.0_07 src\com\app\service1.java:132: error: ';' expected if (true) break} };
Is "Exit If" Supported? B4X: If strNumber = 1234 Then Msgbox("Hello World", "Title") Exit If End If I get this error when compiling the program. B4X: javac 1.7.0_07 src\com\app\service1.java:132: error: ';' expected if (true) break} };
Erel B4X founder Staff member Licensed User Longtime User Jan 27, 2013 #2 There is no "Exit If". You can use the Exit keyword to exit a loop. Upvote 0
mc73 Well-Known Member Licensed User Longtime User Jan 27, 2013 #3 And if you want to exit a sub, use 'return'. Upvote 0
W wheretheidivides Active Member Licensed User Longtime User Jan 28, 2013 #4 and if you want to exit a presidential election say, 'if elected, i'll ban all porn' Upvote 0