Connecting Tech Pros Worldwide Help | Site Map

Function return values revisited

guy
Guest
 
Posts: n/a
#1: Nov 20 '05
We got it... :-)


from my post to VS.NET 2005 VB.NET ng...

Subject: function return values
From: "[MS]John@data.vb" <anonymous@discussions.microsoft.com> Sent: 7/2/2004 12:56:27 PM




Yes, you will get this warning in vs 2005. Check this
feature out in the beta1.
Also you will get a green squiggle in the function with
nice tooltips to indicate what is going on.

John@data.vb

This posting is provided "AS IS" with no warranties, and
confers no rights.

..

sorry for the cross post (dotnet.general....)

It would be really nice if we could have an
Option VeryStrict (or similar)
that caused a compilation warning or error for function
calls that did not assign return values
eg
Split(MyString,",")
instead of
MyArray = Split(MyString,",")

The time overhead of having to type Bitbucket= ...
when i dont need the return value would be more than
recovered by having bugs trapped at compile time rather
than runtime.

cheers

gu

..



One Handed Man \( OHM - Terry Burns \)
Guest
 
Posts: n/a
#2: Nov 20 '05

re: Function return values revisited


Yeah, only a year to go.

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

"guy" <guy@discussions.microsoft.com> wrote in message
news:3C70CC37-9E96-49B1-9124-8948AA9193EA@microsoft.com...[color=blue]
> We got it... :-)
>
>
> from my post to VS.NET 2005 VB.NET ng...
>
> Subject: function return values
> From: "[MS]John@data.vb" <anonymous@discussions.microsoft.com> Sent:[/color]
7/2/2004 12:56:27 PM[color=blue]
>
>
>
>
> Yes, you will get this warning in vs 2005. Check this
> feature out in the beta1.
> Also you will get a green squiggle in the function with
> nice tooltips to indicate what is going on.
>
> John@data.vb
>
> This posting is provided "AS IS" with no warranties, and
> confers no rights.
>
> .
>
> sorry for the cross post (dotnet.general....)
>
> It would be really nice if we could have an
> Option VeryStrict (or similar)
> that caused a compilation warning or error for function
> calls that did not assign return values
> eg
> Split(MyString,",")
> instead of
> MyArray = Split(MyString,",")
>
> The time overhead of having to type Bitbucket= ...
> when i dont need the return value would be more than
> recovered by having bugs trapped at compile time rather
> than runtime.
>
> cheers
>
> gu
>
> .
>
>
>[/color]


Herfried K. Wagner [MVP]
Guest
 
Posts: n/a
#3: Nov 20 '05

re: Function return values revisited


* =?Utf-8?B?Z3V5?= <guy@discussions.microsoft.com> scripsit:[color=blue]
> It would be really nice if we could have an
> Option VeryStrict (or similar)
> that caused a compilation warning or error for function
> calls that did not assign return values
> eg
> Split(MyString,",")
> instead of
> MyArray = Split(MyString,",")[/color]

I made the same suggestion some time ago.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
guy
Guest
 
Posts: n/a
#4: Nov 20 '05

re: Function return values revisited


and I thought the Ohm was a unit of resistance ;-)

"One Handed Man ( OHM - Terry Burns )" wrote:
[color=blue]
> Yeah, only a year to go.
>
> --
>
> OHM ( Terry Burns )
> . . . One-Handed-Man . . .
>
> Time flies when you don't know what you're doing
>
> "guy" <guy@discussions.microsoft.com> wrote in message
> news:3C70CC37-9E96-49B1-9124-8948AA9193EA@microsoft.com...[color=green]
> > We got it... :-)
> >
> >
> > from my post to VS.NET 2005 VB.NET ng...
> >
> > Subject: function return values
> > From: "[MS]John@data.vb" <anonymous@discussions.microsoft.com> Sent:[/color]
> 7/2/2004 12:56:27 PM[color=green]
> >
> >
> >
> >
> > Yes, you will get this warning in vs 2005. Check this
> > feature out in the beta1.
> > Also you will get a green squiggle in the function with
> > nice tooltips to indicate what is going on.
> >
> > John@data.vb
> >
> > This posting is provided "AS IS" with no warranties, and
> > confers no rights.
> >
> > .
> >
> > sorry for the cross post (dotnet.general....)
> >
> > It would be really nice if we could have an
> > Option VeryStrict (or similar)
> > that caused a compilation warning or error for function
> > calls that did not assign return values
> > eg
> > Split(MyString,",")
> > instead of
> > MyArray = Split(MyString,",")
> >
> > The time overhead of having to type Bitbucket= ...
> > when i dont need the return value would be more than
> > recovered by having bugs trapped at compile time rather
> > than runtime.
> >
> > cheers
> >
> > gu
> >
> > .
> >
> >
> >[/color]
>
>
>[/color]
One Handed Man \( OHM - Terry Burns \)
Guest
 
Posts: n/a
#5: Nov 20 '05

re: Function return values revisited


I resist that statement, and now I'm going to wander into neighbouring
magnetic field and ride over wheatstone bridge on my megacycle.

;-)

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

"guy" <guy@discussions.microsoft.com> wrote in message
news:27113E5A-A0CD-4DAA-9E30-1AA14CE8F480@microsoft.com...[color=blue]
> and I thought the Ohm was a unit of resistance ;-)
>
> "One Handed Man ( OHM - Terry Burns )" wrote:
>[color=green]
> > Yeah, only a year to go.
> >
> > --
> >
> > OHM ( Terry Burns )
> > . . . One-Handed-Man . . .
> >
> > Time flies when you don't know what you're doing
> >
> > "guy" <guy@discussions.microsoft.com> wrote in message
> > news:3C70CC37-9E96-49B1-9124-8948AA9193EA@microsoft.com...[color=darkred]
> > > We got it... :-)
> > >
> > >
> > > from my post to VS.NET 2005 VB.NET ng...
> > >
> > > Subject: function return values
> > > From: "[MS]John@data.vb" <anonymous@discussions.microsoft.com> Sent:[/color]
> > 7/2/2004 12:56:27 PM[color=darkred]
> > >
> > >
> > >
> > >
> > > Yes, you will get this warning in vs 2005. Check this
> > > feature out in the beta1.
> > > Also you will get a green squiggle in the function with
> > > nice tooltips to indicate what is going on.
> > >
> > > John@data.vb
> > >
> > > This posting is provided "AS IS" with no warranties, and
> > > confers no rights.
> > >
> > > .
> > >
> > > sorry for the cross post (dotnet.general....)
> > >
> > > It would be really nice if we could have an
> > > Option VeryStrict (or similar)
> > > that caused a compilation warning or error for function
> > > calls that did not assign return values
> > > eg
> > > Split(MyString,",")
> > > instead of
> > > MyArray = Split(MyString,",")
> > >
> > > The time overhead of having to type Bitbucket= ...
> > > when i dont need the return value would be more than
> > > recovered by having bugs trapped at compile time rather
> > > than runtime.
> > >
> > > cheers
> > >
> > > gu
> > >
> > > .
> > >
> > >
> > >[/color]
> >
> >
> >[/color][/color]


guy
Guest
 
Posts: n/a
#6: Nov 20 '05

re: Function return values revisited


Well Herfried, it was probabaly your suggestion MS responded to, mine was only a couple of days ago;-)

guy

"Herfried K. Wagner [MVP]" wrote:
[color=blue]
> * =?Utf-8?B?Z3V5?= <guy@discussions.microsoft.com> scripsit:[color=green]
> > It would be really nice if we could have an
> > Option VeryStrict (or similar)
> > that caused a compilation warning or error for function
> > calls that did not assign return values
> > eg
> > Split(MyString,",")
> > instead of
> > MyArray = Split(MyString,",")[/color]
>
> I made the same suggestion some time ago.
>
> --
> Herfried K. Wagner [MVP]
> <URL:http://dotnet.mvps.org/>
>[/color]
Herfried K. Wagner [MVP]
Guest
 
Posts: n/a
#7: Nov 20 '05

re: Function return values revisited


* =?Utf-8?B?Z3V5?= <guy@discussions.microsoft.com> scripsit:[color=blue]
> Well Herfried, it was probabaly your suggestion MS responded to, mine was only a couple of days ago;-)[/color]

Microsoft isn't always clear about what answer to give, but I am sure
they noted the request.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Closed Thread