<-- Previous || Up || Next -->

String Matrix To Variant Matrix Function
Array Conversions Class

Public Function StringMatrixToVariantMatrix( _
      ByRef rTo() As Variant _
    , ByRef vFm() As String _
    ) As Boolean

Convert a String matrix into a Variant matrix.
Copies each of the elements of a two-dimensional String array into a two-dimensional array of Variant values.

Example:
    Assuming
       Static astrNames(0 To 1, 0 To 1) As String
       astrNames(1, 1) = "Car"
       Dim avarNames() As Variant
    for example
       StringMatrixToVariantMatrix(avarNames(), astrNames()) = True
    leaves
       avarNames(0, 0) = ""
       avarNames(0, 1) = ""
       avarNames(1, 0) = ""
       avarNames(1, 1) = "Car"
See also:
    VariantMatrixToStringMatrix Function (inverse)
    StringVectorToVariantVector Function
rTo: Dynamic array of Variants that will be dimensioned with two dimensions before it receives copy of each of the elements in vFm.
vFm: Two-dimensional array of (variable-length) String values that will be copied to array rTo.
Return value: Function currently always returns True.

 

Return to ENTISOFT Home Page

Copyright © 1999-2005 Entisoft