|
Setting a logical variable based on the value of an expression! How mean is
that. I can't wait to use it...
-----Message d'origine-----De la part de Aaron Bartell
De : rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
Envoy? : mercredi 7 janvier 2009 14:03
? : RPG programming on the IBM i / System i
Objet : Re: Niftiest thing(s) you have done in RPG ILE or /FREE
I wonder if you changed the question to be more pointed towards certainconcepts if you would get more >responses. For example, if you asked "what
are some cool things you can do in one line of code" then I would >think
back to something I learned early on that some programmers still don't know
you can do:
Long way...
D custIsVld s n
D custNbr s 10 0
/free
if custNbr > 0;
custIsVld = *on;
else;
custIsVld = *off;
endif;
/end-free
Short way...
D custIsVld s n
D custNbr s 10 0
/free
custIsVld = (custNbr > 0);
/end-free
--
PRIVACY WARNING: For auditing purposes, a copy of this message has been
saved in a permanent database.
--
PRIVACY WARNING: For auditing purposes, a copy of this message has been
saved in a permanent database.
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.10.4/1880 - Release Date: 1/7/2009 8:49 AM
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.