>I don't know enough about the actual internals of VFP to be sure this is accurate, but I have the following theory:
>
>When VFP sees you need a parameter to call a function it looks around for a parameter in scope with that name. When it doesn't find it, it creates it. But at the time VFP creates the parameter it doesn't know that the parameter is supposed to be an array, so it assumes it is a scalar. It then calls the function with the scalar parameter. The function looks at the parameter and throws an exception because it was expecting an array.
No,
VFP didn't create variables (unless it is documented in help) when you pass something to function:
Try:
RELEASE ALL LIKE lcText*
? LEN(lcTest)
but:
RELEASE ALL LIKE laText*
ADIR(laText, [c:\*.*])
DISPLAY MEMORY LIKE laText*
works
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.