Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

whitespace

46 views
Skip to first unread message

Wolfgang Riedel

unread,
Jan 29, 2003, 10:28:41 AM1/29/03
to
rexx (no longer?) recognizes '0d0a'x as whitespace.
OS/2 classic rexx.
So wordpos etc. fail.

Any hints?
Wolfgang

Lee Peedin

unread,
Jan 29, 2003, 12:30:34 PM1/29/03
to
Did it ever recogize it as whitespace?
Lee

Gert van der Kooij

unread,
Jan 29, 2003, 1:27:50 PM1/29/03
to
In article <3E37F329...@development.retarus.de>,
wolfgan...@development.retarus.de says...

Use changestr to replace them with spaces.

Lee Peedin

unread,
Jan 29, 2003, 1:52:24 PM1/29/03
to
Did (does) changestr exist in OS/2 Classic Rexx?
Lee

Wolfram Fassbender

unread,
Jan 29, 2003, 3:00:45 PM1/29/03
to

...translate(data,' ','0d0a'x)

-wolfram


GerardS

unread,
Jan 29, 2003, 3:41:29 PM1/29/03
to
| Wolfram Fassbender wrote:
|> Wolfgang Riedel wrote:
|>rexx (no longer?) recognizes '0d0a'x as whitespace.
|>OS/2 classic rexx.
|>So wordpos etc. fail.
|>
|>Any hints?
|
| ...translate(data,' ','0d0a'x)


The above TRANSLATE will also translate any
x'0d' and/or
x'0a', not just the '0d0a'x pair.


If your REXX doesn't have CHANGESTR, here is an
equivalent REXX subroutine:

-----------------------------------------------------------------
changestr: procedure;parse arg o,h,n /*old, haystack, new*/
r=''; w=length(o); ;if w==0 then return n||h
do forever
parse var h y (o) _ +(w) h; if _=='' then return r||y
r=r||y||n
end
return r||h
________________________________________________________Gerard S.


Wolfgang Riedel

unread,
Jan 30, 2003, 5:30:08 AM1/30/03
to
I'm not that sure, but the following snippet used to work a year ago:
>>
p = wordpos('Content-Encoding:',Result)
if (p > 0) then do
if (wordindex(Result,p) < p1) & (word(Result, p + 1) = 'gzip') & (gz = 1) then
do
>>
I've read (http://regina-rexx.sourceforge.net/doc/regina-03.html):

"All implementation can be trusted to treat the <space> character as blank.
Additional characters that might be interpreted as blanks are <tab> (horizontal
tabulator), <ff> (formfeed), <vt> (vertical tabulator), <nl> (newline) and <cr>
(carriage return). The interpretation of what is blank will vary between machines,
operating systems and interpreters. If you are using support for national
character sets, it will even depend on the language selected. So be sure to check
the documentation before you assume anything about blank characters."

and tested, that regina/linux treats those as ws,
but couldn't find any docu about ws for OS/2-Rexx.

Of course I know translate (worked around it that way) and changestr,
but it concerns me, that more pgm's might be broken.

Wolfgang

Turgut Kalfaoglu

unread,
Jan 26, 2021, 10:43:05 AM1/26/21
to
Wolfram - can you please get in touch, trying to find out.. thanks! turgut (at) kalfaoglu.com
0 new messages