Strand Assignment: Difference between revisions

From NARS2000
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
<table border="1" cellpadding="5" cellspacing="0" rules="none" summary="">
<table border="1" cellpadding="5" cellspacing="0" rules="none" summary="">
<caption>'''Strand Assignment'''</caption>
<tr>
<tr>
   <td>
   <td>

Revision as of 08:43, 9 April 2008

(A1 A2 ... An)←R Assigns the successive items of R to the names.
A1 A2 ... An are assignable names, R is a scalar or vector.
If 1<⍴⍴R, signal a RANK ERROR.
If R is a scalar or one element vector, its item is assigned to each name, as in Ai←⊃⍬⍴R.
Otherwise, assume there are n names in the list:
If n≠⍴R, signal a LENGTH ERROR.
Otherwise, each successive item of R is assigned to each successive name, as in Ai←i⊃R.



For example, (A B C)←⊂⍳3 assigns ⍳3 to each of the names A, B, and C
Also, (A B C)←(1 2)'abc' 1.1 is the same as A←1 2 ⋄ B←'abc' ⋄ C←1.1