$compilestatus

$compilestatus

Welcome to our Knowledge Base

Documentation | Blog | Demos | Support

< All Topics
Print

$compilestatus

Checks if an application program needs to be recompiled.

Syntax

$compilestatus(docname)

Parameters

docnamethe 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.

CodeCondition
1The docname is not currently compiled.
2The source file for docname is missing.
3The compiled file for docname is missing.
4The source file bears a date more recent than that of the compiled file.
5No dependency information could be found for docname.
6The dependency information predates the most recent compile and could therefore be out of date.
7An object that docname depends on could not be found, it can be erased or located in an unaccessed directory.
8An object that docname depends on has been modified since docname was last compiled.
0No 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
Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

pt_BRPortuguese