When I convert the input from a text box to a variable, ...Assigning a value to a variable is not a conversion. Imagine it more like setting a new pointer to a spot in a table. Converting (known as type casting) will introduce a lot of issues, when trying to automate it.
The input from a text box is -by definition- a string. How should C2 decide what it has to treat as a number?
"+1" could be a number...or is it an approval? Or is it abbreviated for "me too"?
"1a" What to do now? Taking "1" as a number and just omitting the rest of the text? Should C2 be allowed to just throw data out of the window automatically? Or isn't it a number but paragraph 1a?
I think if it's a "number" variable, any inputs to it should automatically be converted to int().This would make it even more worse.
"1.35" A number, right? But type casting to int would make it become 1 and again C2 would just throw data out of the window automatically.
"1,35" Not one but two numbers? Well, could be, but for example in germany this is the way to write the above number 1.35
The only one who knows for sure, what type of value is needed, is the programmer. So it's good that it's up to you to do the correct conversions. <img src="smileys/smiley2.gif" border="0" align="middle" />