vararraycreate

I'm a new user of Scripter, first of all thanks a lot for a great product!


I'm trying to create arrays using vararraycreate, with Delphi-like syntax like so:

var x: variant;
x:=vararraycreate([1, 1000], varInteger);

This gives a syntax error: Unknown identifier or variable is not declared: 'varInteger'.

Although using vararraycreate is suggested in the documentation, I can not find any examples of vararraycreate actually used in Scripter. Could you give me a hint?

Hi, it's just that the names of types (varInteger, etc.) are not registered by default. You can register yourself or just use the numeric value (varVariant is recommended):


x := VarArrayCreate([1, 1000], 12);