I recommend reading about multiple assignment in NuVoc.

http://www.jsoftware.com/jwiki/Vocabulary/Assignment

Multiple assignment can assign different values, as Raul points out. It also removes one level of boxing:

   'a b' =: <5
   a
5
   b
5
   a =: b =: <5
   a
+-+
|5|
+-+
   b
+-+
|5|
+-+

Henry Rich

On 8/10/2014 12:50 AM, Jon Hough 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

Reply via email to