Working with undefined variables
Is there anything within Mathcad similar to an IsUndefined function? I'm trying to include some built-in checks for a template I'm working on.
Section "A" of the template has a check "A" (true or false). If check "A" fails, the user needs to continue on to section "B" of the template where exists a check "B". At the end of the document, I want to include something such as CheckAB := CheckA OR CheckB. Since a variable is undefined in section "B" of the document, CheckB has an undefined error, so my final CheckAB function returns an undefined error. I'd like for it to ignore the undefined variable in CheckB and just return the value of CheckA.
Something like this:
CheckAB: if(IsUndefined(CheckB),CheckA,CheckA OR CheckB)
Similarly, it could be written as:
CheckAB := CheckA OR if(IsUndefined(CheckB),False,CheckB)
IsUndefined(x) would return true if x is undefined, and false if x is defined.
Edit: I should clarify that this template will be used by persons running v13-v15.


