Re: Loop wierdness?

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 59290
interpreted = N
texte = I don't find it odd the way that it is handled, in fact I like that you define the starting and stopping points for the loop precisely. Instead of counting 24 'steps' before completing, the loop continues until it hits exactly the value that you specify. I know that PHP has a much more complex syntax system for it's loops - where the loop continues until the expression evaluates to "false": for ($i = 1; $i < 11; ++$i) { echo ("$i
\n"); //Prints from 1 to 10 } The WebDNA version basically continues until the expression evaluates to "true" ([index]=24). Gary At 11:19 AM 9/6/2004, you wrote: >Hello again... > >I guess the "end" in a loop context is a matching comparison >and not a "math equation". > >If I have: >[loop start=-12&advance=1&end=24] >[index]
>[/loop] > >Instead of ending +12 (which would be logical to me) it ends on >+24. > >This really isn't a question as I understand how it works, but >just wanted to see if others thought this was wierd and/or if >other languages' loops worked in the same way. > >Donovan ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Loop wierdness? ( Gary Krockover 2004)
  2. Loop wierdness? ( Donovan Brooke 2004)
I don't find it odd the way that it is handled, in fact I like that you define the starting and stopping points for the loop precisely. Instead of counting 24 'steps' before completing, the loop continues until it hits exactly the value that you specify. I know that PHP has a much more complex syntax system for it's loops - where the loop continues until the expression evaluates to "false": for ($i = 1; $i < 11; ++$i) { echo ("$i
\n"); //Prints from 1 to 10 } The WebDNA version basically continues until the expression evaluates to "true" ([index]=24). Gary At 11:19 AM 9/6/2004, you wrote: >Hello again... > >I guess the "end" in a loop context is a matching comparison >and not a "math equation". > >If I have: >[loop start=-12&advance=1&end=24] >[index]
>[/loop] > >Instead of ending +12 (which would be logical to me) it ends on >+24. > >This really isn't a question as I understand how it works, but >just wanted to see if others thought this was wierd and/or if >other languages' loops worked in the same way. > >Donovan ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Gary Krockover

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Not really WebCat (1997) OT : Virus (2000) Uniqueness of Cart number (2000) UPS Shipping Primer (2003) [OT] Disable/enable field (2003) WebCat2 - Getting to the browser's username/password data (1997) Math Bug (1999) Deleting associated records from 2 different databases (2001) RE: Missing contexts on NT (1997) [WriteFile] problems (1997) WebMerchant and PC Auth Hub (1999) WCS Newbie question (1997) Force a search at the default.tmpl page? (1997) Add htmlarea 3 to SiteBuilder (2004) UPPERCASE (1997) Change Subtotal (2000) Auto entering Friday's date in a field (2002) Storebuilder Seems to have just died (2003) Am on the list? (1997) [WebDNA] Problem saving returned value as a variable (2012)