Community Tip - You can change your system assigned username to something more personal in your community settings. X
I am using a simple if statement, regardless of the value of the defining variable it prints out the second term's value. However, if I give the file to a coworker the if statement works correctly.
Unsuccessful things I have tried:
* Two separate coworkers opened the file and it worked correctly for them without modifying anything.
* Changed defining variable to something completely undefined elsewhere.
* Rebooted my computer.
* Uninstalled v15.05 and reinstalled.
* Uninstalled v15.05 and installed v14.35.
I am loosing my mind. I have no idea what else to do.
I haven't got Mathcad to hand at the moment, but looking at your images, your "if" statement is incomplete.
If the condition is true, Mathcad will calculate the first expression. However, it will then go straight on to calculate the next expression because you haven't told it to stop processing and return that value.
You have a couple of options.
1. Put a return operator in your "if" expression, so that it looks something like "return <expr1> if <cond>".
2. Put your second expression in an "otherwise" operator, "expr2 otherwise"
Stuart
Or you can use the if() function:
Note that it is always better to attach the Mathcad worksheet.
Success!
Luc