f
< # ]

I find it difficult to get from tacit expressions that contain ] t0 an explicit.

Is this a fork?

Linda


Sent from my Verizon, Samsung Galaxy smartphone definition.


-------- Original message --------
From: Pablo Landherr <[email protected]>
Date: 4/30/19 11:54 AM (GMT-05:00)
To: Programming forum <[email protected]>
Subject: Re: [Jprogramming] How to get actual values instead of booleans from a 
list?

Here is a simple approach:

for =: #~

age =: ?20#100

sex =: ?20#2

weight =: 100+?20#100

id =: 10000+?20#5000

or =: +.

and =: *.



id

14652 14290 14262 13100 11264 11129 11414 10030 11792 12598 14282 13212
14154 11130 11584 11355 13035 14807 11608 10123

id for age > 70

11129 12598 14282 13212 14154 11130 13035 11608 10123

id for (age > 70) and weight < 150

11129 13212 13035 11608

On Tue, Apr 30, 2019 at 4:26 PM Linda Alvord <[email protected]>
wrote:

>
>  ]a=:2+i.9
> 2 3 4 5 6 7 8 9 10
>
>    (6<a)#a
> 7 8 9 10
>
>
>    f=: 13 :'(x<y)#y'
>
>    6 f 2 + i.9
> 7 8 9 10
>
>
> I find it is  helpful to plan for similar problems in the  future.
>
> Surprise!
>  f
> < # ]
>
>
> Linda
>
>
> Sent from my Verizon, Samsung Galaxy smartphone
>
>
> -------- Original message --------
> From: 'Pascal Jasmin' via Programming <[email protected]>
> Date: 4/30/19 9:08 AM (GMT-05:00)
> To: [email protected]
> Subject: Re: [Jprogramming] How to get actual values instead of booleans
> from a list?
>
>
>
> (#~ >&6) (2+i.9)
>
> 7 8 9 10
>
>
>
>
> On Tuesday, April 30, 2019, 9:06:26 a.m. EDT, JmageK <[email protected]>
> wrote:
>
>
>
>
>
> NB. Want it to return all numbers larger than 6 from list
>
>    (>&6) (2+i.9)
> NB. Actual result 0 0 0 0 0 1 1 1 1
> NB. desired result 7 8 9 10
>
>
> I searched but could not find what to do next to have it return only those
> numbers which pass the comparison (1 1 1 ).
>
> JmageK
> --
> Securely sent with Tutanota
> ----------------------------------------------------------------------
> For information about J forums see
> https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&amp;data=02%7C01%7C%7Cfa71bba346ea497d501e08d6cd84177c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636922364540165755&amp;sdata=C7vpw%2BJUkU7MlDGXAUSxvMv2gWhN0h%2FZMRiPEw0Yh64%3D&amp;reserved=0
> ----------------------------------------------------------------------
> For information about J forums see
> https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&amp;data=02%7C01%7C%7Cfa71bba346ea497d501e08d6cd84177c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636922364540175760&amp;sdata=aBvSD420%2Bpi81xWHkjgdc11miFzrobEb9mTTTalu4Gc%3D&amp;reserved=0
> ----------------------------------------------------------------------
> For information about J forums see 
> https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&amp;data=02%7C01%7C%7Cfa71bba346ea497d501e08d6cd84177c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636922364540175760&amp;sdata=aBvSD420%2Bpi81xWHkjgdc11miFzrobEb9mTTTalu4Gc%3D&amp;reserved=0
>
----------------------------------------------------------------------
For information about J forums see 
https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&amp;data=02%7C01%7C%7Cfa71bba346ea497d501e08d6cd84177c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636922364540175760&amp;sdata=aBvSD420%2Bpi81xWHkjgdc11miFzrobEb9mTTTalu4Gc%3D&amp;reserved=0
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to