Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to convert this line to free format

Status
Not open for further replies.

thelearner

Programmer
Jan 10, 2004
153
US
I'm a beginner and need help in convert this line.
c 1 do 30 count

Also is there any way I can define a field length without coding it in the D spec? I want to avoid extra line of coding. In the fix format I can just define it on the same line of the above sample.
thank!
 
There is no free format equivalent for do you have to use for

/ free

for count = 1 to 30
.....
end for

/end-free

As for defining fields I recommend always using D specs, it's what they are for.

--------------------------------
Codito, ergo sum
 
It's "EndFor", not "End For".

RedMage1967
IBM Certifed - RPG IV Progammer
 
Whoops, well spotted.

--------------------------------
Codito, ergo sum
 
The compiler would have found it as well, just figure to save you the hassle. "End For" is the VB way to end a for loop.

RedMage1967
IBM Certifed - RPG IV Progammer
 
just to add the third edition of Programming in RPG IV is now completely written ustilizing the Free Format.

Programming in RPG IV
Third edition
By Bryan Meyers and Judy Yaeger

I purchased the second addition some time ago and it was a book I enjoyed reading when I needed to use RPG. When I saw the new edition was based off Free I immediatly went out and got it and was also pleased with the read and help it provided.

with the book (and I'm sure there are plenty others out) converting jsut about 90% of my work over was a easy process more so if I tried without the resource.
Get out and get one. it's worth the lack of headaches

___________________________________________________________________
onpnt2.gif

The answer to your ??'s may be closer then you think.
Check out Tek-Tips knowledge bank by clicking the FAQ link at the top of the page
 
RedMage1967

Just finished working on a VB app when I answered the post, might explain the typo.

--------------------------------
Codito, ergo sum
 
gpzcrasher

no problem, happens to me as wel

RedMage1967
IBM Certifed - RPG IV Progammer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top