Quote: "Do variables declared/used inside of a function only apply to that function only? i.e x inside of random_function() would not effect x in another function/main loop
"
All variables in a function are only used in that function (using the same variable in the function and in the main loop is fine) with the exception of...Arrays(automaticly global), And variables that you declare "Global".
Quote: "Also, is there any way of declaring/initializing a variable only once so that everytime the program passes x = 10 it ignores it since it only declared it once? Without using IF or DO WHILE code. i.e INIT X = 10 or something. (I'm aware of declaring it outside of a DO/LOOP but what happens if I want to do it inside of a loop?) "
Yes do this in the main loop if you only want x to =10 when it is NOT = to 10
You know, when i see an old lady slip and fall on the side walk, my first instinct is to luagh, but then i think, what if i where an ant? and she fell on me, it just doesn't seem so funny anymore.