Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating a populated array of strings
#1
Hi Boriel,

I notice that I cannot do the following:
Code:
DIM stringArray(2) AS STRING => {"apples", "oranges", "pears"}

The compiler returns "error: Initializer expression is not constant."

Digging on this forum reveals a post from 2009, in which you state this is not possible because string lengths are dynamic. Is this still the case? As you posted in that thread, it ought to be simple to just have the compiler run a bunch of individual LET assignments, but it's a bit ugly to have to type them out.

Thanks,

Patters
Reply


Messages In This Thread
Creating a populated array of strings - by patters - 01-26-2021, 01:07 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)