home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / fractal / arcaut / Info / Table2 < prev    next >
Encoding:
Text File  |  1991-07-31  |  3.1 KB  |  38 lines

  1.  
  2.  TABLE 2: Commands
  3.     
  4.  
  5.   Procedure            Prior stack state                    Resulting stack state                              
  6.                     {bottom,   middle, & top of stack}   {bottom,   middle, & top of stack}
  7.  
  8.          ==          ?a        ?b        n                terminates code, returning with value n as new cell state
  9.          IF          ?a        ?b        n                empty     ?a        ?b    {conditional execution dependant on n}
  10. SCOUNT_NEIG          ?a        ?b        n                ?a        ?b        number of neighbours which have state=n
  11.  SCOUNT_ALL          ?a        ?b        n                ?a        ?b        number of local cells which have state=n
  12. MCOUNT_NEIG          ?a        n         m                empty     ?a        number of neighbours which have n <= state <= m
  13.  MCOUNT_ALL          ?a        n         m                empty     ?a        number of local cells which have n <= state <= m
  14.    SUM_NEIG          empty     ?a        ?b               ?a        ?b        sum of the states of the neighbours
  15.     SUM_ALL          empty     ?a        ?b               ?a        ?b        sum of the states of all the local cells
  16.        2RND          empty     ?a        ?b               ?a        ?b        random integer from {0,1}
  17.        4RND          empty     ?a        ?b               ?a        ?b        random integer      {0,1,2,3}
  18.        8RND          empty     ?a        ?b               ?a        ?b        random integer      {0,. . .,7}
  19.      256RND          empty     ?a        ?b               ?a        ?b        random integer      {0,. . .,255}
  20.       2RNDB          empty     ?a        ?b               ?a        ?b        random integer per block from {0,1}; see * below
  21.       4RNDB          empty     ?a        ?b               ?a        ?b        random integer                {0,1,2,3}; see *
  22.       8RNDB          empty     ?a        ?b               ?a        ?b        random integer                {0,. . .,7}; see *
  23.     256RNDB          empty     ?a        ?b               ?a        ?b        random integer                {0,. . .,255}; see *
  24.  
  25.  
  26.  empty       indicates that position must/will be free                                                                     
  27.  ?a, ?b, ?c  indicates an unknown value (or possible free location)
  28.  n, m or o   indicates the presence of a value
  29.  TRUE        has the value -1
  30.  FALSE       has the value 0 
  31.  neighbours  means all cells within the neighbourhood of CELL excluding CELL itself (8 for Moore neighbourhood, 3 for Margolus)
  32.  local cells means all cells within the neighbourhood of CELL including CELL itself (9 for Moore neighbourhood, 4 for Margolus)
  33.  note:       the type of neighbourhood required for a particular automaton is specified in the initialisation procedure;
  34.              see table 4
  35.  *           for use with Margolus neighbourhood; returns a single random value per 2x2 cell block, as partitioned by the
  36.              alternating grid. Will return the same value for all four cells within a particular block.
  37.              To use a RNDB command you must first set the system variable rndb to TRUE within initialisation; see table 4
  38.