Variable Naming and Text Files

I'm new to Corona and have 2 general questions.

1. What's the difference between declaring a variable with and without the 'local' keyword? I have seen both in code examples:

local myVar1 = 0
myVar2 = 0

2. I want to put some functions and variable declarations, especially those that don't change frequently, into a different text file so that main.lua doesn't get unmanageable. For example, I would like to have a myFunctions.txt and myVariableConstants.txt. Can this be done?

views:1395 update:2011/10/28 9:34:19
corona forums © 2003-2011