A representation for computation sequences
CompSeq(locals=list1, globals=list2, params=list3, assignments)
list1, list2, list3
lists of names
list of the form name=expression
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].
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;
f ≔ proca,blocali,j;globalx,y;x ≔ a+b;i ≔ a*b;j ≔ x+i;y ≔ a+sin⁡xend proc
s ≔ convert⁡f,CompSeq
s ≔ CompSeq⁡locals=i,j,globals=x,y,params=a,b,x=a+b,i=a⁢b,j=x+i,y=a+sin⁡x
proca,blocali,j;globalx,y;x ≔ a+b;i ≔ a*b;j ≔ x+i;y ≔ a+sin⁡xend proc
Download Help Document
What kind of issue would you like to report? (Optional)
Thank you for submitting feedback on this help document. Your feedback will be used
to improve Maple's help in the future.