HP Forums

Full Version: CAS: Can't use "Minutes" with other Time Units
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello all,

When you are in CAS view then you can't perform calculations like:
Code:
40_(min) - 50_(s)

I get this error message:
"Incompatible units Error: Bad Argument Value"

The same calculation works in HOME view.

You can mix all time units except minutes.

All the best,
Dominik
The reason is that min is a reserved word, for minimum. You must use mn instead of min for units.
Many thanks for this hint!

But this should be fixed in CAS:

When you choose

Unit -> Time -> min

then you get this:

25_(min)

instead of

25_(mn)

All the best,
Dominik
Why doesn't the parser distinguish between "min" as a function and "min" as a unit?

There are no such problems with function Ci() and unit "Ci" (Curie), or with a Variable named "m" and unit Meters.
Ci does the same as min. Try 1_Ci you'll get 1_'Ci', like for 1_min -> 1_'min'. Unlike for mn (or m), there is no quote. The way units work in the CAS does not allow command names as unit names, but there is no problem for variable names.
Can't the parser be rewritten so that "min" in unit context does something different than if used as a function?
I'm just asking because units are enclosed in parentheses (at least if composite) preceded by an underscore which is preceded by a number.
On the other hand, function "min" can't occur in this way or am I missing something out?
Is there a way to define a function "1_" so that 1_(min) would be a functional call?
If this is still an issue, I would suggest "mins" is preferable to "mn".

Two reasons.

One, if you are searching for "min" in the help, you will also find "mins" (I hope), but you wouldn't find "mn".

Two, "mn" is not a recognised unit, but looks similar to "mm" (millimetres: 1 character misread), "nm" (nanometres: sequence inverted), "MN" (MegaNewtons: capitalised) or even "NM" (nautical miles), if read/typed in difficult viewing conditions, as portable equipment might well be (or if read by dyslexics). Whereas "mins" simply can't be anything else.
Reference URL's