14. Adding Other Components to Your Application : Variable Types : Ways to Create Variables
 
Share this page                  
Ways to Create Variables
You can create variables in the following ways:
Specify a variable name in the Property Inspector for a field or menu item.
Such a variable contains the data associated with the field or menu item. OpenROAD automatically declares this variable so that, when you want to manipulate the field or menu item's data in your 4GL code, you simply reference the variable name.
If you are creating fields dynamically, you can specify in the Property Inspector that OpenROAD not declare a variable for the field.
For more information about creating fields dynamically, see the Programming Guide.
Declare a local variable in the script for a frame or procedure.
These variables are available for use only within the particular frame or procedure in which they are declared. They are not associated with a field or menu item, and users do not see their values.
For more information about declaring local variables, see the Programming Guide.
Create a global variable in the Global Variable Editor.
A global variable is a variable that you can use in any script or procedure in an application. It contains data that any script or procedure in the application can access. Global variables are not associated with field or menu items, and the data they contain is not displayed to the user.
For more information, see Create a Global Variable and the Programming Guide.
Define a macro variable in the Macro Variable Editor.
A macro variable is a preprocessor variable whose value is specified when the application is processed by the OpenROAD preprocessor.
For more information about macro variables, see Create a Macro Variable and the Programming Guide.