Previous Page Next Page Contents

_exprseq -- expression sequences

Introduction

The function call _exprseq(object1, object2...) is the internal representation of the expression sequence object1, object2....

Call(s)


object1, object2, ... _exprseq(object1, object2...)

Parameters

object1, object2, ... - arbitrary MuPAD objects

Returns

an expression of type "_exprseq" or the void object of type DOM_NULL.

Related Functions

_stmtseq, null

Details

Example 1

A sequence is generated by ``concatenating'' objects with commas. The resulting object is of type "_exprseq":

>> a, b, sin(x)
                               a, b, sin(x)
>> op(%, 0), type(%)
                           _exprseq, "_exprseq"

On the screen, _exprseq just returns its argument sequence:

>> _exprseq(1, 2, x^2 + 5) = (1, 2, x^2 + 5) 
                              2                2
                      (1, 2, x  + 5) = (1, 2, x  + 5)

Example 2

The object of domain DOM_NULL (the ``empty sequence'') is automatically removed from expression sequences:

>> 1, 2, null(), 3
                                  1, 2, 3

Expression sequences are flattened. The following sequence does not have 2 operands, where the second operand is a sequence. Instead, it is flattened to a sequence with 3 operands:

>> x := 1: y := 2, 3: x, y
                                  1, 2, 3
>> delete x, y:

Example 3

Sequences are used to build sets and lists. Sequences can also be passed to functions that accept several arguments:

>> s := 1, 2, 3: {s}, [s], f(s)
                     {1, 2, 3}, [1, 2, 3], f(1, 2, 3)
>> delete s:

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000