Page 1 of 1

how string splitted by comma is store in two variable

Posted: Mon Sep 27, 2010 1:20 am
by irfan
hi member,,

i want to split the string into two parts separated by comma and then want to store split parts in two different variables like this.

my script is gieven below..

read from socket tSocket until return
put it into Result
split Result by comma
...Now i want to store splitted part of sting in to two variable .. can any one help me.
one part may be stirng and other will be number .

Regard
Irfan

Re: how string splitted by comma is store in two variable

Posted: Mon Sep 27, 2010 11:19 am
by Klaus
Hi irfan,

you already know this since you used this in the other script that I stoll do not understand!
The magic word is "item"!

The default "itemdelimiter" is already a comma so you can simply do this:
...
read from socket tSocket until return
## RESULT is a reserved word, so you need to use something else!
put it into tResult
put item 1 of tResult into tVariable1
put item 2 of tResult into tVariable2
...


Best

Klaus

Re: how string splitted by comma is store in two variable

Posted: Mon Sep 27, 2010 3:02 pm
by irfan
hi klaus


Thank you very much for kind assistance.


Regard
Irfan