String to integer conversion

We are using Delphi2005.net and need to convert a string value to an integer. Any ideas on how please as strtoint etc. does not seem to work

Best regards
Paul BrooksAsked:
Who is Participating?
 
wimmeyvaertCommented:
Are you sure you have SysUtils in your Uses Clause ?
0
 
mikelittlewoodCommented:
Well I have noticed now that most of the .net functions happen at the end of string objects such as

sString := Trim(sString)
is now
sString := sString.Trim();

so maybe it is something like
iInt := sString.StrToInt()

Have a look at the methods that get exposed when you do sString.
0
 
mikelittlewoodCommented:
How about
iInt := CInt(sString)
0
 
Paul BrooksAuthor Commented:
That is exactly the problem. Cant see the wood from the tree's im afraid :)
0
 
wimmeyvaertCommented:
Sometimes the biggest problems have the simplest answers, don't they ? ;-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.