Category: ZIM 4GL Language Reference

The Original Internet Language

Checking If a Program is Compiled

You can use one of the following methods to determine if a program has been compiled: Use the $compilestatus function to check the compilation status of the program. Run the Object Browser ( ZXLISTER) administrative utility. Any application document containing a compiled program shows a “-c” suffix following the file name. Attempt to use the…
Read more

The Lifetime of a Compiled Program

You can recompile an application program at any time. Recompiling replaces the existing compiled version of the program with a new compiled version. Recompiling is necessary if a compiled program becomes invalid for one of the following reasons: The source version of the program has been updated. Changes to the source program are not automatically…
Read more

About the Correct Use of Objects in a Compiled Program

Source and compiled programs sometimes behave in different ways, particularly in how they treat certain objects. Special considerations apply both to permanent objects and to temporary objects (i.e., temporary result sets).

About the Effect on Result Sets

Within programs that are to be compiled, references to result sets (created by set-processing commands) require special care. References to result sets can create problems, because the order in which the Compiler processes a program could be different from the order of execution. Problems can be avoided by creating permanent result sets (set objects) in…
Read more

Recommendations for Compiling References to Result Sets

Most problems with references to named sets can be alleviated by adhering to the following guidelines: Qualify set operations by explicitly giving the set name where possible (e.g., next set1, top set1) rather than letting the software implicitly assume the current set. Declare set objects in the database, forcing the software to check the structure…
Read more

Potential Problems

The Compiler works from top to bottom through a program, reading every command line and disregarding programming structures and the flow-of-control commands (such as IF&ldots;ENDIF, WHILE&ldots;ENDWHILE, BREAT, CONTINUE, RETURN, STOP, and BYE). During compilation, the software creates a result set for every set-processing command that implicitly or explicitly produces a result set. For example, compilation…
Read more

Examples

The examples that follow illustrate how result set references are compiled and indicate situations to be avoided. Example 1 procedure test()   find all Employees -> EmpSet   . . . other non-FIND commands . . .   find all Departments -> DeptSet   . . . other non-FIND commands . . .endprocedure   This procedure contains two set-processing commands that create result…
Read more

Effect on Permanent Objects

In the context of compiled programs, the term permanent object refers to any object that, once created in the application database (based on a definition in the Object Dictionary), persists until erased. Permanent objects include EntitySets, relationships, roles, application documents, application directories, windows, menus, displays, forms, constants, variables, and permanent result sets (set objects). Application…
Read more

About Compiling and Deploying Programs

With a few exceptions, all Zim application programs can be compiled. Compiling one or more programs in an application carries several benefits, including security, speed of execution, and minimized resource use. This section discusses the compiler, prerequisites for compiling programs, adjustments to be made to application programs before compiling, and the commands used to compile…
Read more

How to Call a Compiled Program

A compiled program is called in the same manner as any other application program. For example, if you have compiled a procedure program called RunTest, call it as follows RunTest () Appropriate expressions would be entered within the parentheses (if required). If it is necessary to run a program disregarding its compilation, the command: SET…
Read more

en_CAEnglish