Variables Section

Variables used in a load test can be defined in the global section of a Silk Performer test script or in a transaction. Variables defined in the global section have global scope and global life span and therefore can be used in any transaction and as bind or into variables in any SQL command or Web form. Variables of a transaction have local scope but also global life span and therefore can be used only in the transaction where they are defined.

Variables used in a script are defined using the keyword var.

Syntax

VarSection  = "var" VarDecl.

VarDecl     = TVar ";" { TVar ";" }.

TVar        = IdentList ":" (ExplicitSizedType | ImplicitSizedType).

ExplicitSizedType = [ "array" "[" number "]" "of" ] SimpleType.
// "[" [number] "]" is optional, but if not used, init is obligatory

SimpleType     = "number" [ "init" NumList ]
            | "float" [ "init" FloatList ]
            | "boolean" [ "init" BoolList ]
            | "string" [ "(" number ")" ]
                         [ "init" StringList ].

ImplicitSizedType = [ "array" "of" ] SimpleTypeInit).

SimpleTypeInit = "number" "init" NumList
            | "float" "init" FloatList
            | "boolean" "init" BoolList
            | "string" [ "(" number ")" ]
                         "init" StringList.

NumList     = signum { "," signum }.

FloatList   = float { "," float }.

BoolList    = boolean { "," boolean }.

StringList  = string { "," string }.