ill you be so kind to explain these subjects to
> me?
> - Original Message - From: "Ric Sherlock"
> To: "Programming JForum"
> Sent: Monday, December 23, 2013 8:57 PM
> Subject: Re: [Jprogramming] A little question
>
>
> If you are trying to numerize
ubject: Re: [Jprogramming] A little question
If you are trying to numerize any items in a boxed table that can be
numerized (rather than understand why your verb isn't working) then the
makenum verb from the tables/dsv addon may be useful:
Install 'tables/dsv' addon using package
I'd like to note an oddity about numbers and their words:
0 First
1 Second
2 Third
3 Fourth
The numerals are ordinal numbers while the words are canonical numbers?
Anyways, with that out of the way we can talk about your code a bit:
(1 numerize each t) would go into each box of t and numerize t
I was hoping you'd ask.
1 2 numerize each t
is
1 2 (numerize each) t
and
(numerize each) has rank 0, because each is &.> and that has the rank
from >, i. e. 0 . So (numerize each) applies to atoms, and you have 2
atoms on the left, 3 on the right: length error.
1 2&numerize each t
is
((1 2&n
Thanks.
t =. 1 2 & numerize each t
worked directly without changing "numerize".
However, I stil do not understand completely WHY it worked, ha ha. You see,
I am writing my first important program in J.
--
For information abou
───┴──┴─┘│└──┴────┴─┘│
> >> └┴───┴───┘
> >> |length error: readpars
> >> | t=.1 2 numerize each t
> >>
> >> - Original Message - From: "Devon McCormick" <
> devon...@gmail.com&g
t;> |length error: readpars
>> | t=.1 2 numerize each t
>>
>> - Original Message - From: "Devon McCormick"
>> To: "J-programming forum"
>> Sent: Monday, December 23, 2013 12:11 AM
>> Subject: Re: [Jprogramming] A little quest
HA│266239│1│││BETA│270271│1│││BROKEN│9288│2││
│└─┴──┴─┘│└┴──┴─┘│└──┴┴─┘│
└┴───┴───┘
|length error: readpars
| t=.1 2 numerize each t
- Original Message - From: "Devon McCormick"
To: "J-programming forum"
Sent: Monday, December 23, 2013 12:11 AM
Subject: Re: [Jprogr
erize each t
- Original Message -
From: "Devon McCormick"
To: "J-programming forum"
Sent: Monday, December 23, 2013 12:11 AM
Subject: Re: [Jprogramming] A little question
If you break down what's happening inside the function with your example:
1 2{arg
+---
The expression (<".x{>y) opens all of y, then selects, executes, and
boxes. The end result is a single box. You're looking for
numerize =: 3 : '(".&.> x{y) x} y'
. This function selects the appropriate boxes, then opens each box,
executes and closes the box. You can compare the right arguments t
If you break down what's happening inside the function with your example:
1 2{arg
+--+-+
|266239|1|
+--+-+
>1 2{arg
266239
1
".>1 2{arg
266239 1
So this vector gets boxed and put into both places. If you allow for
multiple elements in "x", you might do something like this:
("
I have this little function:
numerize =: 13 : '(<".x{>y)x}y'
It makes numeric the contents of the xth box of the y argument. For example,
let b:
b
┌─┬──┬─┐
│ALPHA│266239│1│
└─┴──┴─┘
1 numerize b makes numeric the middle box.
Why does it not work with the last two elements of b,
12 matches
Mail list logo