FB 1.05
I have tried to create code to demonstrate the problem. Here it is:
Code: Select all
Dim Shared m_rgNames(17) As WString * 20 => {"Auto", "Black", "Blue", "Green", "Cyan", "Red", _
"Magenta", "Brown", "Light Gray", "Gray", "Light Blue", "Light Green", "Light Cyan", _
"Light Red", "Light Magenta", "Yellow", "Bright White", "User selected..."}
Sub Foo2 ( prgNames() As WString * 20, ByVal numElements As Long)
Dim i As Long
For i = 0 To numElements - 1
m_rgNames(i) = prgNames(i)
Next
End Sub
Sub Foo
Dim rgNames(17) As WString * 20 => {"Auto", "Negro", "Azul", "Verde", "Cian", "Rojo", _
"Magenta", "Marrón", "Gris claro", "Gris", "Azul claro", "Verde claro", "Cian claro", _
"Rojo claro", "Magenta claro", "Amarillo", "Blanco", "Selección libre..."}
Foo2( rgNames(), 18 )
End Sub
' call Foo to initiate the copying of rgNames to global array via sub Foo2
Foo
Dim i As Long
For i = 0 To 17
Print m_rgNames(i)
Next
Sleep