It seems to me that the pcal translator runs in a separate context entirely from the rest of the specification.
The `variables` statement inside of the algorithm will introduce a VARIABLES declaration in the translation.
I find it extremely helpful to study example pluscal algorithms by opening the smallest possible algorithm first, then gradually adding things as they become necessary. This has helped me learn what parts of the translation are produced by what parts of the pluscal, and where I can step outside of the algorithm, and where I must stay inside, when it comes to operators and variables.
(*-- algorithm base
begin skip;
end algorithm; *)