Initialize Statement
When the optional initialize statement is used, it must be the first statement in the frame script.
The initialize statement can have a parameter list that declares the parameters of a frame. Variables declared as frame parameters may be specified as parameters of the callframe, openframe, and gotoframe statements. For more information about these statements, see the Language Reference Guide online help.
Declare local variables that are not parameters and forward references to local procedures in the declare section of the initialize statement. If a declare block is not followed by a begin block of initialization statements, enddeclare is required at the end of the local variable declarations in the declare block.
You can use local variables declared in the initialize statement anywhere in the frame script or in any of the field or menu item scripts associated with the frame.
A local variable can be a simple variable of any acceptable base data type or a reference or array variable of any named user or system class. For more information about declaring variables, see "Language Elements" in the Language Reference Guide.
The local variables you declare with the initialize statement are in addition to the automatically declared variables that are associated with named fields and menu items. (You do not need to explicitly declare the variables associated with named fields and menu items.)
When you use the statement block, which is delimited by the keywords begin and end, OpenROAD executes the statements in this block when the frame is started, before displaying the frame on the window. You can use this statement block to perform any start-up operations, such as loading a table field or setting variables.
You may use the curly brackets { and } in place of the keywords begin and end.