× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




Hey Guys!

I just wrote something nifty, thanks to Aaron.

Instead of :


If %Parms < 4;

executeWithoutTheOptionalParameter ( );

Else;

executeWithTheOptionalParameter ( );

EndIf;



I wrote :

MyParameterReceived = ( %PARMS > 4 ); // At the beginning of the procedure

// Elsewhere in the procedure.
If MyParameterReceived ;
executeWithTheOptionalParameter ( );
Else;
executeWithoutTheOptionalParameter ( );

EndIf;

Well, I thought it was nifty.

________________________________
Aaaron wrote a while ago:
I wonder if you changed the question to be more pointed towards certain concepts 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


Every time I get involved with a project with another developer/customer I learn a bunch of tidbits that make my code better, compiling easier, or best practices better. The people on this list could write a book on all those cool things, but its all in how to ask the question.

Does the above qualify as at least a smaller nifty thing? :-)

Aaron Bartell
http://mowyourlawn.com<http://mowyourlawn.com/>


Adam West wrote:
I haven't seen too much as yet.

David FOXWELL
Service Informatique
Tél : 03 90 23 91 63
david.foxwell@xxxxxxxxx<mailto:david.foxwe@xxxxxxxxx>

P Pensez à l'environnement avant d'imprimer ce message


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.