Rexx is so "magical" there is no real reason it could not support
Substr(a,3,1) = 'x' and actually be doing a = Substr(a,1,2) || 'x' ||
Substr(a,4) under the covers. Even, for that matter, Substr(a,3,1) = 'xyz'
or Substr(a,3,3) = 'x'


Charles

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Tony Harminc
Sent: Wednesday, September 05, 2012 11:20 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Strings (hijacked from: The IBM zEnterprise EC12 announcment)

On 5 September 2012 13:26, Scott Ford <scott_j_f...@yahoo.com> wrote:

> I find it interesting that in REXX , its really easy to handle strings
..in fact to me pretty simple.
> Maybe because I very very familar with Rexx since it came out. Why cant C
and C++ be this way without going thru all the gyrations.

In REXX strings are unchangeable (immutable, in Java-speak), though REXX
makes this less explicit than Java. You can't change a string; the best you
can do is create a new one. Of course how this is done under the covers is
another matter, and the compiler/interpreter may well decide to update the
string in place under appropriate circumstances.

Immutable strings have some consequences for both performance and data
security, and there are times when it's annoying not to be able to do
something like Substr(a,3,1) = 'x', rather than a = Substr(a,1,2) || 'x' ||
Substr(a,4).

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to