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

Overlay Variant Matrix Function
Array Manipulations Class

Public Function OverlayVariantMatrix( _
      ByRef rTo() As Variant _
    , ByRef vFm() As Variant _
    , Optional ByVal vOffset1 As Variant _
    , Optional ByVal vOffset2 As Variant _
    ) As Boolean

Overlay a two-dimensional Variant array onto some part of another Variant array.

Example:
    Assuming
       Static avarIn(0 To 5, 0 To 12) As Variant
       avarIn(1, 1) = "Smith"
       Static avarOut(0 To 5, 1 To 100) As Variant
    for example
       OverlayVariantMatrix(avarOut(), avarIn(), 0, 1) = True
See also:
    OverlayVariantVector Function (for one-dimensional arrays)
    OffsetVariantMatrix Function
    CopyVariantMatrix Function
    TransposeVariantMatrix Function
rTo: Two-dimensional array of Variant values that will be overlaid with vFm. rTo must already be dimensioned before it is passed to this function or else an error will occur.
vFm: The two-dimensional array of Variants that will be overlaid onto rTo. vFm can be either Static or dynamic. If vFm is dynamic, it must be dimensioned before being passed to this function.
vOffset1: Offset for the first-dimension bounds and elements within the new array. vOffset1 defaults to 0 (zero) if it is missing or Null or cannot be fixed-up to a number.
vOffset2: Offset for the second-dimension bounds and elements within the new array. vOffset2 defaults to 0 (zero) if it is missing or Null or cannot be fixed-up to a number.
Note: Function silently ignores cases where an element is to be copied to a location outside the bounds of the destination array.
Note: rTo and vFm can be the same arrays.
Return value: Function currently returns True in all cases.
v1.2 Change: Changed arguments vOffset1 and vOffset2 to be Optional.

Return to ENTISOFT Home Page

Copyright © 1999-2005 Entisoft