613-518-1166 info@zimdatabases.com

ZIM Language Reference

$compilestatus

< All Topics

Checks if an application program needs to be recompiled.

Syntax

$compilestatus(docname)

Parameters

docname the name of an application document (not in quotation marks)

Return Value

Number, with no decimal places.

Comments

$compilestatus checks, in order, a series of conditions in relation to docname. As soon as docname fails to meet a condition, $compilestatus returns the code number (1 through 8) associated with that condition. If docname meets all the conditions, $compilestatus returns a 0.

A $compilestatus expression can be compiled, but its value is fixed at compile time and does not change thereafter.

Code Condition
1 The docname is not currently compiled.
2 The source file for docname is missing.
3 The compiled file for docname is missing.
4 The source file bears a date more recent than that of the compiled file.
5 No dependency information could be found for docname.
6 The dependency information predates the most recent compile and could therefore be out of date.
7 An object that docname depends on could not be found, it can be erased or located in an unaccessed directory.
8 An object that docname depends on has been modified since docname was last compiled.
0 No inconsistencies in the compilation status of docname were noted.

Example

let status = $compilestatus(MyZIMProgram)

case

when status = 0

output “No need to compile”

when status =2

output “No source file”

when status = 7

output “Could not find a dependent object”

otherwise

compile MyZIMProgram

endcase


See Also

About Functional Expressions

DEPENDENCY

SET DEPENDENCY

SET XREF

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Table of Contents