12-12-2004, 11:09 AM
For numbers, always use variables of type int or other numeric types. For text, use variables of type str. To convert a string, that begins with a number, to number, use function val. Conversion number-to-string is automatic.
str s="5 cows"
int i=val(s) ;;now i is 5
s=i ;;now s is "5"
str s="5 cows"
int i=val(s) ;;now i is 5
s=i ;;now s is "5"