see comment below

-----Original Message-----
From: jodidee2004 [mailto:[EMAIL PROTECTED]
Sent: Sunday, May 23, 2004 8:51 AM
To: [EMAIL PROTECTED]
Subject: [vbhelp] Newbie needing help in loops


Hello,
I am a newbie and I need some help understanding some basic concepts.

If I had a loop structure that read:
For IntNumber=1 to 10
and I also had
For IntNumber 1 to 10 step 1
are these identical loop statements? ------ yes this 2 loop statement are
just the same

Suppose I had a for next loop like this:
for intB=1 to 7 Step 1
Print IntB
Next IntB

What would the value of IntB be when the loop stops? I think it would
be 7 is that correct? Or is it 7 plus 1 to get 8.  ------ 7 is the last
number of the loop
---------------------------------------------------------------
I understand that the step counts by those numbers.
So if I had
for IntCount = 4 to 10 step 2
Print IntCount
next Intcount

the value of the numeric variable would be 12 when the loop stops. - ------
nope it will stop on the 10

4,8,10,12   and it would stop at 12 since this is higher than 10.

Can someone explain this to me a bit better, I am confused by all
this. Does it increase at the end the amount of steps past the end
value? ---- the loop will stop at what value you specified in the for
statement

so for example

for i = 1 to 2 ---->>>  this loop will stop on 2


if you put an for i = 1 to 2 step 2  --------> this loop will stop in 1
because 3 is greater that the 2 which is where you like to end the loop



Jodi







'// =======================================================
    Rules : http://ReliableAnswers.com/List/Rules.asp
    Home  : http://groups.yahoo.com/group/vbHelp/
    =======================================================
    Post  : [EMAIL PROTECTED]
    Join  : [EMAIL PROTECTED]
    Leave : [EMAIL PROTECTED]
'// =======================================================

Yahoo! Groups Links






#####################################################################################
This e-mail message has been scanned for Viruses and Content and cleared 
by NetIQ MailMarshal
#####################################################################################


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/k7folB/TM
---------------------------------------------------------------------~->


'// =======================================================
    Rules : http://ReliableAnswers.com/List/Rules.asp
    Home  : http://groups.yahoo.com/group/vbHelp/
    =======================================================
    Post  : [EMAIL PROTECTED]
    Join  : [EMAIL PROTECTED]
    Leave : [EMAIL PROTECTED]
'// =======================================================
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/vbhelp/

<*> To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 

Reply via email to