Look more closely at your why. With why you are not invoking a verb. You are asking for a display. And why (from the expression that defined it) is the noun 12335.
Your expression that defined why might be more clear with more parens and spaces. (13 :'x + 10*y') / |. 1 2 3 4 5 This applies the verb defined by 13 : to its right argument and the result is the noun 12345. On Mon, Jan 2, 2012 at 1:38 PM, Linda Alvord <lindaalv...@verizon.net>wrote: > I think you missed the problem. The definition why expects both a left > and a right argument. The original post shows no definition for x . So > erase any definition of x that might be floating around. > > why=: 13 :'x + 10*y'/|. 1 2 3 4 5 > erase names 'x' > 1 > why > 12345 > > The result has been produced without a value for x : > > x > |value error: x > > There is only one noun that the verb is supplied with in a dyadic > definition. How can it have a result? > > Linda > > -----Original Message----- > From: programming-boun...@jsoftware.com [mailto: > programming-boun...@jsoftware.com] On Behalf Of Raul Miller > Sent: Monday, January 02, 2012 11:28 AM > To: Programming forum > Subject: Re: [Jprogramming] Binary representation without #: or #. > > Every explicit verb has an implicit first line: > y=. right argument. > > Every dyadic explicit verb has an implicit second line: > x=. left argument > > Here, right argument and left argument are meant to represent the > nouns which the verb is supposed to deal with. > > The explicitly provided lines would follow the above implicit lines. > > -- > Raul > > On Mon, Jan 2, 2012 at 11:18 AM, Linda Alvord <lindaalv...@verizon.net> > wrote: > > Now I have a new problem: > > > > why=: 13 :'x + 10*y'/|. 1 2 3 4 5 > > erase names 'x' > > 1 > > why > > 12345 > > x > > |value error: x > > > > What is x in why ? > > > > -----Original Message----- > > From: programming-boun...@jsoftware.com > > [mailto:programming-boun...@jsoftware.com] On Behalf Of Aai > > Sent: Monday, January 02, 2012 5:42 AM > > To: Programming forum > > Subject: Re: [Jprogramming] Binary representation without #: or #. > > > > > > > > On 02-01-12 11:21, Linda Alvord wrote: > >> This was a while ago, but how about a simple J version: > >> > >> brila=: 13 :'([:(++:)/|.)"1 y' > >> brila > >> ([: (+ +:)/ |.)"1 > >> n=:5 3$ 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 > >> n > >> 0 0 0 > >> 0 0 1 > >> 0 1 0 > >> 0 1 1 > >> 1 0 0 > >> brila n > >> 0 1 2 3 4 > >> > >> I'm still puzzled by how it works: > > #. 1 0 1 0 1 0 1 > > 85 > > > > 13 :'x + 2*y'/ |. 1 0 1 0 1 0 1 > > 85 > > > > or > > > > 13 :'x + +: y'/ |. 1 0 1 0 1 0 1 > > 85 > > > > > > Simple J(?) > > > > 13 :'x + +: y' > > [ + [: +: ] > > > > or concise: > > > > (++:) > > > > Base 10 example: > > > > 13 :'x + 10*y'/ |. 1 2 3 4 5 > > 12345 > > > > (+10&*)/ |. 1 2 3 4 5 > > 12345 > > > > > > -- > > Met vriendelijke groet, > > @@i = Arie Groeneveld > > > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm