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

Leading Zero Frustration

Old-MCAD-User
10-Marble

Leading Zero Frustration

OldMCADUser_0-1734126242895.png

MathCAD Prime 7.0 is where my company is still stuck at, but it still has the very frustrating limitation/bug of not accepting decimal numbers without putting a leading zero before the decimal. It allows you to do this when calculating a number, but not when using units. Has this been fixed in subsequent versions? 

 

It is frustrating not only from the standpoint that I never put leading zeros before a decimal, and never have, never do on any other program/software, and it's not a problem at any other time on any other software package I use (including MathCAD Prime 7.0) UNTIL I try to use units in the calculation. I have hundreds of worksheets where I have not used leading zeros and it used to calculate everything just fine, even with the use of units.

4 REPLIES 4
LucMeekes
23-Emerald III
(To:Old-MCAD-User)

Maybe type an * (explicit multiplication) between the 2 and the i...

 

Success!

Luc

I can confirm that this behaviour has not changed in Prime 10.

 

As a workaround you may type an explicit multiplication (*) between the number and the unit as suggested by Luc or (for consistency) an implicit one which you get by pressing ctrl-shift-U.

Werner_E_0-1734146843735.png

BTW, Prime calls this implicit multiplication the "scaling operator".

 

StuartBruff
23-Emerald III
(To:Werner_E)


@Werner_E wrote:

BTW, Prime calls this implicit multiplication the "scaling operator".


 

I've occasionally wondered why PTC called it the "scaling operator" or, to be more precise, why they gave it the functionality they did.   

 

AFAICT, the "S-expression" associated with each maths region doesn't so much affect the nature of the calculation but rather the chosen display form.   Certainly, the scaling operator scales scalars, but its prime(!) purpose seems to be to tell Mathcad not to draw a multiplication operator between terms that Mathcad is actually multiplying.

 

2024 12 14 A.png

 

The Hadamard (element-by-element or vectorized) product would, IMO, have been a more mnemonic operation on arrays.

 

Stuart

The reason you can't type ".2in" is because the dot is a valid leading character in an identifier name.

 

2024 12 14 E.png

 

When the number begins with 0, Mathcad Prime recognises a non-numerical character as the number string terminator (unless that character is an i or a j, in which case Mathcad interprets the number as imaginary). 

 

Stuart

 

From the Mathcad Prime 10 Help:

 

Variable and Function Names
 
Variable names, function names, unit names, constant names, etc, are generically referred to as identifiers.
 
Identifiers can contain any valid Unicode character from the Base Multilingual Plane (BMP) with the exception of white space and control characters, and with the additional limitation that the first character cannot be a decimal digit (0-9). Unicode BMP characters are defined as having a code in the range 0-65535.
 
The label associated with an identifier is considered part of its name when distinguishing it from another identifier. This makes it possible to define a new function mean with the Variable label, and still be able to refer to the built-in function mean by specifying the Function label. However, if you define a new function mean with the Function label, you will be hiding the built-in definition of that function.
Identifiers are case-sensitive, can be of any length, and may contain any combination of valid characters:
 
Letters—Uppercase and lowercase letters.
Digits—0 through 9, but not as the first character of a name. PTC Mathcad interprets leading digits in combination with letters as either an imaginary number (2i or 3j) or as a number times a variable (3x).
Dot—A single, punctuation character, period can be used any where; including as the first character.
Announcements

Top Tags