|
Hi, I also like to distinguish between global and local variables. Globals are prefixed with gbl and locals with loc. Even though using special signs, such as $, #, _ and § will make the variable names very special and easy to find, I'd suggest to avoid them. Special signs are NOT international. As you can see I did not list @, because it is not allowed in our German code. Instead of @ we have to use §. I think in other codes other special sings have to be used. And believe me it's a real pain, to replace all @ signs through § if we get code from an American machine. Mit freundlichen Grüßen / Best regards Birgitta Hauser "Shoot for the moon, even if you miss, you'll land among the stars." (Les Brown) "If you think education is expensive, try ignorance." (Derek Bok) -----Ursprüngliche Nachricht----- Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im Auftrag von Kurt Anderson Gesendet: Monday, December 11, 2006 22:05 An: RPG programming on the AS400 / iSeries Betreff: Naming Global Variables I know when it comes to Naming everyone has their own method, good or bad. But I was curious if anyone had any standards for naming their global variables. I prefix mine with G@ which I don't particularly like sometimes, but I do want the variable name to be noticeably different when someone is in a procedure so they know the variable is global. One common example of when I do this is for an RRN field. Also, for those of you who do prefix global variables, do you use that prefix when the variable is only ever used in an entry module's mainline code? Kurt Anderson Application Developer Highsmith Inc. W5527 State Road 106, P.O. Box 800 Fort Atkinson, WI 53538-0800 TEL (920) 563-9571 FAX (920) 563-7395 EMAIL kjanderson@xxxxxxxxxxxxx
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.