Tip define your variables as local
As it has been mentioned in a previous rule, you must forget about global variables. A good practice is to declare your variables as local, usually at the beginning of your function or label declaration.
It is also important to declare all the local variables you use in a subprogram. This will avoid possible side effects if for any bad reason some global variables might still exist.