Program and Library Modules

Declares the name of a module, and identifies the variables, procedures, and events that it contains.


[ Program [ = ] program_name
| Library library_name ]

[ Where attribute = constant ]

[ statements ]


Optional keyword that identifies the start of a program module. If you do not supply Program or Library, the default is Program. Then the program immediately runs the code in statements.
Mandatory after Program, the name of the program. ViviFire makes the program file with this name. If you do not use Program or Library, 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.
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.
Optional keyword you can use again and again.
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.
Mandatory literal value related to an attribute. It can be a string or a version number.
Optional declarations and statements that can run.


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.



See also