home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.os2.programmer
- Path: 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
-
- 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
-
-