set default context(s) - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Science and Engineering : Units : Manipulating Contexts : Units/UseContexts

Units[UseContexts] - set default context(s)

Calling Sequence

UseContexts(ctx1, ctx2, ...)

Parameters

ctx1, ctx2, ...

-

symbol(s); unit context(s)

Description

• 

The UseContexts(ctx1, ctx2, ...) function defines the default context(s) to use for the current session without redefining the defaults for each unit. It also returns the context(s) assigned by its most recent execution if any exists.

• 

To redefine the default context(s) for all future Maple sessions, add the UseContexts command to your Maple initialization file. For more information, see Create Maple Initialization File.

• 

If a unit name is specified without a context, the contexts in the last execution of the command UseContexts are each checked to see if any are valid. If one is appropriate, it is used as the default context.

Examples

withUnits:

convert1.0,'units','kg','oz'

35.27396195

(1)

convert1.0,'units','kg','oztroy'

32.15074657

(2)

convert1.0,'units','km','mi'

0.6213711922

(3)

convert1.0,'units','km','miUS_survey'

0.6213699495

(4)

UseContexts'US_survey','troy'

convert1.0,'units','kg','oz'

32.15074657

(5)

convert1.0,'units','kg','ozavoirdupois'

35.27396195

(6)

convert1.0,'units','km','mi'

0.6213699495

(7)

convert1.0,'units','km','mistandard'

0.6213711922

(8)

UseContexts'apothecary'

US_survey,troy

(9)

See Also

Create Maple Initialization File, Units, Units/Commands, Units/Index


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