6

Is there some way to create more advanced conditional statements that can evaluate a logic expression and decide what to do based on the value of the expression? For example like in the following very simple pseudocode:

if A or B then
    do something
else
    do something else
end if

where A and B are flags or booleans. Or maybe A is a logic expression, checking if x > y, where x and y are real numbers. Is there some simple way to do this?

5

You could use the standard latex ifthen package (or there are more efficient and expandable ways to do the same thing, if that is needed).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.