[Jprogramming] lazily look for label?
Zheng, Xin (NIH) [C]
zhengxin at mail.nih.gov
Thu Oct 13 00:02:36 HKT 2011
Thank you all for your excellent answers. So basically may I conclude that: 1. For present there's no way for lazy evaluation in J; 2. For such task, I'd better reshape my mind into J's way.
Best,
Xin
-----Original Message-----
From: Aai [mailto:agroeneveld400 at gmail.com]
Sent: Wednesday, October 12, 2011 11:48 AM
To: Programming forum
Subject: Re: [Jprogramming] lazily look for label?
Variable label length string:
]S=.;('label',":"0)&.>?~100
label2label33label46label1label82label91label25 .......
Just a possibility to extract e.g. the first 6 labels:
6{. (<;.1~'label'&E.) S
┌──────┬───────┬───────┬──────┬───────┬───────┐
│label2│label33│label46│label1│label82│label91│
└──────┴───────┴───────┴──────┴───────┴───────┘
Hallo Zheng, Xin (NIH) [C], je schreef op 12-10-11 16:34:
> Hello all,
>
> 'label' I. at E. 'label1label2label3' could give where the label starts in the string. If the string is very long or infinite, only limited sites, say the first 100 starting sites, are needed. How to do it?
>
> Thank you,
>
> Xin
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
--
Met vriendelijke groet,
=@@i
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
More information about the Programming
mailing list