10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ScriptsDeclare local variables that are not parameters and forward references to localprocedures in the declare section of the initialize statement. If a declare blockis not followed by a begin block of initialization statements, enddeclare isrequired at the end of the local variable declarations in the declare block.You can use local variables declared in the initialize statement anywhere in theframe script or in any of the field or menu item scripts associated with theframe.A local variable can be a simple variable of any acceptable base data type or areference or array variable of any named user or system class. For moreinformation about declaring variables, see Language Elements (see page 19).The local variables you declare with the initialize statement are in addition tothe automatically declared variables that are associated with named fields andmenu items. (You do not need to explicitly declare the variables associatedwith named fields and menu items.)Frame Script Event BlocksWhen you use the statement block, which is delimited by the keywords beginand end, OpenROAD executes the statements in this block when the frame isstarted, before displaying the frame on the window. You can use thisstatement block to perform any start-up operations, such as loading a tablefield or setting variables.You may use the curly brackets { and } in place of the keywords begin andend.A frame script can include one or more event blocks. These blocks can containframe events or events for any field or menu item defined for the frame.An event block is a sequence of statements associated with one or morespecific events. The syntax for an event block is:on event [variablename]{, on event [variablename]} =[declarelocalvariablelist[enddeclare]]beginstatementlistend[;]When the event occurs, OpenROAD executes the statements specified by thestatementlist.Writing Scripts and Procedures 69

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!