As all of you know, the exclamation point (!) has been regarded (as also
the question mark (?) as an ID-Chracter in classic Rexx/ooRexx. This is NO LONGER TRUE for NetRexx. There, they are currently invalid characters. I've just re-read the NetRexx reference manual (nrl3.def), and did find *sooooo many* allowed (human oriented) denotations for NOT EQUAL. Will not repeat them here, by the way ... Now, as a matter of fact, so many computer Languages do use the '!=' (exclamation point, equal sign) as the valid NOT EQUAL' Operator. Wouldn't it be time to support this notation as well, i.e., define '!=' as a SYNONYM for '\=' ????????????????????????????????????????? (or did you, Mike, have totally other intentions for the use of '!', which have never been implemented, or what, please?= I do find it CRYPTIC, by the way, that every computer language does use their own special charatcer, with a totally other meaning :-( Massa 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 |
Thomas (and others of a mathematical bent),
I don't believe that Mike has ever gotten sufficient credit for his arbitrary precision decimal arithmetic design incorporated in Rexx. If you want to see the ultimate implementation of Rexx arithmetic as implemented on the z/Series mainframe, Google: SA22-7832-07 The first link will be "z/OS V1R10.0 elements and features PDF files". Under "Contents", "System level", click on "z/Architecture Principles of Operation", which will download the bible of the mainframe. I'd recommend saving it as a PDF file on your machine. In the Principles of Operation, "Chapter 20, Decimal-Floating-Point Instructions" is devoted to the hardware implementation of Mike's Rexx arithmetic. You'll note that "Infinity" and "Not a Number" are valid values, and accessible to the (Assembler) programmer. Believe me, there's more answer there than you ever had question. How does this relate to Thomas' suggestion? Originally in Rexx, the "!" and "?" were not legal characters in a symbol (variable name) because they represented "Infinity" and "NaN" (the actual result of dividing by zero). These concepts are a part of decimal arithmetic, but at some point it was decided not to expose them to the programmer, so the "!" and "?" became legal characters in a symbol. Unfortunately, some (many) Rexx implementations allowed the "!" to be used both in symbols and as a negation operator. This overloading was an issue that the ANSI Standard committee spent an inordinate amount of time to resolve. The final decision was that there was to be "one, true, not-sign" and that was the reverse-virgule ("back-slash"). I would vehemently oppose any proposal to step backwards into the miasma of multiple glyphs for a single operator, even if it is not currently in use. Who knows when we might need a glyph for a new operator? Caveat: My interest in mathematics far exceeds my expertise. I leave it to Mike to correct any misstatements above. -Chip- On 10/1/11 09:57 Thomas Schneider said: > As all of you know, the exclamation point (!) has been regarded (as also > the question mark (?) as an ID-Chracter in classic Rexx/ooRexx. > > This is NO LONGER TRUE for NetRexx. There, they are currently invalid > characters. > > I've just re-read the NetRexx reference manual (nrl3.def), and did find > > *sooooo many* > > allowed (human oriented) denotations for NOT EQUAL. > > Will not repeat them here, by the way ... > > Now, as a matter of fact, so many computer Languages do use the > > '!=' (exclamation point, equal sign) > > as the valid NOT EQUAL' Operator. > > Wouldn't it be time to support this notation as well, i.e., define > > '!=' as a SYNONYM for '\=' > > ????????????????????????????????????????? > > (or did you, Mike, have totally other intentions for the use of '!', > which have never been implemented, or what, please?= > > I do find it CRYPTIC, by the way, that every computer language does > use their own special charatcer, with a totally other meaning :-( > > Massa Thomas. > > Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In reply to this post by ThSITC
The mismatch of operators between NetRexx and other programming languages
is problematic, and the use of "\" as both an escape character and a NOT operator is just part of the problem. Few if any other programming languages use the back slash as the NOT operator and none of the major ones (other than Rexx) do. While one cannot fault Mike for choosing compatibility with Rexx rather than compatibility with Java, the desire of Java programmers to use "!" as the NOT operator (in NetRexx) is certainly understandable. The IBM PL/I compilers provide options to specify the character to be used for the NOT operator and the OR operator, and the specification of alternate name characters. This was primarily to accommodate keyboard differences, but it does allow a certain amount of flexibility. I'm in favor of the limited ability to specify synonyms for various tokens. I don't see anything wrong with accommodating users who wants to use "!" for "\", or "and" for "&", "or" for "|" and "not" for "\". I don't think it can be argued that those uses are less readable or understandable. (But it would be a considerable headache to implement and would of course cause breakage.) On that point, I think any new version of NetRexx should do what HTML, XML, etc. do and require the identification of the exact language dialect at the beginning of the source file. It would be as simple as requiring a block comment at the beginning of a program instead of just recommending it. "netrexx" would be the manditory first token in that comment, and a dialect identifier the second. If not found, the baseline version would be assumed. The assumption that a language processor should be able to determine what dialect is being used is flawed, in my opinion, and that approach eliminates any keyword or other language extension problems. Bill On 10/1/2011 4:43 PM, Chip Davis wrote: > Thomas (and others of a mathematical bent), > > I don't believe that Mike has ever gotten sufficient credit for his arbitrary precision decimal arithmetic design incorporated in Rexx. > > If you want to see the ultimate implementation of Rexx arithmetic as implemented on the z/Series mainframe, Google: SA22-7832-07 > > The first link will be "z/OS V1R10.0 elements and features PDF files". > > Under "Contents", "System level", click on "z/Architecture Principles of Operation", which will download the bible of the mainframe. I'd recommend saving it as a PDF file on your machine. > > In the Principles of Operation, "Chapter 20, Decimal-Floating-Point Instructions" is devoted to the hardware implementation of Mike's Rexx arithmetic. You'll note that "Infinity" and "Not a Number" are valid values, and accessible to the (Assembler) programmer. Believe me, there's more answer there than you ever had question. > > How does this relate to Thomas' suggestion? > > Originally in Rexx, the "!" and "?" were not legal characters in a symbol (variable name) because they represented "Infinity" and "NaN" (the actual result of dividing by zero). These concepts are a part of decimal arithmetic, but at some point it was decided not to expose them to the programmer, so the "!" and "?" became legal characters in a symbol. > > Unfortunately, some (many) Rexx implementations allowed the "!" to be used both in symbols and as a negation operator. This overloading was an issue that the ANSI Standard committee spent an inordinate amount of time to resolve. The final decision was that there was to be "one, true, not-sign" and that was the reverse-virgule ("back-slash"). > > I would vehemently oppose any proposal to step backwards into the miasma of multiple glyphs for a single operator, even if it is not currently in use. Who knows when we might need a glyph for a new operator? > > Caveat: My interest in mathematics far exceeds my expertise. I leave it to Mike to correct any misstatements above. > > -Chip- > > On 10/1/11 09:57 Thomas Schneider said: >> As all of you know, the exclamation point (!) has been regarded (as also the question mark (?) as an ID-Chracter in classic Rexx/ooRexx. >> >> This is NO LONGER TRUE for NetRexx. There, they are currently invalid characters. >> >> I've just re-read the NetRexx reference manual (nrl3.def), and did find >> >> *sooooo many* >> >> allowed (human oriented) denotations for NOT EQUAL. >> >> Will not repeat them here, by the way ... >> >> Now, as a matter of fact, so many computer Languages do use the >> >> '!=' (exclamation point, equal sign) >> >> as the valid NOT EQUAL' Operator. >> >> Wouldn't it be time to support this notation as well, i.e., define >> >> '!=' as a SYNONYM for '\=' >> >> ????????????????????????????????????????? >> >> (or did you, Mike, have totally other intentions for the use of '!', >> >> I do find it CRYPTIC, by the way, that every computer language does >> use their own special charatcer, with a totally other meaning :-( >> >> Massa Thomas. >> >> > _______________________________________________ > Ibm-netrexx mailing list > [hidden email] > Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ -------------------------------------------------------------------- mail2web - Check your email from the web at http://link.mail2web.com/mail2web _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
> I'm in favor of the limited ability to specify synonyms for
> various tokens. > I don't see anything wrong with accommodating users who > wants to use "!" > for "\", or "and" for "&", "or" for "|" and "not" for "\". I > don't think it can be argued that those uses are less > readable or understandable. (But it would be a considerable > headache to implement and would of course cause > breakage.) A couple of downsides of this are that a) having learned that (say) '+' means 'add', one might then come across a program (written by an ex-BASIC programmer, perhaps) in which '+' now means 'concatenate'. In short, everything is "in the air" -- you'd have to read an entire program (and its subroutines) in case some symbol changes its meaning dynamically. b) allowing keywords (such as 'and') for operators really messes up the parsing rules, and the meaning of the blank operator. You'd need lots of special cases and new rules. Maybe better to keep things simple... A little historical point .. I did try and be compatible with C in my use of the % and // operators -- but I got it wrong because the C description I had got them backwards. <sigh> Chip wrote: > Originally in Rexx, the "!" and "?" were not legal characters in a > symbol > (variable name) because they represented "Infinity" and "NaN" > (the actual result of dividing by zero). These concepts are > a part of decimal arithmetic, but at some point it was > decided not to expose them to the programmer, so the "!" and > "?" became legal characters in a symbol. Not quite right ... they were allowed in symbols so they could be used to represent infinity & NaN. That just didn't make it into the math when Rex[x] was frozen for the product. > Unfortunately, some (many) Rexx implementations allowed the > "!" to be > used both in symbols and as a negation operator. This > overloading was an issue that the ANSI Standard committee > spent an inordinate amount of time to resolve. The final > decision was that there was to be "one, true, not-sign" and > that was the reverse-virgule ("back-slash"). I don't think it was ever used as a negation operator in Rexx (forward slash and the 'fallen L' were the ones I recall, also ~ on the PC). But in some code pages (German?) the ! and | charaters were at the same code point. <another sigh> Mike _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
On 10/2/11 13:54 Mike Cowlishaw said:
> Chip wrote: >> Originally in Rexx, the "!" and "?" were not legal characters in a >> symbol >> (variable name) because they represented "Infinity" and "NaN" >> (the actual result of dividing by zero). These concepts are >> a part of decimal arithmetic, but at some point it was >> decided not to expose them to the programmer, so the "!" and >> "?" became legal characters in a symbol. > > Not quite right ... they were allowed in symbols so they could be used to > represent infinity & NaN. That just didn't make it into the math when Rex[x] > was frozen for the product. Ah, that actually makes more sense. Too much reliance on memory and "Rexx folklore". :-) >> Unfortunately, some (many) Rexx implementations allowed the >> "!" to be >> used both in symbols and as a negation operator. This >> overloading was an issue that the ANSI Standard committee >> spent an inordinate amount of time to resolve. The final >> decision was that there was to be "one, true, not-sign" and >> that was the reverse-virgule ("back-slash"). > > I don't think it was ever used as a negation operator in Rexx (forward slash and > the 'fallen L' were the ones I recall, also ~ on the PC). But in some code > pages (German?) the ! and | charaters were at the same code point. <another > sigh> Right again. What I was remembering was that on the mainframe, the NOT operator was displayed as a '!' by many TN3270 clients by default. I worked on tons of code that looked like 'If x != 0 Then'. I also remember seeing it displayed as 'If x := 0 Then'. Needless to say, I never actually coded '!=' because there was no telling what the <shift-6> encoding would produce. You can always trust '\='. Thanks for setting the record straight. Now, have you considered writing a Redbook on how to use your new Decimal Floating Point opcodes? The twelve of us remaining Assembler programmers would appreciate it. ;-) -Chip- _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In reply to this post by Mike Cowlishaw
Mike,
On 10/2/2011 9:54 AM, Mike Cowlishaw wrote: >> I'm in favor of the limited ability to specify synonyms for >> various tokens. >> I don't see anything wrong with accommodating users who >> wants to use "!" >> for "\", or "and" for "&", "or" for "|" and "not" for "\". I >> don't think it can be argued that those uses are less >> readable or understandable. (But it would be a considerable >> headache to implement and would of course cause >> breakage.) > A couple of downsides of this are that > > a) having learned that (say) '+' means 'add', one might then come across > program (written by an ex-BASIC programmer, perhaps) in which '+' now means > 'concatenate'. In short, everything is "in the air" -- you'd have to read an > entire program (and its subroutines) in case some symbol changes its meaning > dynamically. Certainly the scope of definitions needs to be handled carefully, and I'm not suggesting that the facility be unlimited or overly dynamic. For example, the PL/I compiler facility to specify alternate characters is at the compile unit and implemented as a set of compiler options. In NetRexx definitions could be specified at the source file scope level, and be required to occur first. So the entire program would not have to be read, just the first few lines of the program source file of interest. Certainly Class or Method scope (or even statement level scope) could also be used, but is not necessary. The inconsistency across programming languages in the mapping of characters (or tokens) to operators (and also operator overloading where the meaning of an operator depends on its operands, much like methods) is a problem that could be addressed in general. As you point out, overloading the "+" character may be a slippery slope, although Java already does that, as in: println("Four is " + (2+2) ); On the other hand, overloading is a bit different from the problem of reserving the "\" character as the escape character and using another character as the NOT operator. Allowing different meanings of "+" is not quite the same as using "!" or "^" for negation. "\" need not be overloaded, just not used. If a Java programmer using NetRexx prefers to use "!" instead of "\" for negation, no doubt being able to do that would be useful to him. The SGML model of specifying a meta definition (DTD) and requiring it at the beginning of the source file is worth considering. I'm not suggested unlimited use of that approach, just the flavor of it. > b) allowing keywords (such as 'and') for operators really messes up the parsing > rules, and the meaning of the blank operator. You'd need lots of special cases > and new rules. Maybe better to keep things simple... As I said above, it could be difficult to implement. You have said language design should not be influenced by implementation considerations (such as parsing rules) for the convenience of the language processor developer, and I generally agree. I also agree that simplicity is best, but the price that may be paid is the use of tokens which are unfortunate choices for some programmers. > > A little historical point .. I did try and be compatible with C in my use of the > % and // operators -- but I got it wrong because the C description I had got > them backwards. <sigh> > > Chip wrote: > >> Originally in Rexx, the "!" and "?" were not legal characters in a >> symbol >> (variable name) because they represented "Infinity" and "NaN" >> (the actual result of dividing by zero). These concepts are >> a part of decimal arithmetic, but at some point it was >> decided not to expose them to the programmer, so the "!" and >> "?" became legal characters in a symbol. > Not quite right ... they were allowed in symbols so they could be used to > represent infinity & NaN. That just didn't make it into the math when > was frozen for the product. > >> Unfortunately, some (many) Rexx implementations allowed the >> "!" to be >> used both in symbols and as a negation operator. This >> overloading was an issue that the ANSI Standard committee >> spent an inordinate amount of time to resolve. The final >> decision was that there was to be "one, true, not-sign" and >> that was the reverse-virgule ("back-slash"). > I don't think it was ever used as a negation operator in Rexx (forward > the 'fallen L' were the ones I recall, also ~ on the PC). But in some code > pages (German?) the ! and | charaters were at the same code point. <another > sigh> > > Mike -------------------------------------------------------------------- mail2web - Check your email from the web at http://link.mail2web.com/mail2web _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In reply to this post by billfen
Hello Bill,
1.) thanks for your thoughts and feedback. 2.) For my personal General Parser Version, I therefore do held all those OPERATORS and VERBS defined in external files, read in once, when processing starts with another language. I did this, as in Rexx, there are various character's used in DenMark or Spain, for instance, in the Rexx sources I did find there. Did detect that when implementing my Y2K conversion tool (called do*it 1999) for COBOL (written in classic IBM Compiled Rexx those days. Even in Austria and Germany we had to use '!' instead of '|', as this character was NOT on the GERMAN IBM keyboard, as far as I do remember ... (I did use an IBM CMS ,machine and IBM VSE then back in 1994 ...) I could foward those control files to anybody interested. Send me a private mail when interested. Send also a mail, when I should simply INCLUDE it here at IBM NetRexx in a separate mail, so that we can discuss the whole approach, when you like. I'm thru with this my implementation for Rexx (any dialect) now :-) This technique does even allow for SYNONYMS, e.g. THROW=SIGNAL, *or* the definition of a LOCAL Language Version of NetRexx, for instance, a GERMAN NetRexx, using WENN=IF, SONST=ELSE etc The control files are Java RESOURCE Files in my JAR's, but when a customized version is avalaible on the PATH (*or* CLASSPATH), this *user version* takes precedence. RexxForm, the utility I'm just working on, will then standardize the source back to the so called prefered notation (the standard), by the way Thomas. ===================================================== Am 02.10.2011 01:59, schrieb [hidden email]: > The mismatch of operators between NetRexx and other programming languages > is problematic, and the use of "\" as both an escape character and a NOT > operator is just part of the problem. Few if any other programming > languages use the back slash as the NOT operator and none of the major ones > (other than Rexx) do. > > While one cannot fault Mike for choosing compatibility with Rexx rather > than compatibility with Java, the desire of Java programmers to use "!" as > the NOT operator (in NetRexx) is certainly understandable. > > The IBM PL/I compilers provide options to specify the character to be used > for the NOT operator and the OR operator, and the specification of > alternate name characters. This was primarily to accommodate keyboard > differences, but it does allow a certain amount of flexibility. > > I'm in favor of the limited ability to specify synonyms for various tokens. > I don't see anything wrong with accommodating users who wants to use "!" > for "\", or "and" for "&", "or" for "|" and "not" for "\". I don't think > it can be argued that those uses are less readable or understandable. (But > it would be a considerable headache to implement and would of course cause > breakage.) > > On that point, I think any new version of NetRexx should do what HTML, XML, > etc. do and require the identification of the exact language dialect at the > beginning of the source file. It would be as simple as requiring a block > comment at the beginning of a program instead of just recommending it. > "netrexx" would be the manditory first token in that comment, and a dialect > identifier the second. If not found, the baseline version would be assumed. > > The assumption that a language processor should be able to determine what > dialect is being used is flawed, in my opinion, and that approach > eliminates any keyword or other language extension problems. > > Bill > > On 10/1/2011 4:43 PM, Chip Davis wrote: >> Thomas (and others of a mathematical bent), >> >> I don't believe that Mike has ever gotten sufficient credit for his > arbitrary precision decimal arithmetic design incorporated in Rexx. >> If you want to see the ultimate implementation of Rexx arithmetic as > implemented on the z/Series mainframe, Google: SA22-7832-07 >> The first link will be "z/OS V1R10.0 elements and features PDF files". >> >> Under "Contents", "System level", click on "z/Architecture Principles of > Operation", which will download the bible of the mainframe. I'd recommend > saving it as a PDF file on your machine. >> In the Principles of Operation, "Chapter 20, Decimal-Floating-Point > Instructions" is devoted to the hardware implementation of Mike's Rexx > arithmetic. You'll note that "Infinity" and "Not a Number" are valid > values, and accessible to the (Assembler) programmer. Believe me, there's > more answer there than you ever had question. >> How does this relate to Thomas' suggestion? >> >> Originally in Rexx, the "!" and "?" were not legal characters in a symbol > (variable name) because they represented "Infinity" and "NaN" (the actual > result of dividing by zero). These concepts are a part of decimal > arithmetic, but at some point it was decided not to expose them to the > programmer, so the "!" and "?" became legal characters in a symbol. >> Unfortunately, some (many) Rexx implementations allowed the "!" to be > used both in symbols and as a negation operator. This overloading was an > issue that the ANSI Standard committee spent an inordinate amount of time > to resolve. The final decision was that there was to be "one, true, > not-sign" and that was the reverse-virgule ("back-slash"). >> I would vehemently oppose any proposal to step backwards into the miasma > of multiple glyphs for a single operator, even if it is not currently in > use. Who knows when we might need a glyph for a new operator? >> Caveat: My interest in mathematics far exceeds my expertise. I leave it > to Mike to correct any misstatements above. >> -Chip- >> >> On 10/1/11 09:57 Thomas Schneider said: >>> As all of you know, the exclamation point (!) has been regarded (as also > the question mark (?) as an ID-Chracter in classic Rexx/ooRexx. >>> This is NO LONGER TRUE for NetRexx. There, they are currently invalid > characters. >>> I've just re-read the NetRexx reference manual (nrl3.def), and did find >>> >>> *sooooo many* >>> >>> allowed (human oriented) denotations for NOT EQUAL. >>> >>> Will not repeat them here, by the way ... >>> >>> Now, as a matter of fact, so many computer Languages do use the >>> >>> '!=' (exclamation point, equal sign) >>> >>> as the valid NOT EQUAL' Operator. >>> >>> Wouldn't it be time to support this notation as well, i.e., define >>> >>> '!=' as a SYNONYM for '\=' >>> >>> ????????????????????????????????????????? >>> >>> (or did you, Mike, have totally other intentions for the use of '!', > which have never been implemented, or what, please?= >>> I do find it CRYPTIC, by the way, that every computer language does >>> use their own special charatcer, with a totally other meaning :-( >>> >>> Massa Thomas. >>> >>> >> _______________________________________________ >> Ibm-netrexx mailing list >> [hidden email] >> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ > -------------------------------------------------------------------- > mail2web - Check your email from the web at > http://link.mail2web.com/mail2web > > > > _______________________________________________ > 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 |
In reply to this post by ThSITC
On Sat, Oct 1, 2011 at 06:57, Thomas Schneider
<[hidden email]> wrote: > > '!=' (exclamation point, equal sign) > > as the valid NOT EQUAL' Operator. > > Wouldn't it be time to support this notation as well I agree. I don't think we'll break anything if NetRexx ends supporting both \= and != interchangeably. Just makes it even MORE "human readable". What would be the change after all? an "OR" somewhere and the additional token. This is one of the few instances (of the suggestions I've read so far) where changing the syntax would ease readability and not have any side-effects. Just my $0.02 FC _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
Free forum by Nabble | Edit this page |