SUB INDEX

SUB _ _ _ _ _ _ _ _ _ _ _ _ operator

The sub operator substitutes a new expression for a kernel in an expression.

syntax:

sub(<kernel>=<expression> {,<kernel>=<expression>}*, <expression>) or

sub({<kernel>=<expression>*, <kernel>=expression},<expression>)

<kernel> must be a kernel, <expression> can be any REDUCE scalar expression.

examples:


sub(x=3,y=4,(x+y)**3); 

  343 


x; 

  X 


sub({cos=sin,sin=cos},cos a+sin b) 


  COS(B) + SIN(A)

Note in the second example that operators can be replaced using th e sub operator.