HSCRIPT File Formatđź”—
HDevelopEVO programs consist of plain text files with the file extension .hscript
.
Calling Operatorsđź”—
When using one of the HALCON operators, HDevelopEVO behaves identical to HDevelop, with this general signature of an operator:
More Info
See Basic Types of Parameters in the Reference of the HALCON Script Language.
Declaring and Calling Proceduresđź”—
In HDevelopEVO, you write the code of a procedure just as you write the “main” program part, as procedures are just a part of the program file. Procedures are distinguished by certain keywords.
Adhere to the following:
- A procedure must start with one
proc
statement and end with oneendproc
statement. - You can either use a dedicated
main
procedure or put all lines of code that are not part of a procedure (“standalone statements”) at the end of the program. That means: In the HSCRIPT file, all procedures (that is, allproc ... endproc
blocks) must come before any standalone statements. - There can only be one procedure called
main
. If this procedure exists (that is, if there is aproc main (...) endproc
block), it serves as the entry point of the program. In this case, themain
block does not need to be at the end, but there must not be any further standalone statements. -
Parameters are defined using the following keywords:
-
Iconic input:
object
keyword -
Control input:
tuple
keyword -
Iconic output:
out object
keyword -
Control output:
out tuple
keyword
-
-
Parameters must be separated by , (commas).
proc proc_name (object InputImage, tuple InputParam, out object OutputImage, out tuple OutputParam)
(...)
endproc
When declaring a procedure, the order of the parameter types (iconic in, control in, iconic out, control out) is not fixed.
Example
The following two declarations both are valid and do the same:
proc initialize_visualization_1 (tuple Width,
tuple Height,
out tuple WindowHandle,
out tuple WindowHandleText)