RE: [WebDNA] lists opinion

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 103825
interpreted = N
texte = 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 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)
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 "Terry Nair"

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:

Last Record not recognized? (1999) NY taxRates.db? (1997) [WebDNA] WebDNA Showcase? (2008) Sun doesn't have an emailer app? (2000) [sendmail] and [formvariables] (1997) Help name our technology! I found it (1997) [WebDNA] TLS 1.2 and [tcpconnect] (2018) Quitting WebMerchant ? (1997) Sku numbers (1997) shipcost and Formulas.db (2000) PCS Frames (1997) Server Load Tester (2000) Plugin or CGI or both (1997) popups, netscape vs explorer (1997) [QuantityPrice] Not working in WebCatNT 2.0.1??? (1997) PSC recommends what date format yr 2000??? (1997) New Installation (1998) WebCatalog 2.0 & WebDNA docs in HTML ... (1997) Quick Question (1997) Some Questions (1997)