cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

how to undefine a mathcad 15 built in?

FrankvR
1-Visitor

how to undefine a mathcad 15 built in?

Hi there,

Using mathcad 15, how to undefine the built in "L" and "ton"?

I want my formula's wich are using L and ton to indicate an error when if variables are incorrectly used. This will help me to improve the quality of my sheets.

Best regards,

Frank

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:FrankvR)

Using mathcad 15, how to undefine the built in "L" and "ton"?

I want my formula's wich are using L and ton to indicate an error when if variables are incorrectly used. This will help me to improve the quality of my sheets.

I am absolutely clueless as of what kind of error checking you would like to implement and why you would need L and ton to be treated as undefined variables.

But if your intention really is to undefine L and ton as you demanded, you could do it by assigning L and ton an expression which fails when its evaluated. In the examples below I have chosen a divison by zero for L and a nonexisting variable in case of ton. If this solves your problem, you may put those assignments in a collapsed area so its out of way.

1.png

View solution in original post

6 REPLIES 6
RichardJ
19-Tanzanite
(To:FrankvR)

The only way to do that is to set the unit system to "none", which would disable all units.

is it necessary to use these names exactly? or could you change to a subscripted form

(say) t.on which will display as

Capture.PNG

and similarly L could be L1 or L_ or L.name.

{{{Note that L. will work but WILL be very confusing as it will display as just L }}}

If you want to use units (and I prefer to use them where possible as it has saved me a few mistakes that could have cost hours to trace) then longer names tend to be advisable

Regards

Andy

Werner_E
25-Diamond I
(To:FrankvR)

Using mathcad 15, how to undefine the built in "L" and "ton"?

I want my formula's wich are using L and ton to indicate an error when if variables are incorrectly used. This will help me to improve the quality of my sheets.

I am absolutely clueless as of what kind of error checking you would like to implement and why you would need L and ton to be treated as undefined variables.

But if your intention really is to undefine L and ton as you demanded, you could do it by assigning L and ton an expression which fails when its evaluated. In the examples below I have chosen a divison by zero for L and a nonexisting variable in case of ton. If this solves your problem, you may put those assignments in a collapsed area so its out of way.

1.png

athurin
12-Amethyst
(To:Werner_E)

That looks like a very odd request indeed. Quite funnily, on a day where we were mentioning the issue of Mathcad Prime not preventing us from redefining/undefining pre-defined variables and functions...

I would certainly never recommend to undefine or redefine pre-defined variable, and units even less (although I did take some liberties with this rule, regarding imperial units, but apart from Americans, British and crazy people, who chooses to use those anyway ?). Using units everywhere where possible is the first line of defense against errors and typos.

Like any rule, it can be broken when one knows what he is doing, but from my little experience, it causes lots of problems more often than not...

LL.png

FrankvR
1-Visitor
(To:FrankvR)

Thanks WE. The eror checking works now.

Capture.PNG

Announcements

Top Tags