Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

IceBear

Another nOOb question

This topic is 6190 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Someone knox of a function who can convert strings to int and viceversa with Delphi? lets say I have a String := ''567'' and I want to convert String[0] int integer so ''5'' in n integer or I am I suppose to do it myself ?

Share this post


Link to post
Share on other sites
Advertisement
for the whole string :

n := inttostr(string[0]);

for just one part :

n := inttostr(copy(string[0],1,1);

Edited by - Zimond on December 25, 2001 3:50:27 PM

Share this post


Link to post
Share on other sites
damn... argh... did not see what i have written

uhmm... just got the wrong one i think
can someone delete this thread?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by MarkyD
Whoops!

There''s also a StrToInt function, which should have been used in the previous example.

Zimond, if ya wanna edit your post, I''ll edit mine and we can pretend that this little whoopsie never happened...

<a href="http://www.gamedev.net/community/forums/topic.asp?topic_id=71791">~ There''s no substitute for failure ~</a>


quote:
Original post by Zimond
damn... argh... did not see what i have written

uhmm... just got the wrong one i think
can someone delete this thread?



muhahahahaha

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!