Compiling form files

Form specification files (with .per file extension) must be compiled to runtime form files (with .42f file extension) by using the fglform tool. Compiled form files are XML independent from the platform and processor architecture.

The following lines show a compilation in a UNIX™ shell session:

$ cat form.per
LAYOUT
GRID
{
[f01   ]
}
END
END
ATTRIBUTES
f01 = FORMONLY.field1;
END

$ fglform form.per

$ ls -s form.42f
   4 form.42f

If an error occurs, the compiler writes an error file with the .err extension.

$ cat form.per
LAYOUT
GRID
{
}

$ fglform form.per
The compilation was not successful.  Errors found: 1.
 The file 'form.err' has been written.

$ cat form.err
LAYOUT
GRID
{
}
# A grammatical error has been found at '}', expecting SCR_TEXT.
# See error number -6803.

With the -M option, you can force the compiler to display an error message instead of generating an .err error file (line break added for documentation readability):

$ fglform -M form.per
form.per:4:1:4:1:error:(-6803)
 A grammatical error has been found at '}', expecting SCR_TEXT.

By default, the compiler does not raise any warnings. You can turn on warnings with the -W option:

$ cat form.per
LAYOUT
GRID
{
[f01     ]
}
END
END
ATTRIBUTES
f01 = FORMONLY.field1, WIDGET="COMBO";
END

$ fglform -Wall form.per
form.per:9: warning (-8005) Deprecated feature: The WIDGET attribute is obsolete