groups grrrrr
Posted: Tue Jan 31, 2012 7:23 pm
I have some groups, named, say, A,B,C, etc, and I want to group them.
Names of the groups are in an array, eg, gnames[1], gnames[2]...
I thought I could build a string with these group names and put "group" in front of each name, eg
put "group " & quote & gnames[1] & quote & " and group & quote & gnames[2] & quote" into xxx
and then execute : group xxx
This should be the same as doing : group group "A" and group "B" and group "C"
but it fails with a "Chunk: error in object expression"
If I display xxx, it shows : group "A" and group "B" and group "C" which is what I expect.
If I hardcode it, and execute : group group "A" and group "B" and group "C", it works fine.
So it seems I'm doing something wrong in getting (group "A" and group "B" and group "C") into a string and using that string with the group command.
What am I doing wrong please ?
Thanks
Names of the groups are in an array, eg, gnames[1], gnames[2]...
I thought I could build a string with these group names and put "group" in front of each name, eg
put "group " & quote & gnames[1] & quote & " and group & quote & gnames[2] & quote" into xxx
and then execute : group xxx
This should be the same as doing : group group "A" and group "B" and group "C"
but it fails with a "Chunk: error in object expression"
If I display xxx, it shows : group "A" and group "B" and group "C" which is what I expect.
If I hardcode it, and execute : group group "A" and group "B" and group "C", it works fine.
So it seems I'm doing something wrong in getting (group "A" and group "B" and group "C") into a string and using that string with the group command.
What am I doing wrong please ?
Thanks