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?

1 Answers1

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).

Seamus
  • 73,242
David Carlisle
  • 757,742