Quote: "Only the first statement is checked, whether or not it is true."
How did you test that claim?
If x is 1 then the rest of the line is executed - but since x is not 2 in that case then the second condition is false so y will not be set to 2.
If, on the other hand, x is 2 then the rest of the line after the first test is skipped. That is the purpose of the If/then construct in DBPro. The following snippet shows that your statement is wrong - the second test IS checked when the first test passes:
x=1
y=0
if x = 1 then y = 1 : if x = 1 then y =y+2
print y
wait key
This is what the Help file says on the subject of the IF command:
Quote: "If the condition is true, the commands after the THEN keyword are performed. Ensure that your commands after the THEN keyword are separated by a colon(
). If the condition is false, the rest of the line is skipped."
That is fairly clear in my opinion (leaving aside the small matter of the omission of the else/endif option
).