Declares a variable.
[scope] [share] data-type variable-id [ = expr ] [, variable-id [ = expr]] ...
Variable | Description |
---|---|
scope | Optional: Either public (the default) or private. Private declarations are available only in the file in which they occur. Public declarations can be accessed from other files through a use statement. You can specify the scope only if the declaration is global, which means that the declaration is not located within a function, a window, or a winclass declaration. |
share | Optional: Indicates that the variable is shared by multiple threads. Access to shared variables is controlled with the access statement. |
data-type | The data type of the variable. |
variable-id | An identifier that specifies the name of the variable. |
expr | Optional: An expression that evaluates the initial value of the variable. The value must be compatible with the type of the variable. If you try to use a variable before the value of the variable is set, 4Test raises an exception. |
[ ] INTEGER iTestNum = 0 [-] LIST OF STRING lsTerriers = {...} [ ] "Airedale" [ ] "Irish" [ ] BOOLEAN bDone = FALSE, bFound = FALSE [ ] public ARRAY[7] OF STRING asWeekDay [ ] ANYTYPE aWhoKnows [-] type NAME is record [ ] STRING sFirst [ ] STRING sLast [-] NAME Name = {...} [ ] "Maxwell" [ ] "Smart"