They achieve the same effect. However:
'var1 var2'=: 10 11 var1 10 var2 11 var1=: var2=: 10 11 var1 10 11 var2 10 11 In the general case they would be different. Also: 'var1 var2'=: 10 11 12 |length error If your [implied] list of variable names is a conflicting length from your list of values, that won't work. Your first example worked because 10 by itself is not a list, so there's no conflict about the length of the list. Thanks, -- Raul On Sun, Aug 10, 2014 at 12:50 AM, Jon Hough <[email protected]> wrote: > A Quick Question: > Is there any difference between: > ' var1 var2' =: 10 > > and > var1 =: var2 =: 10 > ? > JforC breifly mentions the handy multiple assignment (the former, above) > http://www.jsoftware.com/help/jforc/more_verbs_for_boxes.htm > but doesn't mention the two are equivalent. From my brief experimenting it > seems they are. I'm guessing for a long list of variables the former is > neater. > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
