MKID INDEX

MKID _ _ _ _ _ _ _ _ _ _ _ _ command

The mkid command constructs an identifier, given a stem and an identifi er or an integer.

syntax:

mkid(<stem>,<leaf>)

<stem> can be any valid REDUCE identifier that does not include escaped special characters. <leaf> may be an integer, including one given by a local variable in a for loop, or any other legal group of characters.

examples:


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

You can use mkid 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 factorize and solve.