Enumerations in NetRexx(3)

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

Enumerations in NetRexx(3)

ThSITC
Before I'm going ahead, I would like to discuss on this FORUM the potential
implementation of ENUMERATIONS in NetRexx(3), called Rey, for brevity ;-)

a = {1,3,2,4,5,6,3,5}

b={YES,NO}

c={IF,THEN,ELSE,ENDIF}

In my current concept, the respective *variables* dfined do have
*LIMITS*, as I call them.

A LIMIT is a value-range list, enclosed in BRACES.

The ':' (and, as a SYNONYM operator, '..')  will act as the separator
for RANGES.

Thus, for instance:

letter={A:Z}   will be EQUIVALENT to: letter={A..Z}

Please do note, that QUOTES (of any kind) will NOT be requie within the
braces...

The actual TYPE of the variable will be simply determined by the COMMON
TYPE of all Literals (Constants) used.

The COMMON TYPE is defined as the UNION TYPE of the onstants used.

What do you say?

Thomas.

--
Thomas Schneider (www.thsitc.com)
_______________________________________________
Ibm-netrexx mailing list
[hidden email]

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

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

Re: Enumerations in NetRexx(3)

George Hovey-2
Thomas,
What problem does this solve?
George

On Thu, Apr 28, 2011 at 3:22 PM, Thomas Schneider <[hidden email]> wrote:
Before I'm going ahead, I would like to discuss on this FORUM the potential
implementation of ENUMERATIONS in NetRexx(3), called Rey, for brevity ;-)

a = {1,3,2,4,5,6,3,5}

b={YES,NO}

c={IF,THEN,ELSE,ENDIF}

In my current concept, the respective *variables* dfined do have *LIMITS*, as I call them.

A LIMIT is a value-range list, enclosed in BRACES.

The ':' (and, as a SYNONYM operator, '..')  will act as the separator for RANGES.

Thus, for instance:

letter={A:Z}   will be EQUIVALENT to: letter={A..Z}

Please do note, that QUOTES (of any kind) will NOT be requie within the braces...

The actual TYPE of the variable will be simply determined by the COMMON TYPE of all Literals (Constants) used.

The COMMON TYPE is defined as the UNION TYPE of the onstants used.

What do you say?

Thomas.

--
Thomas Schneider (www.thsitc.com)
_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Enumerations in NetRexx(3)

ThSITC
Hello George,
   1.) I've not yet looked at how enumerations are denoted in Java, but I do think enumerations are a very
useful language feature.
   2.) I simply did make a proposal for the syntax, on this list, as there are so many experienced NetRexx programmers
on this list.
   3.) And yes, I will be *even more* careful with mis-using this list for unwanted/unneeded announcements.
Amen. Thomas.
========================================================================================
Am 29.04.2011 03:03, schrieb George Hovey:
Thomas,
What problem does this solve?
George

On Thu, Apr 28, 2011 at 3:22 PM, Thomas Schneider <[hidden email]> wrote:
Before I'm going ahead, I would like to discuss on this FORUM the potential
implementation of ENUMERATIONS in NetRexx(3), called Rey, for brevity ;-)

a = {1,3,2,4,5,6,3,5}

b={YES,NO}

c={IF,THEN,ELSE,ENDIF}

In my current concept, the respective *variables* dfined do have *LIMITS*, as I call them.

A LIMIT is a value-range list, enclosed in BRACES.

The ':' (and, as a SYNONYM operator, '..')  will act as the separator for RANGES.

Thus, for instance:

letter={A:Z}   will be EQUIVALENT to: letter={A..Z}

Please do note, that QUOTES (of any kind) will NOT be requie within the braces...

The actual TYPE of the variable will be simply determined by the COMMON TYPE of all Literals (Constants) used.

The COMMON TYPE is defined as the UNION TYPE of the onstants used.

What do you say?

Thomas.

--
Thomas Schneider (www.thsitc.com)
_______________________________________________
Ibm-netrexx mailing list
[hidden email]




--
Thomas Schneider (www.thsitc.com)

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

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

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