nbrs from data record

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

nbrs from data record

Robert L Hamilton
I'm using this:

Lcase =  'abcdefghijklmnopqrstuvwxyz'
Ucase =  'QWERTYUIOPASDFGHJKLZXCVBNM()'
SPEC  =  "!@#$%^&*()_/;'[]=<>?:{}|+"
--
chars =  Lcase || Ucase || SPEC || '"'
NBRS = '1212 abc45lkj66"54du_______f-9876.,'.translate(' ', chars );
NBRS = NBRS.space;
nbr_words = NBRS.Words;
say NBRS;
say nbr_words;

say 'Last nbr is :' NBRS.word(NBRS.Words);

To produce this:

1212 45 66 54 -9876.,
5
Last nbr is : -9876.,

I don't see in TnRL nor in NetRexx 2 (22 May 2009) any way to specify a range of Characters.

???

BobH


_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: nbrs from data record

George Hovey-2
Built in method sequence.
George

On Fri, Aug 13, 2010 at 9:41 AM, Robert Hamilton <[hidden email]> wrote:
I'm using this:

Lcase =  'abcdefghijklmnopqrstuvwxyz'
Ucase =  'QWERTYUIOPASDFGHJKLZXCVBNM()'
SPEC  =  "!@#$%^&*()_/;'[]=<>?:{}|+"
--
chars =  Lcase || Ucase || SPEC || '"'
NBRS = '1212 abc45lkj66"54du_______f-9876.,'.translate(' ', chars );
NBRS = NBRS.space;
nbr_words = NBRS.Words;
say NBRS;
say nbr_words;

say 'Last nbr is :' NBRS.word(NBRS.Words);

To produce this:

1212 45 66 54 -9876.,
5
Last nbr is : -9876.,

I don't see in TnRL nor in NetRexx 2 (22 May 2009) any way to specify a range of Characters.

???

BobH


_______________________________________________
Ibm-netrexx mailing list
[hidden email]




_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: nbrs from data record

Mike Cowlishaw
In reply to this post by Robert L Hamilton
 >  I don't see in TnRL nor in NetRexx 2 (22 May 2009) any way to specify a range of Characters. 
 
That's because NetRexx works in Unicode, so there are lots of possible ranges of characters, including (or not) accented characters, non-latin characters, etc.
 
You can usually save a bit of typing by using the .upper method to create the uppercase range from the lowercase, for example. 
 
Mike 

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: nbrs from data record

Robert L Hamilton
Thnx;  I'm using  Ucase =  Lcase.upper

bobh

On Fri, Aug 13, 2010 at 10:48 AM, Mike Cowlishaw <[hidden email]> wrote:
 >  I don't see in TnRL nor in NetRexx 2 (22 May 2009) any way to specify a range of Characters. 
 
That's because NetRexx works in Unicode, so there are lots of possible ranges of characters, including (or not) accented characters, non-latin characters, etc.
 
You can usually save a bit of typing by using the .upper method to create the uppercase range from the lowercase, for example. 
 
Mike 

_______________________________________________
Ibm-netrexx mailing list
[hidden email]




_______________________________________________
Ibm-netrexx mailing list
[hidden email]