The Special Parameter thismodule - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Modules : The Special Parameter thismodule

thismodule

 

Calling Sequence

Description

Examples

Calling Sequence

thismodule

Description

• 

Within the body of a module definition, the special parameter thismodule refers to the current module. It is analogous to procname as used in procedure definitions, but refers to the module instance (not a name).

Examples

m := module()
    export e;
    print( `BEFORE: `, op( eval(thismodule) ) );
    e := proc()
        print( thismodule )
    end proc;
    print( `AFTER: `, op( eval(thismodule) ) );
end module:

BEFORE: ,e,moduleexporte;end module

AFTER: ,procprintthismoduleend proc,moduleexporte;end module

(1)

m:-e

moduleexporte;end module

(2)

See Also

module

procname

type/module

type/moduledefinition