Re: [Case] on OS X
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 32709
interpreted = N
texte = Although Grant is (as always) trying to be accommodating, I think thisis another case of someone wanting everything, even when it is not reasonable. Switch/case is designed for a specific number of alternatevalues, not a general purpose test like [if]. That is the way it is used in every language I am aware of that contains the construct.I don't see how this is so hard:[if [value]>0] [then]positive numbers[/else][else] [if [value]<0] [then]negative numbers[/then] [else]the zero case[/else] [/if][/else]I could see some utility to an [elseif] tag that fits within the existing [if][then][else] format. I can also see allowing other kinds of string comparisons in a [switch] (as I have already suggested). But there is no reason to muddle up switch/case to be something it was never intended to be.My 2 centsJohn Peacock p.s. On the other matter, badly written code will always have negative consequences, no matter what language or platform. It is very easy to kill your system with badly written assembler or C. If SM changes their program to catch every single badly written page, it will mean WebCat will be fat and slow, thus defeating the whole reason we are running it in the first place. Do your testing on a server that candie at any time!Grant Hulbert wrote:> > >Would it be possible to add comparisons other than '=' to case statements? A> >circumstance like greater than, less than, or equal to zero doesn't easily> >fit without it, and [if][then[else] is cumbersome.> > I think I mentioned before that no language in the world that I know> of supports such a concept, but we'll look into it. I can see some> problems with multiple case statements matching the comparison at> once. We went to great lengths to put [if]..[then]..[else] in> because so many people were asking for it; I certainly hope at this> late stage that people don't think it's too cumbersome.> > >Even if the additional comparisons can't be added, could this possibly be> >modified to produce an error statement instead?> > Certainly we strive to make sure that syntax errors do not cause> unwanted side-effects. We'll see if there's anything clear in the> code that could prevent that kind of error.> > Grant Hulbert, Director of Engineering **********************************> Smith Micro, Internet Solutions Div | eCommerce (WebCatalog)> 16855 West Bernardo Drive, #380 | -------------------------> San Diego, CA 92127 | Software & Site Development> Main Line: (858) 675-1106 | http://www.smithmicro.com> Fax: (858) 675-0372 **********************************#############################################################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 To switch to the INDEX mode, E-mail to Send administrative queries to
Associated Messages, from the most recent to the oldest:
Although Grant is (as always) trying to be accommodating, I think thisis another case of someone wanting everything, even when it is not reasonable. Switch/case is designed for a specific number of alternatevalues, not a general purpose test like [if]. That is the way it is used in every language I am aware of that contains the construct.I don't see how this is so hard:[if [value]>0] [then]positive numbers[/else][else] [if [value]<0] [then]negative numbers[/then] [else]the zero case[/else] [/if][/else]I could see some utility to an [elseif] tag that fits within the existing [if][then][else] format. I can also see allowing other kinds of string comparisons in a [switch] (as I have already suggested). But there is no reason to muddle up switch/case to be something it was never intended to be.My 2 centsJohn Peacock p.s. On the other matter, badly written code will always have negative consequences, no matter what language or platform. It is very easy to kill your system with badly written assembler or C. If SM changes their program to catch every single badly written page, it will mean WebCat will be fat and slow, thus defeating the whole reason we are running it in the first place. Do your testing on a server that candie at any time!Grant Hulbert wrote:> > >Would it be possible to add comparisons other than '=' to case statements? A> >circumstance like greater than, less than, or equal to zero doesn't easily> >fit without it, and [if][then[else] is cumbersome.> > I think I mentioned before that no language in the world that I know> of supports such a concept, but we'll look into it. I can see some> problems with multiple case statements matching the comparison at> once. We went to great lengths to put [if]..[then]..[else] in> because so many people were asking for it; I certainly hope at this> late stage that people don't think it's too cumbersome.> > >Even if the additional comparisons can't be added, could this possibly be> >modified to produce an error statement instead?> > Certainly we strive to make sure that syntax errors do not cause> unwanted side-effects. We'll see if there's anything clear in the> code that could prevent that kind of error.> > Grant Hulbert, Director of Engineering **********************************> Smith Micro, Internet Solutions Div | eCommerce (WebCatalog)> 16855 West Bernardo Drive, #380 | -------------------------> San Diego, CA 92127 | Software & Site Development> Main Line: (858) 675-1106 | http://www.smithmicro.com> Fax: (858) 675-0372 **********************************#############################################################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 To switch to the INDEX mode, E-mail to Send administrative queries to
John Peacock
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:
Sami (1998)
Local redirects ... (2005)
emailer setup (1997)
Making Thumbnail Graphics (1997)
HTML encoding in URLs (1997)
PCS Frames (1997)
Setting up shop (1997)
cart converting to scientific notation format (2001)
Security Tip (1996)
Repeating Fields (1997)
NT 2.1b10 (1998)
PSC recommends what date format yr 2000??? (1997)
Protect vs Authenicate (1997)
Nested tags count question (1997)
[WebDNA] Page close data (2014)
Search all Fields in a db (1997)
PC Hub and Web Merchant (1998)
WebTen and WebCat (1997)
[include file=filename.inc&strip=t] (2002)
Re requiredFields parameter (1998)