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 this is another case of someone wanting everything, even when it is not reasonable. Switch/case is designed for a specific number of alternate values, 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 can die 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:

    
  1. Re: [Case] on OS X (John Peacock 2000)
  2. Re: [Case] on OS X (Pat McCormick 2000)
  3. Re: [Case] on OS X (John Peacock 2000)
  4. Re: [Case] on OS X (Grant Hulbert 2000)
  5. [Case] on OS X (Pat McCormick 2000)
Although Grant is (as always) trying to be accommodating, I think this is another case of someone wanting everything, even when it is not reasonable. Switch/case is designed for a specific number of alternate values, 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 can die 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:

Mac Lockup Problems (1998) Apache mod_rewrite or custom error page? (2003) Multiple cart additions (1997) Modifying Carts (1999) admin login weirdness (2000) OSX Webcatalog Install (2001) Setting up shop (1997) EMailFolder will not send (2003) Auto Submit (2000) WebCat2b12 CGI Mac - [shownext] problem (1997) [WebDNA] Security best practice (2009) WebCatalog 2.0 b 15 mac (1997) more on quicktime test stuff (1997) Search design (1997) [WebDNA] Putting '&search' into URL killing all search contexts on my sites (2010) CDATA problems (2008) OT: Apache Question (2003) Re[2]: WebCatalog on Linux (2000) Problem with 2.1b3 (1997) Mozilla/4. and Browser Info.txt (1997)