Jump to content
  • 0

How could I convert Integer to String?


bluesky

Question


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   2
  • Joined:  04/26/17
  • Last Seen:  

OH. the problem is fixed.

I was wrong in other place.

this code can work, needless convert.

---------------------------------------------------

I want covert Integer to String  ,  and put in variable

like this


 

set .@num,1;

set .@string$,.@num;

 

How could I conver it?

Thank you!!!

 

Edited by bluesky
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 1

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

string to integer

set .@num, atoi(.@string$);

integer to string

set .@string$, .@num + "";

 

  • Upvote 2
  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  615
  • Reputation:   201
  • Joined:  11/09/11
  • Last Seen:  

... atoi(string) == integer value 

Not will return 0 even if not a valid number

  • Love 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...