Thanks. However, I was trying to use the example to show the differences
between an explicit definition using 3 : and a tacit version using 13 : .
Is there a way to show my explicit definition as is usually the way 3 : works?
Linda
-----Original Message-----
From: Programming <[email protected]> On Behalf Of
Gilles Kirouac
Sent: Tuesday, August 7, 2018 11:25 AM
To: [email protected]
Subject: Re: [Jprogramming] g420fg NaN error (defining a dyadic verb)
To define alpha1 as a dyadic verb, use
alpha1=: 4 :'y /: <./x i."1 _ y' NB. 4 instead of 3
~ GIlles
Le 2018-08-07 à 03:46, Linda Alvord a écrit :
> I can't seem to get messages to the forum. Here's a problem in J806
>
> a=:'abcdefghijklmnopqrstuvwxyz'
> A=:'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
> aA=:a,:A
> c=:'Pear Kiwi '
> d=:'Peach Fig '
> fruits=:>;:c,d
>
> fruits /: <./aA i."1 2 fruits
> Fig
> Kiwi
> Peach
> Pear
>
> alpha=: 13 :'y/:<./x i."1 2 y'
>
> aA alpha fruits
> Fig
> Kiwi
> Peach
> Pear
>
> alpha
> ] /: [: <./ i."1 2
>
> alpha1=: 3 :'y /: <./x i."1 _ y'
>
> aA alpha1 fruits
> |domain error: alpha1
> | aA alpha1 fruits
> |[-19] c:\users\linda\j64-806-user\temp\32.ijs
>
>
> Linda
>
>
...
----------------------------------------------------------------------
For information about J forums see
https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&data=02%7C01%7C%7C703f18695e8b4c99203908d5fc79faf7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636692523181788740&sdata=DpABrRGM6RtiewUWIRbBtBVxzgdYFhoQUgqj6M3lH5c%3D&reserved=0
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm