07-16-2019, 10:18 PM
Is there a way I can test to see if a variable has a unit attached to it?
I was using x:=UVAL(x); where I wanted to strip away the units. If x=5_m, then UVAL returns 5. If x=5 without any units attached, then UVAL returns an error message and it stops my program. I wanted to test x to see if it had units before using the UVAL command.
I was using x:=UVAL(x); where I wanted to strip away the units. If x=5_m, then UVAL returns 5. If x=5 without any units attached, then UVAL returns an error message and it stops my program. I wanted to test x to see if it had units before using the UVAL command.