Typically variables are declared in the DECLARE section, and are available inside BEGIN block. I find this style stiff and tedious.
Is it possible to declare variables inside the BEGIN block just when they are needed? It is stupid to declare new global variable, if it's needed just to store some temporary value for further calculations, queries and assertions.