|
tucor Capalini
Registered User
Join date: 18 Jun 2007
Posts: 44
|
12-16-2007 17:07
I have been looking for a way to change data type from a string to an integer. The obvious ways aparrently don't work  TIA Tucor Cap
|
|
RJ Source
Green Sky Labs
Join date: 10 Jan 2007
Posts: 272
|
12-16-2007 17:19
If you have:
string var1 = "123"; integer var2;
You can:
var2 = (integer)var1;
And var2 will equal 123
|
|
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
|
12-16-2007 23:45
The method required is called TYPECASTING.
Basically to "convert" between variable types you just add the wanted type in () before the variable you want to "convert".
just like RJ posted.
|