Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: ArrInitialize NULL EMPTY
null = ObjectType("NULL","") aRR = ArrDimension(4) ArrInitialize(aRR,null)However, this works
For i=0 To 3 aRR[i] = null NextPlease explain.
In fact, the function is intentionally coded to only accept ANSI and Unicode strings, floats, and integers as initializers. It simple does not permit the use of other WinBatch variable types, including variants, as initializers.
Arrays can be populated with almost any WIL variable type as array elements are really light weight, nameless WIL variables. However, assigning any particular value to a small group of elements does not have the same potential for untoward side-effects as performing an on mass initialization.
I do not know the exact thinking behind the function's implementation but I suspect that the function is coded they way it is to save the user from some of the less than desirable outcomes of using certain values for initialization and also to keep the implementation simple and maintainable.
Article ID: W17659
Filename: ArrInitialize NULL Fails.txt
File Created: 2009:12:14:15:05:32
Last Updated: 2009:12:14:15:05:32