"some way to implement if ... then ... else in RPN."
See how it's done in mt_masktools. You have the ==, >, <... checks that take two input variables and return true/false.
Then you have the ? that takes three inputs. One bool, one to return if it's true, one if it's false.
if a==b, then T, else F
a b == T F ?
|