Program
and Library
Modules
Declares the name of a module, and identifies the variables, procedures, and events that it contains.
Syntax
[ Program [ = ] program_name
| Library library_name ]
[ Where attribute = constant ]
…
[ statements ]
Parts
Program
- Optional keyword that identifies the start of a program module.
If you do not supply
Program
orLibrary
, the default isProgram
. Then the program immediately runs the code instatements
. program_name
- Mandatory after
Program
, the name of the program. ViviFire makes the program file with this name. If you do not useProgram
orLibrary
, the name of the program is related to the name of the module file. - If you put the operator
=
before it,program_name
specifies the procedure that runs the program. library_name
- Mandatory after
Library
, the name of the library. It can have one or more names with a dot (.
) between each. The sequence of names before the last one specify its namespace. Where
- Optional keyword you can use again and again.
attribute
- Mandatory after
Where.
, the name of a module attribute. module attributes are pieces of metadata that you supply. You can see some attributes in the file properties of the program file. But you can also use them to select one library from several with the same name. constant
- Mandatory literal value related to an attribute. It can be a string or a version number.
statements
- Optional declarations and statements that can run.
Instructions
After optional comments, one of the keywords Program
or Library
can start the code in a source file.
The program module, which can start with Program
, specifies where the program starts to run.
A library module, which starts with Library
, specifies code that you can only use from other program and library modules.
Examples
TODO