very strange error

I was in the process of writing a text file parser when the following code raised the error “expected string , but got string()”.Here is the line that raised the error;

inpstr=split(inpstr,",") Inpstr is a legit property that accepts an input line from a text file. This error is like walking into a pub and complaining “expected beer, but got beer”. Does not compute???

Are you sure the error isn’t “Expected String, but got String()”?

Split takes a string and returns an array.

Jim

[quote=191137:@Jim Shaffer]Are you sure the error isn’t “Expected String, but got String()”?

[/quote]
Yep, thats it(sorry, my mistake), but what should the correct syntax be?

instead of

inpstr=split(inpstr,",")

should be

strarray=split(inpstr,",")

where strarray is, as said, an array

 Giulio
dim myArrayOfStrings() as string = split(inpstr,",")

Shouldn’t it be dimensioned as dim myArrayOfStrings(-1) as string?

() and (-1) are exactly the same.