Oh no, just when i thought i got it working...
What I can see is that the first value is not read ok.
So when the string s="1=2, 2=3, 4=5", the first container value will
be "1".
That's a bummer. I think I will have to track down the global method
str2con to see why this happens. I saw on you site that you also
have Delphi experience ;-) Didn't you wish somethimes there was an
axapta equivalent for the delphi TStringList?
Ok, but that's for pointing that out to me!

/b

--- In [EMAIL PROTECTED], Max Belugin
<[EMAIL PROTECTED]> wrote:
>
> Hello byteway_so,
>
> пятница, 19 ноября 2004 г., you wrote:
>
>
> b> str s = "key1=value1, key2=value2, key3=value3, key4=value4,
> b> key5=value5";
> b> Container c;
> b> str keypair, key, value;
> b> int i, ipos;
> b> ;
> b> c = str2con(s);
> b> for (i=1; i < conlen(c)+1 ; i++)
> b> {
> b> keypair = strRTrim(strLTrim(ConPeek( c, i )));
> b> ipos  = strScan(keypair, "=", 1, strLen(keypair));
> b> key = substr(keypair, 1, ipos-1);
> b> value = substr(keypair, ipos+1, strLen(keypair));
> b> info(strFmt("Key: %1, Value: %2", key, value));
> b> }
>
> AFAIR  str2con  is  trying  to convert splitted string parts to
more special
> types for example, try your code with
> str s = "1=2, 2=3"
>
> --
> Best regards,
>  Max                           
>
> http://belugin.newmail.ru
> ICQ:9406811







Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to