I have some VBScript code where a function returns an array.
function PreProcessFile (sFile)
    dim deData(3)
    ''populate deData with strings
    PreProcessFile = deData
End function
The code calling this function errs with a type mismatch. Any thoughts?
'' VBScript source code
Dim m_deData(3)
set m_deData = PreProcessFile("someFile.txt")
                Don't explicitly dim the size of the array outside the function and don't use set:
'' VBScript source code
Dim m_deData
m_deData = PreProcessFile("someFile.txt")
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With