|
All, 1) I don't like expressions that require me to stop and think about what they are doing. Perhaps it is because I was not raised on 'C', but a quick glance at a statement like "namedIndicator = (var1 = var2);" just isn't intuitive. RPG has abandoned many of its old abbreviations and shortcuts (like conditioning and resulting indicators) for the sake of readability, so why begin using obscure techniques from other languages? I always ask myself whether saving a few lines of code with a cute trick is "worth it". 2) for toggling logical values, "Ind = not Ind" is more clear to me. JK
My $0.02... I like: var1 = ( var2 = var3 ); and I hate: var1 = var2 = var3; I think the first version makes it much clearer that var1 is set to the value of an expression, whereas the second version could be taken (incorrectly) to mean that var1 and var2 both take the value of var3. Also, to 'toggle indicators, I use this a lot: Ind = ( Ind = *off ); Rory On 12/13/06, AGlauser@xxxxxxxxxxxx <AGlauser@xxxxxxxxxxxx> wrote:Do people like or dislike this type of code: /free var1 = (var2 = value); namedIndicator = (var1 = var2); /end-free Thanks in advance for any opinions, Adam
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.