10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

PreprocessorFor frames that may have separate scripts in many components (fields, menuitems), be careful about defining a macro variable in one script and using it inanother. The only thing you assume about script ordering is that compositescripts appear before the scripts of the composite's child fields.You use the #define statement to create your macro variables as detailed inThe #define Statement (see page 437).For more information about using the Macro Variable Editor, see the User<strong>Guide</strong>.Built-in Macro VariablesOpenROAD defines built-in macro variables during preprocessing. You can usethem in your 4GL scripts, but you must not change their values.The built-in macro variables are:$_ApplicationNameSpecifies the name of the current application$_CurFldSpecifies the full name of the current field, for example: fldname,comp.fldname, or tblfd[*].fldname (defined in field scripts only)$_CurFldRowSpecifies the current row of a table field array, for example:tblfd[ ].fldname (defined in field scripts only)$_ComponentNameSpecifies the name of the current frame, procedure, or user class$_ShortRemarkSpecifies the short remark specified when the current frame was created$_DefaultReturnValueSpecifies the default value appropriate for the return type of the currentframe or procedure. This cannot be used with methods for a user classscript.For example, a field script can refer to $_CurFld, but the compiler only seesthe name that is substituted, such as "composite.fieldname." This is a genericway to refer to the current field in field scripts.The following subsections describe the preprocessor statements that you canuse in 4GL scripts.436 <strong>Programming</strong> <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!