Jump to content
  • 0

Explode into an Integer not a String


Stolao

Question


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   340
  • Joined:  10/17/12
  • Last Seen:  

im trying to make the Explode function produce an integer rather then a string EG .@i vs .@i$, and i seem to be having a brain fart, i know ive done this before in a script a while back ideas?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

Maybe make a loop to convert the string to int with atoi command

explode( .@tmp_string$, "1,2,3,4", "," );
.@size = getarraysize( .@tmp_string$ );
for ( .@i = 0; .@i < .@size; .@i++ )
	.@tmp_int[.@i] = atoi( .@tmp_string$[.@i] );

(or use bitwise operator)

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   340
  • Joined:  10/17/12
  • Last Seen:  

Hmm ya i found out they updated the explode to require a string output since my last update, time to update like 20 scripts to new rev.

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...