sg
Guest
Sun Jul 10, 2011 3:04 pm
Hello Guys,
I have a string value which is indeed a list of lists, is there any
way to convert it to list.
e.g.,
value = "((\"a\" (1 2 4)) (\"b\" (3 6 7)))"
what is best way to process this string as list as:
value = '(("a" (1 2 4)) ("b" (3 6 7)))
such I can use all list operation like assoc, car etc on this value?
sg
Guest
Sun Jul 10, 2011 3:13 pm
On Jul 10, 6:04 pm, sg <samirgro...@yahoo.com> wrote:
Quote:
Hello Guys,
I have a string value which is indeed a list of lists, is there any
way to convert it to list.
e.g.,
value = "((\"a\" (1 2 4)) (\"b\" (3 6 7)))"
what is best way to process this string as list as:
value = '(("a" (1 2 4)) ("b" (3 6 7)))
such I can use all list operation like assoc, car etc on this value?
hmmm...., I saw one of earlier q/a, linereadstring is the routine to
do so. Thanks, :
Pete Z.
Guest
Tue Jul 19, 2011 1:32 am
On Jul 10, 6:13 am, sg <samirgro...@yahoo.com> wrote:
Quote:
On Jul 10, 6:04 pm, sg <samirgro...@yahoo.com> wrote:
Hello Guys,
I have a string value which is indeed a list of lists, is there any
way to convert it to list.
e.g.,
value = "((\"a\" (1 2 4)) (\"b\" (3 6 7)))"
what is best way to process this string as list as:
value = '(("a" (1 2 4)) ("b" (3 6 7)))
such I can use all list operation like assoc, car etc on this value?
hmmm...., I saw one of earlier q/a, linereadstring is the routine to
do so. Thanks, :
I don't know if this is the best way, but:
MyVal = "((\"a\" (1 2 4)) (\"b\" (3 6 7)))"
MyList = evalstring(strcat("'" MyVal))
works for this particular example.
-Pete Z.