Answer
When a variable is declared, smartBASIC only reserves space in memory for that variable. If you need it initialized to zero you will need to explicitly set it to 0. Also, should you need a variable to persist past a functions runtime, it must be declared globally.