I was just curious the other day and entered in the following line of code into PB:
To my surprise, this compiled without any problems. This begs the question, to which if statement does the else statement belong?
Most people will never do this type of thing in one line, instead using the very clear block if statement instead. But I was curious. This is a classic problem in the C language, and most compiles bind the else to the closed if. But that's somewhat arbitrary.
Michael
------------------
Code:
if a=q then if a=5 then q=5 else q=6
Most people will never do this type of thing in one line, instead using the very clear block if statement instead. But I was curious. This is a classic problem in the C language, and most compiles bind the else to the closed if. But that's somewhat arbitrary.
Michael
------------------
Comment