Constants Section

Wherever you can use an integer constant, a floating-point constant, a boolean constant, or a string constant, you can likewise use a named constant declared in a constant declaration section. If you want to declare named constants with program scope (global constants), specify these constants at the top of your Silk Performer test script. If you want to declare local constants with transaction scope, specify these constants in a constant declaration section within the transaction.

The global constants used in the script are defined using the keyword const.

Syntax

ConstSection = "const" ConstDecl.

ConstDecl    = Constant { ";" Constant }.

Constant     = IdentList ":="
               ( signum | float | string | boolean
               | ident).

IdentList    = ident { "," ident }.

Example

const
  cnNumber1, cnNumber2 := -21;
  cnNumber3            := -cnNumber1; 
  cbBoolean            := true; 
  cfFloat              := -1.234;
  csString             := "This is a string constant";