|
The language grammar needs to clearly define where an opcode/command is used vs some other value. RPG doesn't really have a grammar today. Also, the current CALLP opcode does not require parens on proc calls. I wish it did because it would make it easier to teach--people don't understand how they can have a proc name and a variable with the same name. I don't know why we can have it in the language myself. Anyway, C CALLP MyProc() Is very acceptable to me. But then it would not be consistent with the F & D specs Keywords. We have to remember that things need to be "RPG like" in design. We are not C programmers. If we are, then use C it is already on the AS/400. But even C doesn't require that stupid COLON: separator. Bob Cozzi http://www.RPGIV.com > -----Original Message----- > From: owner-rpg400-l@midrange.com [mailto:owner-rpg400-l@midrange.com]On > Behalf Of Buck Calabro > Sent: Thursday, August 12, 1999 10:35 AM > To: 'RPG400-L@midrange.com' > Subject: Using reserved words as variable names WAS: CF-Spec - another > call for opinions > > > John, > I completely agree with you and Colin that breaking a working > program is not > the best course of action that a compiler writer can take, but I > think that > the risk of doing that in RPG IV is a vanishingly small one. Here are the > opcodes added by release (I culled them by comparing the online > manuals. I > may have missed one): > > V3R6: > CALLB, CALLP, DOU, DOW, EVAL, EXTRCT, IF, WHEN > V3R7, V4R1: > ALLOC, DEALLOC, REALLOC > V4R2, V4R3: > *none > V4R4: > EVALR > > BASIC doesn't need LET X=1, why should RPG IV need EVAL X=1? > > If we could use the SQL convention to distinguish between a reserved word > and a variable, I think that the impact would be very minimal, because we > wouldn't have to rename our newly ambiguous fields, merely put > quotes around > them. Editor "scan and replace" makes that fairly painless, and > we wouldn't > have to worry about trying to rename database fields, either. > > As far as *BLANK goes, I can't tell you the number of times I've > coded a CL > line like this: IF (&INPUT *EQ *BLANKS) DO(...) and wondered why > the darned > thing didn't work right. The 400 is already a multi-language box, and we > already have one convention for dealing with reserved words (in SQL) - why > not re-use that? > > Very humbly, > Buck Calabro > > > -----Original Message----- > > From: John P Carr > > Sent: Thursday, August 12, 1999 8:34 AM > > To: RPG400-L > > Subject: RE: CF-Spec - another call for opinions > > > > Colin said; > > >I beg to differ. Having to change source on an upgrade is a very big > > >deal. Thats the sort of thing that prevents people from upgrading! > > > > I can see it now, 2-3 years after the CF's are in, a person > goes into > > a source member, makes a one line change, and the compile listing > > tells her/him that they have to change a half dozen variable names > > because "now" they are keywords. > > > > "It used to work, Now it don't , What the @#$%@ did they do? " > > > > One thing about *ON, *OFF, *ZERO, *BLANK You never confused them > > with your variable names. > > > > John Carr > > > > > > > > +--- > > | This is the RPG/400 Mailing List! > > | To submit a new message, send your mail to RPG400-L@midrange.com. > > | To subscribe to this list send email to RPG400-L-SUB@midrange.com. > > | To unsubscribe from this list send email to > RPG400-L-UNSUB@midrange.com. > > | Questions should be directed to the list owner/operator: > > david@midrange.com > > +---END > +--- > | This is the RPG/400 Mailing List! > | To submit a new message, send your mail to RPG400-L@midrange.com. > | To subscribe to this list send email to RPG400-L-SUB@midrange.com. > | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. > | Questions should be directed to the list owner/operator: > david@midrange.com > +---END > > +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---END
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.