Artifact 4b61c191fe0e13b0bafbc7036d20e0f61159ebf28b5a3a34538a194946272742:



<A NAME=MKID>

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



<B>MKID</B> _ _ _  _ _ _  _ _ _  _ _ _ <B>command</B><P>
<P>
 
 <P>
<P>
The <em>mkid</em> command constructs an identifier, given a stem and an identifi
er 
or an integer. 
 <P> <H3> 
syntax: </H3>
<P>
<P>
<em>mkid</em>(&lt;stem&gt;,&lt;leaf&gt;) 
<P>
<P>
<P>
&lt;stem&gt; can be any valid REDUCE identifier that does not include escaped 
special characters. &lt;leaf&gt; may be an integer, including one given by a 
local variable in a 
<A HREF=r37_0047.html>for</A> loop, or any other legal group of 
characters. 
<P>
<P>
 <P> <H3> 
examples: </H3>
<P><PRE><TT>
mkid(x,3); 

  X3 


factorize(x^15 - 1); 

  {X - 1,
    2
   X  + X + 1,
    4    3    2
   X  + X  + X  + X + 1,
    8    7    5    4    3
   X  - X  + X  - X  + X   - X + 1}



for i := 1:length ws do write set(mkid(f,i),part(ws,i));
	 


   8    7    5    4    3
  X  - X  + X  - X  + X  - X + 1
   4    3    2
  X  + X  + X  + X + 1
   2
  X  + X + 1
  X - 1

</TT></PRE><P>You can use <em>mkid</em> to construct identifiers from inside pro
cedures. This 
allows you to handle an unknown number of factors, or deal with variable 
amounts of data. It is particularly helpful to attach identifiers to the 
answers returned by <em>factorize</em> and <em>solve</em>. 
<P>
<P>
<P>


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