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 aswell as in ActionScript (Flash/Flex). Totally agree with Ken that thereshould 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 asituation where more than 1 match occurs. I just want the 'break' so thatone can immediately escape from a long iteration of switch/case the instanta match is made.Cheers Terry Nair-----Original Message-----From: Kenneth Grome [mailto:kengrome@gmail.com] Sent: Monday, October 19, 2009 06:26To: talk@webdna.usSubject: 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 nothave. 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:
Hi guys,For the record, I do use a lot of switch/case scenarios. Both in WebDNA aswell as in ActionScript (Flash/Flex). Totally agree with Ken that thereshould 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 asituation where more than 1 match occurs. I just want the 'break' so thatone can immediately escape from a long iteration of switch/case the instanta match is made.Cheers Terry Nair-----Original Message-----From: Kenneth Grome [mailto:kengrome@gmail.com] Sent: Monday, October 19, 2009 06:26To: talk@webdna.usSubject: 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 nothave. 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)