Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mathcad syntax

Status
Not open for further replies.

pezdm

Mechanical
Jun 20, 2008
2
Why does MathCAD recognize .2.12 as 12? I accidently defined a variable as .2.12 and MathCAD didn't recognize that it was a typo. Instead of defining the variable as the desired 2.12 it used 12 and it took me a few hours to find the mistake. After i realized this i was playing around with it and found that whenever you type a period then a number then another period and number mathcad evaluates it as the second number. Any ideas?
 
Replies continue below

Recommended for you

what version of Mathcad?



Cheers

Greg Locock

SIG:please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
It happenes in V14 M020.
any number of decimal points are allowable within the 'bug', so x:=....12 will give x=12 as will x:=.2.12 or x:= .1.2.012
Definately some sort of parsing bug probably because you can have a literal subscript (used a dot) in a variable and the same dot in a number.
It's still a bug.
Philip
 
It's a bug, and was posted in the Mathcad Collaboratory yesterday, which one of the PTC people regularly frequents.

TTFN

FAQ731-376
 
It's apparently a consequence of the revamping of Mathcad to support XML, starting in V12.

TTFN

FAQ731-376
 
I wouldn't expect it to be an XML thing specifically, but V12 was 'a bit of a dog'. They re-wrote much of the internal engine! I'm suprised it hasn't been spotted & reported before.
 
It's not an XML issue, per se, but starting with v12, the revamping was also driven by the desire to use XML file format instead of the binary format. This most likely resulted in changes to the parsing routines.


TTFN

FAQ731-376
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor