declare

Available in all subroutines.

Declares a local variable.

declare local var.expiry_time TIME;

User-defined variables must be declared local, prefixed with var., and must be declared with a type. They are scoped to the subroutine, and must be declared before they are first used.

Since variables have subroutine scope, it usually makes sense to define them at the top of a subroutine.

User contributed notes

We welcome comments that add use cases, ideas, tips, and caveats. All comments will be moderated before publication. To post support questions, visit our support center and we'll find you the help you need.