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:
Errata: WCS Newbie question (1997)
[/application] error? (1997)
html email again... (2001)
OT: How much is too much? I can never remember theanswer. (2002)
WebCat2 - [format thousands] (1997)
(1997)
ColdFusion v. WebDNA (2004)
japanese characters (1997)
(1997)
price on detail, but not shoppingcart (1997)
NT vs Mac (1997)
Search returns all, not 20 (1997)
Netscape Cache and Linux (2001)
Smith Micro - no competition (2000)
Fwd: checkboxes (2000)
[WebDNA] Versions (2014)
Looking for a host (1997)
Non-Cart Files in Shopping Cart Folder (1997)
Problems with [Search] param - Mac Plugin b15 (1997)
notification solutions (1997)