I'm a dinosaur and probably the only RPG programmer left that doesn't think /FREE RPG is easier to read. In the past few months I've been tasked to fix some code left over by a consultant. The code is half FREE and half FIXED in many places and very hard for me to read.
One of the things I've done to help me with my task is get rid of the /FREE and get it back to FIXED. It's clean now.
I'm guessing /FREE is great in the hands of a true artist where everything is indented clean, but still, it still looks like a mess to me. Way back in the day when I coded BASIC and everything I did was free format, I had the same issues
Before I changed the FREE backed to fixed I tried aligning everything but what a hassle that was.
I don't have a smart editor that will align my code. Everything is green screen for me and this leads to code everywhere.
Here is an example of what I mean. I think the fixed format is cleaner and easier to read than the FREE version.
I'm fairly certain that I will probably jump languages or retire before I ever accept /FREE in my daily routine.
One of the things I've done to help me with my task is get rid of the /FREE and get it back to FIXED. It's clean now.
I'm guessing /FREE is great in the hands of a true artist where everything is indented clean, but still, it still looks like a mess to me. Way back in the day when I coded BASIC and everything I did was free format, I had the same issues
Before I changed the FREE backed to fixed I tried aligning everything but what a hassle that was.
I don't have a smart editor that will align my code. Everything is green screen for me and this leads to code everywhere.
Here is an example of what I mean. I think the fixed format is cleaner and easier to read than the FREE version.
Code:
********************************************************************* ***** Get Last Month ***** ********************************************************************* C GetDate BegSr /Free //Convert UDate to YMD & Subtract 1 Day TodayDt = %Date(UDate) - %Days(1); PrvMth = %Dec(TodayDt); /End-Free C Move PrvMth LastMth C EndSr Versus *------------------------------------------------------------------------------------------- * Get Last Month *------------------------------------------------------------------------------------------- C GetDate BegSr C eval TodayDt = %Date(UDate) - %Days(1) C eval PrvMth = %Dec(TodayDt) C Move PrvMth LastMth C EndSr * -------------------------------------------------------------------------------------------
Comment