Define a Global Constant

Global constants must be defined in an IncludeScript called DEFPARAM.

You must have created a project to contain your application definitions. For more information, see Working with Projects.
  1. Create a new IncludeScript Library or open an existing library. For more information, see Create a Library .

    For example, to create a global constant for all your Uniface applications, create or open the SYSTEM_LIBRARY.

  2. Select an IncludeScript template and insert it template into the library structure.

    The default IncludeScript is called Empty include

  3. Rename the IncludeScript to DEFPARAM and change the Description to something like Global constants.

    DEFPARAM is a reserved name that is used only for global constant declarations.

    DEFPARM IncludeScript defined in library

  4. Click Write Script to go to the Write Script worksheet, and select the DEFPARAM IncludeScript.
  5. Declare the constant using the #define command.

    For example:

    #define Product = "Uniface"

Related Topics