File r37/lisp/csl/html/r37_0064.html artifact 41692f840a part of check-in trunk



<A NAME=SET>

<TITLE>SET</TITLE></A>
<b><a href=r37_idx.html>INDEX</a></b><p><p>



<B>SET</B> _ _ _  _ _ _  _ _ _  _ _ _ <B>operator</B><P>
<P>
 
 <P>
<P>
The <em>set</em> operator is used for assignments when you want both sides of 
the assignment statement to be evaluated. 
 <P> <H3> 
syntax: </H3>
<P>
<P>
<em>set</em>(&lt;restricted\_expression&gt;,&lt;expression&gt;) 
<P>
<P>
<P>
&lt;expression&gt; can be any REDUCE expression; &lt;restricted\_expression&gt; 

must be an identifier or an expression that evaluates to an identifier. 
<P>
<P>
 <P> <H3> 
examples: </H3>
<P><PRE><TT>
a := y; 

  A := Y 


set(a,sin(x^2)); 

       2
  SIN(X ) 


a; 

       2
  SIN(X ) 


y; 

       2
  SIN(X ) 


a := b + c; 

  A := B + C 


set(a-c,z); 

  Z 


b; 

  Z

</TT></PRE><P>Using an 
<A HREF=r37_0188.html>array</A> or 
<A HREF=r37_0345.html>matrix</A> reference as the first 
argument to <em>set</em> has 
the result of setting the contents of the designated element to 
<em>set</em>'s second argument. You should be careful to avoid unwanted 
side effects when you use this facility. 
<P>
<P>
<P>


REDUCE Historical
REDUCE Sourceforge Project | Historical SVN Repository | GitHub Mirror | SourceHut Mirror | NotABug Mirror | Chisel Mirror | Chisel RSS ]