Hi All,
Quick one: several times in vb.net code I have got off the net there are
lines such as:
For i As Integer = 0 To 10
which, on compiling with VS2002, produce the following error:
error BC30451: Name 'i' is not declared.
One way to fix this issue is to separate the declaration into a new line:
Dim i As Integer
For i As Integer = 0 To 10
But the fact that I keep seeing this in other people's code is making me
wonder what's going on...
Any answers out there?
Cheers,
JON 8 13905
Jon Maz wrote: Hi All,
Quick one: several times in vb.net code I have got off the net there
are lines such as:
For i As Integer = 0 To 10
which, on compiling with VS2002, produce the following error:
error BC30451: Name 'i' is not declared.
One way to fix this issue is to separate the declaration into a new
line: Dim i As Integer For i As Integer = 0 To 10
But the fact that I keep seeing this in other people's code is making
me wonder what's going on...
Any answers out there?
The ability to declare loop variables in the loop statement was one of
the (very few) *language* changes in VB.Net 2003 from 2002. The only
other was the introduction of the bit shift operators << and >>.
VB.Net 2005 (as and when it emerges) will have considerably more, be
warned.
If you are writing for people who still have VB.Net 2002, you must take
care to avoid this construct and those operators.
--
Larry Lard
Replies to group please
"Jon Maz" <jo****@surfeuNOSPAM.de> wrote in news:eqCxPG3EFHA.3512
@TK2MSFTNGP10.phx.gbl: For i As Integer = 0 To 10
But the fact that I keep seeing this in other people's code is making me wonder what's going on...
Any answers out there?
Might be a new syntax extension in VB 2..5.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"
Develop ASP.NET applications easier and in less time: http://www.atozed.com/IntraWeb/
You are using Visual Studio 2002. Only in 2003 and beyond, the more compact
style of declaring for-loop (and for-each) variables in the loop header is
supported in VB.NET.
David Anton
Tangible Software Solutions Inc.
Home of the Instant C# and Instant VB .NET language converters www.tangiblesoftwaresolutions.com
"Jon Maz" wrote: Hi All,
Quick one: several times in vb.net code I have got off the net there are lines such as:
For i As Integer = 0 To 10
which, on compiling with VS2002, produce the following error:
error BC30451: Name 'i' is not declared.
One way to fix this issue is to separate the declaration into a new line:
Dim i As Integer For i As Integer = 0 To 10
But the fact that I keep seeing this in other people's code is making me wonder what's going on...
Any answers out there?
Cheers,
JON
Larry,
Don't forget the FolderBrowserDialog which now with SP1 seems without bugs.
The wrote it nowhere however beside the more stability, the better
conversion from VB6, and the smaller deployment, one of the major
improvements for me.
Just my thought,
Cor
Cor,
FolderBrowserDialog was a framework change not a VB.NET Language change.
Remember Larry specifically stated " *language* changes "
"Cor Ligthert" <no************@planet.nl> wrote in message
news:uI**************@TK2MSFTNGP12.phx.gbl... Larry,
Don't forget the FolderBrowserDialog which now with SP1 seems without bugs.
The wrote it nowhere however beside the more stability, the better conversion from VB6, and the smaller deployment, one of the major improvements for me.
Just my thought,
Cor
Mmm, thought it must be something like that...
Presumably I could use a command-line compile with v1.1 to get round this?
Thanks,
JON
Cor,
"Cor Ligthert" <no************@planet.nl> schrieb: Don't forget the FolderBrowserDialog which now with SP1 seems without bugs.
.... that's not a language change :-).
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Herfried and Jay,
You both are right
LOL.
Cor This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Xerxes |
last post by:
Hi,
is there any script to authenticate an email address entered in a form
field?
I used the php mail() function, using the following (where my email
field on the form is called "email"):
...
|
by: Craig Bailey |
last post by:
Anyone recommend a good script editor for Mac OS X?
Just finished a 4-day PHP class in front of a Windows machine, and liked
the editor we used. Don't recall the name, but it gave line numbers as...
|
by: Verizon |
last post by:
Has anybody ever heard of support for the book:
"Secure PHP Development"
by: Mohammed J. Kabir
I'm trying to run one of his PHP solutions called "Web Forms Manager"
I haven't been able to...
|
by: panic |
last post by:
If you are not familiar with the palm DB apps I am refering to, they are
applications that allow you to graphically create a db by adding fields(columns)
and then creats a form so you can enter the...
|
by: Robert Freund |
last post by:
I've been looking for a good and free code beautifier that runs on
linux. About the only ones I found where Trita (www.trita.com), which
costs money and only runs on windows. The other one was...
|
by: Frank |
last post by:
What is the best IDE for developing PHP applications?
What do you use and why?
Thanks.
|
by: Mr.Bogi |
last post by:
Is anyone aware of an open source report generation library for php/mysql?
Basically a freeware/opensource alternative to Crystal Reports.
thanks
|
by: Alex |
last post by:
Bottom line: would like to get a weblog and bulletin board going.
Would like to use phpBB2 and movabletype. I have movabletype working
using mysql.
Apache and php were on my linux red hat 7.2...
|
by: MT |
last post by:
Hello Everyone:
I am running XP Pro with IIS 5.1.
Which is the best PHP version to install:
CGI, CLI or ISAPI??
The installation manual lists all three but does
not say which is most...
|
by: ChronicFatigue |
last post by:
Hello
My current host has register_globals switched on in their php.ini file.
Would it be prudent for me to design code which works when register_globals
is switched off in case I switch hosts...
|
by: Naresh1 |
last post by:
What is WebLogic Admin Training?
WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
|
by: antdb |
last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine
In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
|
by: WisdomUfot |
last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
|
by: Carina712 |
last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
|
by: BLUEPANDA |
last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
|
by: Rahul1995seven |
last post by:
Introduction:
In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
|
by: Ricardo de Mila |
last post by:
Dear people, good afternoon...
I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control.
Than I need to discover what...
|
by: Johno34 |
last post by:
I have this click event on my form. It speaks to a Datasheet Subform
Private Sub Command260_Click()
Dim r As DAO.Recordset
Set r = Form_frmABCD.Form.RecordsetClone
r.MoveFirst
Do
If...
|
by: jack2019x |
last post by:
hello, Is there code or static lib for hook swapchain present?
I wanna hook dxgi swapchain present for dx11 and dx9.
| |