Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

RE: two dim In some VB6 codes, two-dimensional arrays are referenced as array(1)(1).  Your tools like , which is not the same as array(1,1)…  Did not have any of that is Bayer for some reason.

 

hmm, array(1)(1) is not array(1,1)  


 

VB6 has some limitations on array declarations, and sometimes an array must be declared as an 1D array even though the intent is 2D.  In those situations, the tool needs to be told the symbol is a 2D array with a fixtype command: 

Code Block
<Compile>

...

<Refactor>

<FixType identifier="I" type="T[,]" />

</Refactor>

</Compile>

 



where I is the fully-qualified symbol identifier and T is the desired type.
  
  
In other cases the array elements are arrays.  This results in A(...)(...) and there is a lot of ambiguity given the nuances of default properties, parameterized properties, etc.  Its  It's a similar situation; you must add a fixtype:

 

<FixType identifier="I" type="T[][]" />

 

The tool actually supports a much richer declarative syntax that VB6, so I guess you can address it with a pre-edit as well, but the fixtype is a more resilient and more readable technique.