• Gambas 2 Arrays
    4 replies, posted
I'm working on a project that uses a few String Arrays in Gambas and I want to assign the same value to several indexes in the array. The problem is: I don't know how to do it with Gambas. An example of what I want to do: [code]FQuest.quest[26..57] = "Question here"[/code] Using ".." to separate the two indexes does not work. I've also tried: [code] [26] TO [57] [26]..[57] etc... [/code] Ideas?
Use a loop?
[QUOTE=voodooattack;21421838]Use a loop?[/QUOTE] That would work, but I just wondered if there was a simpler way.
Why do you need to assign that string to all those indexes?
[QUOTE=geel9;21462416]Why do you need to assign that string to all those indexes?[/QUOTE] It's for a project I agreed to do at work. It's a psychiatric test and those questions are all "choose between these two words" questions. Also, a For loop seems to work nicely. Now I just have to figure out how to wrap the text inside the label. :f5:
Sorry, you need to Log In to post a reply to this thread.