Yuvaraj Athur Raghuvir wrote:
add =: 4 : 0
attr =. 0{::y
class =. ; {. @ copath x
s =. attr,'_',class,'_'
NB. s =: attr,'_',class,'_ =:', 1{::,y
". s
s =. attr,'__x',' =:', 1{::,y
". s
)
You may try
add =: 4 : 0
'attr value'=. y
class =. ; {. @ copath x
". attr,'_',class,'_ =: '''''
". attr,'__x',' =:', value
i.0 0
)
In J, you cannot declare a name without given it a value.
The verb "add" must return a noun so that your original "add" might raise an
error if "1{::,y" evaluated to a verb, adverb or conjunction.
--
regards,
bill
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm