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).GaryAt 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:
|
- Re: Loop wierdness? ( Gary Krockover 2004)
- 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).GaryAt 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:
OT: BulkRegister.com (2002)
Linux [decrypt] bug exists only on webcat 3 or also 4? (2000)
code to phantom spacing (2001)
WebCat2: Found Items syntax, etc. (1997)
off topic fetch vs PCS photomaster (1997)
Error Lob.db records error message not name (1997)
triggers.db (1999)
best way to test for the existence of a parameter in a url (2003)
WebMerchant Orders Won't Process (2002)
Simple way to create unique SKU (1997)
Using Applescript to process WebCatalog functions (1998)
Message Board (2001)
WebCatalog for guestbook ? (1997)
Upgrading old WebCat Database Files (1997)
[WebDNA] Server Speed/optomization (2009)
WCS Newbie question (1997)
creating writefile data from a nested search (1997)
[WebDNA] XML Help please (2009)
billing system (2003)
[WebDNA] Best of breed eCommerce and CMS/Sitebuilder templates (2010)