Units - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Science and Engineering : Units : Manipulating Units : Units/HasUnit

Units

  

HasUnit

  

test whether a unit exists

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

HasUnit(unit, opts)

Parameters

unit

-

symbol; unit name

opts

-

(optional) equation(s) of the form option=value where option is 'display'; specify options

Description

• 

The HasUnit(unit) function returns true if the name is accepted as a unit name. Otherwise, false is returned.

  

 

  

'display'=truefalse

  

If this option is true and the unit unit is accepted as a valid unit name, the default spelling with context is returned instead of true. Otherwise, false is returned.

Examples

withUnits:

HasUnit'cm'

true

(1)

HasUnit'mileUS_survey'

true

(2)

HasUnit'Ω','display'=true

ohmSI

(3)

HasUnit'ω'

false

(4)

See Also

type/unit_name

Units

Units/Commands

Units/Index

Units[AddUnit]

Units[GetUnit]

Units[GetUnits]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam