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:
Where's Cart Created ? (1997)
WC2b15 - [HTMLx]...[/HTMLx] problems (1997)
Possible Bug in 2.0b15.acgi (1997)
A little help on e-mail (HELP!!! :-) ) (1998)
A Global Variable (1997)
Math with Time (1997)
Interfacing WebMerchant to www.fedex.com (1997)
Summary search -- speed (1997)
delete after x (1998)
WebCat2 several catalogs? (1997)
[WebDNA] WebDNA glitch, no response required ... (2009)
Storebuilder Problems...Looking for last minute heroic (2004)
nested showif? (1998)
Multiple prices (1997)
WebCat2b14MacPlugIn - [include] doesn't hide the search string (1997)
Running 2 two WebCatalog.acgi's (1996)
Databases going to sleep (1998)
Preventing code execution (2003)
problems with WebCat-Plugin ()
Error Lob.db records error message not name (1997)