variables in Py
- Posted by Jerry Story <jstory at FREENET.EDMONTON.AB.CA> Oct 21, 2000
- 484 views
David Cuny, The py.txt says variables are created by assigning a value to it. Is this good enough? Suppose I create a variable like so: number = 0 -- The variable 'number' is created Then suppose in another place I want to re-initialize 'number', and I make a typo: numer = 0 -- Another variable is created, by a typo. In a normal language, this is caught instantly as "undeclared" and I can fix it instantly. I used to program in GFA Basic. It did not have explicit declarations of global variables, and consequently simple typos tended to cause major trials and tribulations. Jerry Story