(imported topic written by gjeremia91)
Is there any way I can get a tuple from a list?..e.g. something like
color=blue
(“1”;“2”;“3”;“4”) as tuple[/color]
I’ve tried playing with "tuple string item of " but it doesn’t appear to work as I would expect:
color=blue
Q: tuple string item 0 of (“1,2,3,4”) [/color]
color=red
<—string with commas produces an error[/color]
color=blue
E: Singular expression refers to nonexistent object.
Q: tuple string item 0 of (“1”,“2”,“3”,“4”) [/color]
color=red
<—a tuple produces an error[/color]
color=blue
E: The operator “tuple string item” is not defined.
Q: tuple string item 0 of (“1;2;3;4”) [/color]
color=red
<-returns a single string[/color]
color=blue
A: 1;2;3;4 ( a string )
Q: tuple string items 0 of (“1”;“2”;“3”;“4”) [/color]
color=red
<—returns a list of strings[/color]
color=blue
A: 1
A: 2
A: 3
A: 4
[/color]
I’d expect something like:
color=blue
Q: tuple string item 0 of (“1”;“2”;“3”;“4”)
A: 1
Q: tuple string item 2 of (“1”;“2”;“3”;“4”)
A: 3
[/color]
I know I could accomplish this with:
( preceding text of first
";" of it, preceding text of first
";" of following text of first
";" of it, preceding text of first
";" of following text of first
";" of following text of first
";" of it, following text of first
";" of following text of first
";" of following text of first
";" of it ) of concatenation
";" of (
"1";
"2";
"3";
"4")
but that doesn’t appear to be the quickest or most elegant way.