|
Scott, As far as I can tell, there's no actual ADVANTAGE to using special > characters like @ and $ in your variable names. But there are > disadvantages, so why do it? > The (former) "advantage" was attempting to convey as much meaning as possible in short field names. This was particularly true when dealing with the 6 char length restrictions of legacy code. So it became somewhat natural for non-international aware programmers to use $ as a field suffix to connotate currency amounts, # for numbers (or perhaps weight), and @ for something else (eg, I've seen it used as a shop standard for fields holding a percentage). As a fieldname prefix, the letters sometimes held some other shop meaning, such as Michael's comment that he "immediately knew the field was program described". Alas, even with the longer field names readily available in RPG IV, there can be hordes of code using externally described files still with 6-char field names. So the usage may live on at shops which have no (current) plans to support international installs. That said, I fully agree that even for those who think the code will only ever be used in their own locale, it is a good idea to avoid the use of those characters in new work. Doug
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.