Article View: comp.os.os2.programmer
Article #3611Rexx question
From: The Rottweiler
Date: Sun, 24 Jan 1993 18:19
Date: Sun, 24 Jan 1993 18:19
35 lines
1513 bytes
1513 bytes
I'm doing a little Rexx programming and came upon the following:
--------------------------------------
/* */
line = "prpipgphptp"
do while((n = pos("p", line)) \= 0)
line = overlay(" ", line, n)
end
say line
line = "prpipgphptp"
n = pos("p", line)
do while(n \= 0)
line = overlay(" ", line, n)
n = pos("p", line)
end
say line
-------------------------------
The output when this program is run is the following:
prpipgphptp
r i g h t
My question is simple - is this a bug or a limitation of the
Rexx programming language? Or is it that I'm doing something
wrong?
Jake
Technical Details
Message-ID:
<1993Jan24.181958.6740@athena.mit.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!gatech!enterpoop.mit.edu!bloom-beacon!bloom-picayune.mit.edu!jawetzelShow Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!enterpoop.mit.edu!bloom-beacon!bloom-picayune.mit.edu!jawetzel From: jawetzel@athena.mit.edu (The Rottweiler) Subject: Rexx question Message-ID: <1993Jan24.181958.6740@athena.mit.edu> Sender: news@athena.mit.edu (News system) Nntp-Posting-Host: indra.mit.edu Organization: Massachusetts Institute of Technology Date: Sun, 24 Jan 1993 18:19:58 GMT Lines: 36