I've recently started using Free-form RPG in my programming and I just wanted to share a few things I've learned. Here's a list of basic things I've learned working with Free-form format:
1. To use Free-form the code should be enclosed inside the
following tags:
/FREE
code
.
.
.
/END-FREE
2. All statements MUST end with a semicolon(
3. The Result field is loacted at the left of the operation:
Sum = A + B;
Temp = 'abc';
4. The Equal sign(=) is used in place of the MOVE operation.
5. The %EOF(filename) command removes the need to set an Eof indicator in the READ statment.
6. Free-form is not position specific. Code can be indented for better readability.
1. To use Free-form the code should be enclosed inside the
following tags:
/FREE
code
.
.
.
/END-FREE
2. All statements MUST end with a semicolon(
3. The Result field is loacted at the left of the operation:
Sum = A + B;
Temp = 'abc';
4. The Equal sign(=) is used in place of the MOVE operation.
5. The %EOF(filename) command removes the need to set an Eof indicator in the READ statment.
6. Free-form is not position specific. Code can be indented for better readability.