CompSeq - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


CompSeq

A representation for computation sequences

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

CompSeq(assignments)

CompSeq(locals=list1, globals=list2, params=list3, assignments)

Parameters

list1, list2, list3

-

lists of names

assignments

-

list of the form name=expression

Description

• 

The function CompSeq is a placeholder for representing a computation sequence.

• 

Specification of local and global variables as well as parameters is optional.

• 

The actual computation sequence is specified as a list of the form name=expression and represents an assignment of the value of the expression to the name. The last assignment in the list is also the result of the computation sequence.

• 

Computation sequences can be converted to and from procedures, simplified and optimized. For more information, see codegen[optimize].

Examples

f:= proc(a,b) local i,j; global x,y;
x:=a+b; i := a*b; j := x+i; y := a+sin(x) end proc;

fproca,blocali,j;globalx,y;xa+b;ia*b;jx+i;ya+sinxend proc

(1)

sconvertf,CompSeq

sCompSeqlocals=i,j,globals=x,y,params=a,b,x=a+b,i=ab,j=x+i,y=a+sinx

(2)

simplifys

CompSeqglobals=x,y,params=a,b,x=a+b,y=a+sinx

(3)

types,CompSeq

true

(4)

converts,procedure

proca,blocali,j;globalx,y;xa+b;ia*b;jx+i;ya+sinxend proc

(5)

See Also

codegen[optimize]