Hi,
as far as I know, you cannot do this yet.
Depending on your task/usecase, you could create some classes with different sized arrays.
Example (string arrays):
- ArrayClass (basic class) contains 2 methods: string GetStringByIndex( int32 index ), int32 GetNoOfItems( void )
- Classes that are derived from ArrayClass: ArrayClass5, ArrayClass50, ArrayClass100
Override their functions in the ArrayClasses:
GetNoOfItems():
return ArrayClass5.size;
OR, if empty strings are not welcome:
var int32 count = 0;
var int32 i = 0;
for( ; i < ArrayClass5.size; i=i+1 )
{
if( ArrayClass5[ i ] != "" )
count = count + 1;
}
return count;
GetStringByIndex():
if( GetNoOfItems() > aIndex )
return ArrayClass5[ aIndex ];
trace "Exception: String not found.";
return "";
Actually this also allows you to transport arrays, e.g. via arguments in methods.
Hope this helps.
Best regards,
Chris
P.S. Code was not tested, but should work. You could also use arrays via classes without those methodes.