Wrox Programmer Forums
|
BOOK: Professional Visual Basic 2008 ISBN: 978-0-470-19136-1
This is the forum to discuss the Wrox book Professional Visual Basic 2008 by Bill Evjen, Billy Hollis, Bill Sheldon, Kent Sharkey; ISBN: 9780470191361
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Visual Basic 2008 ISBN: 978-0-470-19136-1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 16th, 2008, 05:08 AM
Authorized User
 
Join Date: Dec 2008
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs down Page 33 Misconception

After going back and reading this I was going to delete this thread but I can't. It's not really an issue.
-------------End Edit-------------
Page 33 reads:
"Next, if the control variable i indicates you are looking at the sixth item in the array (index of five), then this row is to be ignored but processing should continue within the loop. Keep in mind that even though the loop control variable starts at 1, the first element of the array is still zero."

My issue with this text is that the If statement inside the referenced For Next loop has nothing to do with arrays at all.
In fact the only line of code that references the array items or indexs (line 4 in the loop) would be skipped when the If statement is true.

If you re-write the code with a For Each statement the text might make sense

Original code:
Code:
For i = 1 To 100 Step 2
If arrMyIntArray1.Count <= i Then Exit For
If i = 5 then Continue For
arrMyIntArray1(i) = i -1
Next
__________________
Need free one on one help getting started with Visual Basic? Contact me via http://patrickcambria.com its free.

Last edited by Patrick Cambria; December 17th, 2008 at 07:41 AM.. Reason: Adding signature.





Similar Threads
Thread Thread Starter Forum Replies Last Post
access C#.Net page as action of calssic ASP page mansharma_s ASP.NET 1.x and 2.0 Application Design 6 January 7th, 2008 10:58 AM
Chapter 2, page 33, SDK index? ag2000 BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 0 July 13th, 2006 05:21 PM
Page 33 Creating digital signature bmiller28 BOOK: ASP.NET Website Programming Problem-Design-Solution 7 November 12th, 2005 03:01 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.