declare

Available inall 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

BETA

Do you see an error in this page? Do you have an interesting use case, example or edge case people should know about? Share your knowledge and help people who are reading this page! (Comments are moderated; for support, please contact Fastly support)