Previous Page Next Page Contents

prog::exprtree -- visualize an expression as tree

Introduction

prog::exprtree(ex) visualizes any MuPAD expression ex as tree.

Call(s)

prog::exprtree(ex <, Quiet>)

Parameters

ex - expression to visualize

Options

Quiet - suppress screen output

Returns

an object of type adt::Tree

Related Functions

prog::calltree, adt::Tree

Details

Option: Quiet

Example 1

The example shows the structure of the expression a + b*2 - d*(a + c):

>> prog::exprtree(a + b*2 - d*(a + c))
                               _plus
                               |
                               +-- a
                               |
                               +-- _mult
                               |   |
                               |   +-- b
                               |   |
                               |   `-- 2
                               |
                               `-- _mult
                                   |
                                   +-- d
                                   |
                                   +-- _plus
                                   |   |
                                   |   +-- a
                                   |   |
                                   |   `-- c
                                   |
                                   `-- -1
      
                                   Tree1

Tree1 is the return value of type adt::Tree. This object can be exposed or taken for other operations.

The option Quiet suppresses the output, only the tree is returned:

>> prog::exprtree(a + b*2 - d*(a + c), Quiet)
                                   Tree2

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000