DBPro isn't an interpreter, it's a compiler, which means that the best it can do is to accept variable declarations in sourcecode order. It just reads the code line by line until it's done.
Here's how the compiler deals with your first piece of code:
GOSUB Init
x = 1 : ` First time 'x' is encountered. It's not a declaration,
` so add it to the variable list as an integer.
PRINT x
WAIT KEY
END
Init:
x AS BYTE : ` Second time 'x' is encounter. It's a declaration
` but already exists in the variable list ...
RETURN
... and here's how the compiler deals with the second:
GOSUB Init
Init:
x AS BYTE : ` First time 'x' is encountered. It's a declaration,
` so add it to the variable list with the correct
` type information.
GOTO fwd
RETURN
fwd:
x = 256 : ` Oh, here's 'x' again. It's not a declaration, and it's
` already in the variable list, so just use it.
PRINT x
WAIT KEY
END
Quote: "either explicitly declared variables are local to each procedure or declarations in sub routines are parsed in the right order"
That's what functions are for, and don't declare variables in subroutines. Easy fix.
Quote: "the order the program runs, not the order the sourcecode looks like"
The only way for a compiler to do this would be for the compiler to actually execute your code ... and that makes it an interpreter, not a compiler.