Re: [WebDNA] lists opinion

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 103832
interpreted = N
texte = Since we're talking about adding [break] tags, I believe they should be available in EVERY looping context - [founditems], [listwords], [formvariables], [listfiles], [lineitems], etc. Currently if I'm in a looping context and I've already found what I need, I have to set a "done" flag and add logic to ignore further passes through the loop. Brian Fries BrainScan Software On Oct 18, 2009, at 5:41 PM, Terry Nair wrote: > Hi guys, > > For the record, I do use a lot of switch/case scenarios. Both in > WebDNA as > well as in ActionScript (Flash/Flex). Totally agree with Ken that > there > should be a 'break' statement in WebDNA, just as there is in > ActionScript > (AS). Having said that, I must also state that I have not > encountered a > situation where more than 1 match occurs. I just want the 'break' so > that > one can immediately escape from a long iteration of switch/case the > instant > a match is made. > > Cheers Terry Nair > > -----Original Message----- > From: Kenneth Grome [mailto:kengrome@gmail.com] > Sent: Monday, October 19, 2009 06:26 > To: talk@webdna.us > Subject: Re: [WebDNA] lists opinion > >>> Why not change switch/case so that it only displays the first >>> matching case? It displays all matching cases right now, and that's >>> why I have never used it -- because I want it to display only the >>> first matching case just like similar functions in other languages. >> >> >> IIRC, switch case in PHP matches any all cases after the first >> matching case.. until/unless it hits a break; statement. > > So maybe all webdna needs is a break statement which it currently > does not > have. Actually it has one, but it only works for [loop] -- not for > [switch]. > > Sincerely, > Ken Grome > > > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ > Bug Reporting: http://forum.webdna.us/eucabb.html?page=topics&category=288 Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] lists opinion - [listwords] delimiter change (Govinda 2009)
  2. Re: [WebDNA] lists opinion (Donovan Brooke 2009)
  3. Re: [WebDNA] lists opinion (Govinda 2009)
  4. Re: [WebDNA] lists opinion (Dan Strong 2009)
  5. Re: [WebDNA] lists opinion (Brian Fries 2009)
  6. RE: [WebDNA] lists opinion ("Terry Nair" 2009)
  7. Re: [WebDNA] lists opinion ("Terry Wilson" 2009)
  8. Re: [WebDNA] lists opinion (Kenneth Grome 2009)
  9. Re: [WebDNA] lists opinion (Govinda 2009)
  10. Re: [WebDNA] lists opinion (Kenneth Grome 2009)
  11. Re: [WebDNA] lists opinion (Govinda 2009)
  12. Re: [WebDNA] lists opinion (Donovan Brooke 2009)
  13. Re: [WebDNA] lists opinion - [listwords] delimiter change (Brian Fries 2009)
  14. Re: [WebDNA] lists opinion - [listwords] delimiter change (Donovan Brooke 2009)
  15. Re: [WebDNA] lists opinion (Brian Fries 2009)
  16. Re: [WebDNA] lists opinion (Govinda 2009)
  17. [WebDNA] lists opinion (Donovan Brooke 2009)
Since we're talking about adding [break] tags, I believe they should be available in EVERY looping context - [founditems], [listwords], [formvariables], [listfiles], [lineitems], etc. Currently if I'm in a looping context and I've already found what I need, I have to set a "done" flag and add logic to ignore further passes through the loop. Brian Fries BrainScan Software On Oct 18, 2009, at 5:41 PM, Terry Nair wrote: > Hi guys, > > For the record, I do use a lot of switch/case scenarios. Both in > WebDNA as > well as in ActionScript (Flash/Flex). Totally agree with Ken that > there > should be a 'break' statement in WebDNA, just as there is in > ActionScript > (AS). Having said that, I must also state that I have not > encountered a > situation where more than 1 match occurs. I just want the 'break' so > that > one can immediately escape from a long iteration of switch/case the > instant > a match is made. > > Cheers Terry Nair > > -----Original Message----- > From: Kenneth Grome [mailto:kengrome@gmail.com] > Sent: Monday, October 19, 2009 06:26 > To: talk@webdna.us > Subject: Re: [WebDNA] lists opinion > >>> Why not change switch/case so that it only displays the first >>> matching case? It displays all matching cases right now, and that's >>> why I have never used it -- because I want it to display only the >>> first matching case just like similar functions in other languages. >> >> >> IIRC, switch case in PHP matches any all cases after the first >> matching case.. until/unless it hits a break; statement. > > So maybe all webdna needs is a break statement which it currently > does not > have. Actually it has one, but it only works for [loop] -- not for > [switch]. > > Sincerely, > Ken Grome > > > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ > Bug Reporting: http://forum.webdna.us/eucabb.html?page=topics&category=288 Brian Fries

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: How much is too much? I can never remember the answer. (2002) WebDNA 5.0 freeBSD?!!? (2003) browser info.txt and SSL (1997) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) How to Display text in empty fields (1997) test (2002) Re:listfiles-looking for slick solution (1997) Mac & Internet Explorer (2000) suffix mapping, use of cache, etc. (1997) [OT] Linux Vs. OSX (leopard) server (2007) Cancel Subscription (1996) PIXO (1997) URGENT: WebCatalog 2.0 (1998) A little syntax help (1997) FYI: virus alert (1996) 4.5 Upgrade (2003) What am I missing (1997) [ot] table gap help?!? (2001) WebCat2b13MacPlugIn - more [date] problems (1997) Preserving file creation dates on [copyfile] (2007)