Display the source code of a procedure or the entries of a domain
This functionality does not run in MATLAB.
expose(f) displays the source code of the MuPAD® procedure f or the entries of the domain f.
Usually, procedures and domains are printed in abbreviated form. expose serves to display the complete source code of a procedure and all entries of a domain, respectively. However, you cannot use expose to look at the source code of kernel functions.
If f is a domain, then expose returns a symbolic newDomain call. The arguments of the call are equations of the form index = value, where value equals the value of f::index. expose is not recursively applied to f::index; hence, the source code of domain methods is not displayed.
Although expose returns a syntactically valid MuPAD object, this return value is intended for screen output only, and further processing of it is deprecated.
Using expose, you can inspect the source code of procedures of the MuPAD library:
proc(x) name sin; local f, y; option noDebug; begin if args(0) = 0 then error("no arguments given") else ... end_proc
When applied to a domain, expose shows the entries of that domain:
domain DOM_NULL new := proc new() ... end; new_extelement := proc new_extelement(d) ... end; Content := proc DOM_NULL::Content(Out, x) ... end; end_domain
Applying expose to other objects is legal but generally useless:
In addition to the usual overloading mechanism for domain elements, a domain method overloading expose must handle the following case: it will be called with zero arguments when the domain itself is to be exposed.
If f is a procedure, then expose returns an object of the domain stdlib::Exposed. The only purpose of this domain is its "print" method; manipulating its elements should never be necessary. Therefore it remains undocumented.