A 4GL script can contain one or more of the following types of sections:
If you do not include a main section immediately before a subsection, the subsection is assigned to the previous main section in the script. For example:
form.1: | main section
init.form: | subsection executed for form 1
...
...
before.form: | subsection executed for form 1
...
...
after.form: | subsection executed for form 1
...
The following rules apply to the ordering of sections within a script:
- Program sections
- Form sections
- Group sections
- Choice sections
- Field sections
- Zoom sections
- Main table sections
If you do not include a main section immediately before a subsection, the subsection is assigned to the previous main section in the script. For example:
form.1: | main section
init.form: | subsection executed for form 1
...
...
before.form: | subsection executed for form 1
...
...
after.form: | subsection executed for form 1
...
The following rules apply to the ordering of sections within a script:
- The declaration section must be the first section in the script.
- The functions section must be the last section in the script.
- Other sections can occur in any order, but the preferred order is: program sections, form sections, group sections, choice sections, field sections, zoom sections, main table sections.
- Do not mix sections of different types. For example, do not define a choice section, followed by a field section, and then a choice section again. Exceptions are the declaration and functions sections, which must be the first and last sections respectively in the script.
0 comments:
Post a Comment