manual:chapter5:listproc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
manual:chapter5:listproc [2019/10/17 15:17]
jojo1973 [Group 2: Commands that must use DOLIST to parallel process] Fixed examples
manual:chapter5:listproc [2019/10/18 13:56]
jojo1973 [Group 9: Quirky commands] Fixed examples
Line 54: Line 54:
 ==== Group 4: Commands that set modes / states ==== ==== Group 4: Commands that set modes / states ====
 Commands that store values in system-specific locations so as to control certain modes and machine states can generally be used to parallel process data. The problem is that each successive parameter in the list cancels the setting established by the previous parameter. For example, <code> Commands that store values in system-specific locations so as to control certain modes and machine states can generally be used to parallel process data. The problem is that each successive parameter in the list cancels the setting established by the previous parameter. For example, <code>
-{ 16 32 48 }+1:                  { 16 32 48 } 
 +……………………………………………………………………………………
 SETPREC</code> is effectively the same as <code> SETPREC</code> is effectively the same as <code>
-48+1:                            48 
 +……………………………………………………………………………………
 SETPREC SETPREC
 </code> </code>
Line 63: Line 65:
 These commands are the easiest to use with parallel processing. Simply provide the command with a list of arguments instead of the expected single argument. Some examples: These commands are the easiest to use with parallel processing. Simply provide the command with a list of arguments instead of the expected single argument. Some examples:
  
-  * <code>{ 1 -2 3 -4 }+  * <code> 
 +1:                 { 1 -2 3 -4 } 
 +……………………………………………………………………………………
 ABS ABS
 </code> returns ''{ 1 2 3 4 }''. </code> returns ''{ 1 2 3 4 }''.
   * <code>   * <code>
-DEG +1:                { 0 30 60 90 } 
-{ 0 30 60 90 }+……………………………………………………………………………………
 SIN SIN
-</code> returns ''{ 0 .5. .866025403784. 1 }''.+</code> returns ''{ 0 .5. .866025403784. 1 }'' (assuming ''DEG'' mode).
   * <code>   * <code>
-{ 1 A 'SIN(Z)'}+1:             { 1 'A'SIN(Z)'} 
 +……………………………………………………………………………………
 INV INV
 </code> returns ''{ 1 'INV(A)' 'INV(SIN(Z))' }''. </code> returns ''{ 1 'INV(A)' 'INV(SIN(Z))' }''.
Line 84: Line 89:
  
 In the first form, parallel elements are combined by the command: <code> In the first form, parallel elements are combined by the command: <code>
-{ 1 2 3 } +2:                     { 1 2 3 } 
-{ 4 5 6 }+1:                     { 4 5 6 } 
 +……………………………………………………………………………………
 % %
 </code> returns ''{ .04 .1 .18 }''. </code> returns ''{ .04 .1 .18 }''.
  
 In the second form, the level 1 object is combined with each element in the level 2 list in succession: <code> In the second form, the level 1 object is combined with each element in the level 2 list in succession: <code>
-{ 1 2 3 } +2:                     { 1 2 3 } 
-30+1:                            30 
 +……………………………………………………………………………………
 %CH %CH
 </code> returns ''{ 2900 1400 900 }''. </code> returns ''{ 2900 1400 900 }''.
  
 In the third form, the level 2 object is combined with each element of the level 1 list in succession: <code> In the third form, the level 2 object is combined with each element of the level 1 list in succession: <code>
-50 +2:                            50 
-{ 1 2 3 }+1:                     { 1 2 3 } 
 +……………………………………………………………………………………
 %T %T
 </code> returns ''{ 2 4 6 }''. </code> returns ''{ 2 4 6 }''.
Line 106: Line 114:
 ==== Group 8: Multiple-result commands ==== ==== Group 8: Multiple-result commands ====
 Any command that allows parallel processing, but produces multiple results from its input data, will return its results as a single list. For example,<code> Any command that allows parallel processing, but produces multiple results from its input data, will return its results as a single list. For example,<code>
-{ 1 2 3 } +2:                     { 1 2 3 } 
-{ 4 5 6 }+1:                     { 4 5 6 } 
 +……………………………………………………………………………………
 R→C R→C
 +</code> produces, as expected ''{ (1, 4) (2, 5) (3, 6) }'', but<code>
 +1:      { (1, 4) (2, 5) (3, 6) }
 +……………………………………………………………………………………
 C→R C→R
 </code> produces ''{ 1 4 2 5 3 6 }'' rather than the more expected ''{ 1 2 3 } { 4 5 6 }''. </code> produces ''{ 1 4 2 5 3 6 }'' rather than the more expected ''{ 1 2 3 } { 4 5 6 }''.
Line 124: Line 136:
 » »
 </code> </code>
 +
 Taking ''{ 1 4 2 5 3 6 }'' from above as the result of ''C→R'' (a command which should return two results),<code> Taking ''{ 1 4 2 5 3 6 }'' from above as the result of ''C→R'' (a command which should return two results),<code>
-2+2:               { 1 4 2 5 3 6 } 
 +1:                             2 
 +……………………………………………………………………………………
 UNMIX UNMIX
 </code> gives ''{ 1 2 3 } { 4 5 6 }''. </code> gives ''{ 1 2 3 } { 4 5 6 }''.
Line 133: Line 148:
  
   * ''DELALARM''. This command can take a list of arguments. Note, however, that deletions from early in the alarm list will change the alarm indices of the later alarm entries. Thus, if there are only three alarms, <code>   * ''DELALARM''. This command can take a list of arguments. Note, however, that deletions from early in the alarm list will change the alarm indices of the later alarm entries. Thus, if there are only three alarms, <code>
-{ 1 3 }+1:                       { 1 3 } 
 +……………………………………………………………………………………
 DELALARM DELALARM
 </code> will cause an error, whereas <code> </code> will cause an error, whereas <code>
-{ 3 1 }+1:                       { 3 1 } 
 +……………………………………………………………………………………
 DELALARM DELALARM
 </code>will not. </code>will not.
  • manual/chapter5/listproc.txt
  • Last modified: 2019/11/03 06:36
  • by jojo1973