h=:[:>:i.

h 4

1 2 3 4

h

[: >: i.


when you use 13 : you are actually using an explicit definition (as with 3:0 but convertable if possible to tacit
In direct use [: also doesn't work


[: >: i.4

|domain error

| [:>:i.4


I have been frustrated in the past by something that works on direct entry doesn' t work in tacit form (or vice versa)
examples where results correctly follow the rules

mean=: +/ % #

mean i.5

2

+/ % # i.5

0.2


(+/%#)i.5

2


mean2=: 13 : '(+/y)% #y'

mean2

+/ % #

mean2 i.5

2



mean3 =: 13 : '+/ % # y'

mean3

[: +/ [: % #

mean3 i.5

0.2


Don Kelly

On 09/02/2015 7:26 AM, Linda Alvord wrote:
How about this:
h=: 13 :'[:>:i.y'
    h
[: [: [: >: i.
[: [: [: >: i. 4
|domain error: scriptd
|   [:[:    [:>:i.4

Linda


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Brian Schott
Sent: Monday, February 9, 2015 10:00 AM
To: Programming forum
Subject: Re: [Jprogramming] Source of frustration

Linda,

If you are willing to put parentheses around your example verbs -- with the
data outside the parens, you will not get the domain error.

On Mon, Feb 9, 2015 at 9:54 AM, Linda Alvord <[email protected]>
wrote:

Suppose:   ff=: 13 :'>:i.y'
    ff
:@i.
Then:
   >:@i.4
1 2 3 4
Which is what you want, more than a domain error.

Linda

--
(B=)
----------------------------------------------------------------------
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

Reply via email to