Previous Page Next Page Contents

Type::ListProduct -- type for testing lists

Introduction

With Type::ListProduct, lists with different object types can be identified.

Call(s)

testtype(obj, Type::ListProduct(typedef...))

Parameters

obj - any MuPAD object
typedef - a sequence of types; a type can be an object of the library Type or one of the possible return values of domtype and type

Returns

see testtype

Related Functions

testtype, Type::ListOf, Type::Product

Details

Example 1

The argument is a list of a positive integer followed by an identifier:

>> testtype([5, x], Type::ListProduct(Type::PosInt, Type::Unknown))
                                   TRUE

Is the argument is a list of a five positive integers? (We use $ here to repeat Type::PosInt five times.)

>> testtype([5, 3, 5, -1, 0], Type::ListProduct(Type::PosInt $ 5))
                                   FALSE

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000