File r37/lisp/csl/html/r37_0218.html artifact 3329f02b06 part of check-in 9992369dd3



<A NAME=SCALAR>

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



<B>SCALAR</B> _ _ _  _ _ _  _ _ _  _ _ _ <B>declaration</B><P>
<P>
 
The <em>scalar</em> declaration must be made immediately after a 

<A HREF=r37_0040.html>begin</A> (or other variable declaration such as 
<A HREF=r37_0197.html>integer</A> 
and 
<A HREF=r37_0216.html>real</A>) and declares local scalar variables. They are 
initialized to 0. 
 <P> <H3> 
syntax: </H3>
<P>
<P>
<em>scalar</em>&lt;identifier&gt;{,&lt;identifier&gt;}* 
<P>
<P>
<P>
&lt;identifier&gt; may be any valid REDUCE identifier, except <em>t</em> or 
<em>nil</em>. 
<P>
<P>
Scalar variables remain local, and do not share values with variables of 
the same name outside the 
<A HREF=r37_0040.html>begin</A>...<em>end</em> 
<A HREF=r37_0041.html>block</A>. 
When the block is finished, the variables are removed. You may use the 
words 
<A HREF=r37_0216.html>real</A> or 
<A HREF=r37_0197.html>integer</A> in the place of <em>scalar</em>. 
<em>real</em> and <em>integer</em> do not indicate typechecking by the current 
REDUCE; they are only for your own information. Declaration statements 
must immediately follow the <em>begin</em>, without a semicolon between 
<em>begin</em> and the first variable declaration. 
<P>
<P>
Any variables used inside <em>begin</em>...<em>end</em> blocks that were not 
declared <em>scalar</em>, <em>real</em> or <em>integer</em> are global, and any 

change made to them inside the block affects their global value. Arrays 
declared inside a block are always global. 
<P>
<P>
<P>


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