On Wed, 30 Jun 2004 03:58:01 -0700, guy wrote:
It would be really nice if there was an option that warned the developer that calls to functions did not handle the returned value, or alternatively threw a compilation error.
I have been caught so many times by witing something like
Split(myString,",")
instead of
MyArray = Split(myString,",")
(or maybe it is there and I havent found it?)
guy
The simple explanation is that it's not an error. Although a warning might
be appropriate.
For the split function, you don't necessarily need to assign the return to
a variable. While I'm not saying that you should use it in this manner,
you can use it like this:
'Display the 3rd token in the string
MsgBox(Split(myString,",")(2))
or
'Assigns the 5th token of the string to the variable MyToken
Dim MyToken As String = Split(myString,",")(4)
--
Chris
dunawayc[AT]sbcglobal_lunchmeat_[DOT]net
To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.