Arrays in Scripter BASIC language scripts

I would like to define an array of, for example, 400 elements. In Basic, the user would use statement like dim a(400). When using Scripter I get a syntax error. It looks like I can only create such an array by specifying an initial value for each element. (dim a[0,0,0,0,0.....). Is that correct or am I missing something? Thank you.

Arrays in TMS Scripter are Variant arrays, so you have to use VarArrayCreate to initialize an array. Here are examples:

Thank you Wagner. This works fine, although I was hoping for an approach understandable by Basic programmers.

1 Like