Variables and constants can be declared outside of functions and procedures, within the program itself. Variables declared in this way are called global variables, which should be avoided. Global constants, on the other hand, are a great way of sharing consistent and meaningful values across your program.