exports - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Modules : Module Exports : exports

exports

retrieve the exported locals of a module

 

Calling Sequence

Parameters

Description

Thread Safety

Examples

Calling Sequence

exports(m)

exports(m, opts)

Parameters

m

-

module

opts

-

(optional) one or more of the names instance, typed, static, and string

Description

• 

The procedure exports returns an expression sequence containing the names (symbols) of the exported members of a module m.

• 

By default, the global instances of the exported member names are returned. The instances of the names local to the module can be requested by specifying the option instance as a second (optional) argument.

• 

By default, only the name portion (first operand) of an exported member that has been declared as an expression of type :: is returned. The entire structure, including the type, can be retrieved by passing the optional argument typed.

• 

A module can contain both per-instance and static exports, the latter of which are shared by all instances of a module. By default, the exports function returns only the per-instance exports. Specifying the static option causes it to return only the static exports instead.

• 

The string option causes exports to return the exported names as strings instead of names. In cases where it is necessary to know only the names of the exports and not there values (for example, for reporting purposes), this avoids any danger of accidental unintended evaluation.

• 

The instance or string, typed, and static options may be used separately or together in any single call to exports, and may occur in any order after the first (module) argument.

• 

The instance and string options are contradictory, and may not be used together.

Thread Safety

• 

The exports command is thread-safe as of Maple 15.

• 

For more information on thread safety, see index/threadsafe.

Examples

mmoduleexporte1,e2;end module:

eexportsm

e:=e1,e2

(1)

evalbe1=e1

true

(2)

eexportsm,'instance'

e:=e1,e2

(3)

evalbe1=e1

false

(4)

mmoduleexporte1::integer,e2::`module`;end module:

exportsm

e1,e2

(5)

exportsm,'typed'

e1::integer,e2::module

(6)

exportsm,'instance','typed'

e1::integer,e2::module

(7)

exportsm,'string','typed'

e1::integer,e2::module

(8)

See Also

member

module

module/export

 


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