Previous Page Next Page Contents

expose -- display the source code of a procedure or the entries of a domain

Introduction

expose(f) displays the source code of the MuPAD procedure f or the entries of the domain f.

Call(s)

expose(f)

Parameters

f - any object; typically, a procedure, a function environment, or a domain

Returns

Side Effects

The formatting of the output of expose is sensitive to the environment variable TEXTWIDTH.

Overloadable:

f

Related Functions

print

Details

Example 1

Using expose, you can inspect the source code of procedures of the MuPAD library:

>> sin
                                    sin
>> expose(%)
      proc(x)
        name sin;
        local f, y;
        option noDebug;
      begin
        if args(0) = 0 then
          error("no arguments given")
        else 
        ...
      end_proc

Example 2

On the other hand, you cannot look at the source code of kernel functions:

>> expose(_plus)
                      builtin(817, NIL, "_plus", NIL)

Example 3

When applied to a domain, expose shows the entries of that domain:

>> expose(DOM_INT)
      newDomain("coerce" = proc DOM_INT::coerce(x) ... end,
      
         "phi" = phi, "new_extelement" =
      
         proc new_extelement(d) ... end, "new" = proc new() ... end,
      
         "D" = 0, "key" = "DOM_INT")

Example 4

Applying expose to other objects is legal but generally useless:

>> expose(3)
                                     3

Background

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000