|
Myself, I avoid MOVE and MOVEL like the plague. I've seen too much code like: C MOVER SOMEVAR KEYFLD C MOVE OTHERVR KEYFLD C MOVE YETANOT KEYFLD and from this I have to figure out what the heck KEYFLD contains. First I have to figure out what the lengths of SOMEVAR, OTHERVR and YETANOT are, and what KEYFLD is, then figure out which bytes in the KEYFLD get overlain with each move. If I'm maintaining that code, I make KEYFLD a DS and (pre EVAL) MOVE into each of the parts. Now my code is self explanatory. You want to know what KEYFLD is going to contain, you have one place to look, the KEYFLD DS which tells you exactly what it's going to contain when all is said and done. And when EVAL came in, even better yet, EVAL into the sub-fields. Even more self explanatory. I come from the school of thought that I will code 5 extra lines of code if it makes my code more self explanatory to the maintenance programmer who follows me 3 years from now. Or myself when I have to revisit this code in 4 months. If I have to make a simple fix I would rather go through well self-documenting code and be able to figure out the logic and make a change/fix in 5 minutes then spend 20 minutes trying to figure out what the programmer was smoking the day s/he wrote this pile of spaghetti. Regards, Jim Langston -----Original Message----- From: Joe Pluta [mailto:joepluta@PlutaBrothers.com] Thank you, Jim. You've made my point quite eloquently. ...
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.