Previous Page Next Page Contents

Type::Constant -- a type representing constant objects

Introduction

Type::Constant represents constant objects, i.e., objects not containing symbolic identifiers.

Call(s)

testtype(obj, Type::Constant)

Parameters

obj - any MuPAD object

Returns

see testtype

Related Functions

testtype

Details

Example 1

The following objects are elementary constants:

>> testtype(3, Type::Constant),
   testtype(sin(3/2), Type::Constant),
   testtype(TRUE, Type::Constant),
   testtype("MuPAD", Type::Constant),
   testtype(FAIL, Type::Constant)
                       TRUE, TRUE, TRUE, TRUE, TRUE

The following expression contains an indeterminate x and, consequently, is not a constant object:

>> testtype(exp(x + 1), Type::Constant)
                                   FALSE

All constant operands of an expression are selected:

>> select(x^2 + 3*x - 2, testtype, Type::Constant)
                                    -2

Any function call is considered constant, if the arguments are constant:

>> testtype(f(1, 2, 3, 4), Type::Constant)
                                   TRUE

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000