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

String Asc To Integer Vector Function
Character Arrays Class

Public Function StringAscToIntegerVector( _
      ByRef rChars() As Integer _
    , ByVal vString As Variant _
    ) As Boolean

"String ASCII To Integer Vector"
Place the Asc value of the characters of a string into the elements of an integer array.
This is the opposite of the IntegerVectorToStringAsc function.

Example:
    Assuming
       Dim aintChars() As Integer
    for example
       StringAscToIntegerVector(aintChars(), "CCBA") = True
    leaves
       LBound(aintChars) = 0
       UBound(aintChars) = 4
       aintChars(0) = Empty
       aintChars(1) = 67
       aintChars(2) = 67
       aintChars(3) = 66
       aintChars(4) = 65
See also:
    IntegerVectorToStringAsc Function
rChars: Dynamic one-dimensional array of integer values. Each element in the array will be assigned the ASCII value of the character at the corresponding position within string vString.
vString: String containing the characters that will each be assigned to one of the elements of the integer array. Function returns False and leaves rChars initialized with lower and upper bounds of 0 (zero) if vString is Null or cannot be fixed up to a String.

Function returns True upon success.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.