I have a FO-program that throws an error when it approaches this line:
.continue ERR1 ? F|defined(M|yhnum) & M|yhnum > 10
The error is
M|yhnum: not found
Why does this happen? I thought it wouldn't happen if I checked if the variable is defined before accessing it, but it doesn't seem like it worked
The problem here is, that FO doesn't use short circuit evaluation. This means that it will always check if
M|yhnumis bigger than 10, even if it is not defined. Obviously, this will fail if it is not defined.From the documentation:
Use
F|condexprto manually achieve short circuit evaluation