Is it really wise to allow RELATIONAL Operators in INDEX-expressions?

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

Is it really wise to allow RELATIONAL Operators in INDEX-expressions?

ThSITC
As all of you know, I'm known to raise discussions :-(

My current topic in question is, whether it is really wise to allow
relational operators (=, >, <, etc) in INDEX-Expressions.

For instance, I personally think, that:

a[i=1] ...  shall be reported as an error, as it is most probably a
spelling error.

I would be interested to get meaningful samples of this feature(?) back,
when interested in this topic.

Greetings from dark Vienna,
Thomas.


--
Thomas Schneider (Founder of www.thsitc.com) Member of the Rexx Languge
Asscociation (www.rexxla.org) Member of the NetRexx Developer's Team
(www.netrexx.org)

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Thomas Schneider, Vienna, Austria (Europe) :-)

www.thsitc.com
www.db-123.com
Reply | Threaded
Open this post in threaded view
|

Re: Is it really wise to allow RELATIONAL Operators in INDEX-expressions?

George Hovey-2
Perhaps there is something to this.  In an earlier life I worked with a FORTRAN (mandatory capitalization, then) compiler that touted its useful augmentations of the ANSI specification.  I ran afoul of one of these 'improvements', namely the ability to initialize more than one variable with a single statement.  I spent quite a bit of time (admittedly, obtuseness was a factor) investigating a bug that came down to typing

   a = b = 1

rather than

   a = b - 1

('-' and '=' are adjacent on the U.S. keyboard).

On Sat, Feb 18, 2012 at 3:08 PM, Thomas Schneider <[hidden email]> wrote:
As all of you know, I'm known to raise discussions :-(

My current topic in question is, whether it is really wise to allow relational operators (=, >, <, etc) in INDEX-Expressions.

For instance, I personally think, that:

a[i=1] ...  shall be reported as an error, as it is most probably a spelling error.

I would be interested to get meaningful samples of this feature(?) back, when interested in this topic.

Greetings from dark Vienna,
Thomas.


--
Thomas Schneider (Founder of www.thsitc.com) Member of the Rexx Languge Asscociation (www.rexxla.org) Member of the NetRexx Developer's Team (www.netrexx.org)

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/



_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Is it really wise to allow RELATIONAL Operators in INDEX-expressions?

ThSITC
Hi George, I started with Algol and Basic, then switched to RPG and Basic, then PL/I *and* Fortan 77, then ...

My proposed Syntx for MULTIPLE Assignments is:

a,b = 1

Thomas.
======================================================================
Am 19.02.2012 00:44, schrieb George Hovey:
Perhaps there is something to this.  In an earlier life I worked with a FORTRAN (mandatory capitalization, then) compiler that touted its useful augmentations of the ANSI specification.  I ran afoul of one of these 'improvements', namely the ability to initialize more than one variable with a single statement.  I spent quite a bit of time (admittedly, obtuseness was a factor) investigating a bug that came down to typing

   a = b = 1

rather than

   a = b - 1

('-' and '=' are adjacent on the U.S. keyboard).

On Sat, Feb 18, 2012 at 3:08 PM, Thomas Schneider <[hidden email]> wrote:
As all of you know, I'm known to raise discussions :-(

My current topic in question is, whether it is really wise to allow relational operators (=, >, <, etc) in INDEX-Expressions.

For instance, I personally think, that:

a[i=1] ...  shall be reported as an error, as it is most probably a spelling error.

I would be interested to get meaningful samples of this feature(?) back, when interested in this topic.

Greetings from dark Vienna,
Thomas.


--
Thomas Schneider (Founder of www.thsitc.com) Member of the Rexx Languge Asscociation (www.rexxla.org) Member of the NetRexx Developer's Team (www.netrexx.org)

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/




_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/



--
Thomas Schneider (Founder of www.thsitc.com) Member of the Rexx Languge Asscociation (www.rexxla.org) Member of the NetRexx Developer's Team (www.netrexx.org)

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Thomas Schneider, Vienna, Austria (Europe) :-)

www.thsitc.com
www.db-123.com