Previous Page Next Page Contents

val -- the value of an object

Introduction

val(object) replaces every identifier in object by its value.

Call(s)

val(object)

Parameters

object - any MuPAD object

Returns

the ``evaluated'' object.

Related Functions

eval, hold, level, LEVEL, MAXLEVEL

Details

Example 1

val replaces identifiers by their values, but does not call arithmetical functions such as _plus:

>> a := 0: val(a*b + 4 + 0)
                                0 b + 4 + 0

Duplicate elements in sets are removed:

>> a := b: val({a, b, a*0})
                                 {b, 0 b}
>> delete a:

Example 2

val does not flatten its argument, nor does it remove void objects of type DOM_NULL:

>> a := null(): val((a, null()))
                              null(), null()

However, it is not legal to pass several arguments:

>> val(a, null())
      Error: Wrong number of arguments [val]
>> delete a:

Example 3

val does not recursively substitute values for the identifiers:

>> delete a, b: a := b: b := c: val(a)
                                     b

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000