I am implementing a parser in C++ for parameterized strings(which are used for specifying some terminal capabilities for a terminal). Then I came across this on the man page of terminfo:
%? expr %t thenpart %e elsepart %;
This forms an if-then-else. The %e elsepart is optional. Usually the %? expr part pushes
a value onto the stack, and %t pops it from the stack, testing if it is nonzero (true). If
it is zero (false), control passes to the %e (else) part.
So, my question is:
As the man page says, that the expr
part in the string can usually push values onto the stack, so what other things can be done in the expr
part, that is, what other operations can be performed in the expr part except for pushing values on the stack ?