|
Roger Harman wrote on 13/12/2006 12:51:21 PM:
If RPG used a different operator for equivalency and assignment or had a ternary operator, it would be much clearer. More flexible with the ternary operator too.
I agree that a different operator for equivalency and assignment makes things much clearer. On the other hand, it can be a royal PITA until it becomes second nature.
var1 = ((var 2 == value) ? ValueIfTrue : ValueIfFalse );
I've always found this type of construct a bit opaque. It can be pretty handy sometimes though. In terms of my
var1 = (var2 = value);
example, I meant assigning the same value to var1 and var2, rather than comparing var2 to value. I should have been clearer about that. ##################################################################################### Attention: The above message and/or attachment(s) is private and confidential and is intended only for the people for which it is addressed. If you are not named in the address fields, ignore the contents and delete all the material. Thank you. Have a nice day. For more information on email virus scanning, security and content management, please contact administrator@xxxxxxxxxxxx #####################################################################################
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.