Re: [WebDNA] SWITCH/CASE or SHOWIF

This WebDNA talk-list message is from

2008


It keeps the original formatting.
numero = 101487
interpreted = N
texte = > 1. To go through 100 different choices, is a switch/case more > efficient or 100 showif statements more efficient? I dunno, I would guess that one switch case is faster; at least in other languages, when you evaluate once instead of many times, it's faster. > > > 2. In the final generated HTML code, when 100 SHOWIF statements are > processed, but only 1 is actually shown, the other 99 SHOWIF > statements create line breaks. Is there a way to prevent the line > breaks from showing up if a showif does not evaluate to true? anywhere you don't want the line break to appear when webdna spite out the html then just wrap it with the webdna comment tag, like this one [!] [/!] > > > 3. Does a SWITCH/CASE statement create line breaks for all the cases > that evaluate to false? if it does , then try the trick I just mentioned. > Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] SWITCH/CASE or SHOWIF (Ki Song 2008)
  2. Re: [WebDNA] SWITCH/CASE or SHOWIF ("Dan Strong" 2008)
  3. Re: [WebDNA] SWITCH/CASE or SHOWIF (Toby Cox 2008)
  4. Re: [WebDNA] SWITCH/CASE or SHOWIF (Govinda 2008)
  5. Re: [WebDNA] SWITCH/CASE or SHOWIF ("Dan Strong" 2008)
  6. Re: [WebDNA] SWITCH/CASE or SHOWIF (Ki Song 2008)
  7. Re: [WebDNA] SWITCH/CASE or SHOWIF (Govinda 2008)
  8. [WebDNA] SWITCH/CASE or SHOWIF (Ki Song 2008)
> 1. To go through 100 different choices, is a switch/case more > efficient or 100 showif statements more efficient? I dunno, I would guess that one switch case is faster; at least in other languages, when you evaluate once instead of many times, it's faster. > > > 2. In the final generated HTML code, when 100 SHOWIF statements are > processed, but only 1 is actually shown, the other 99 SHOWIF > statements create line breaks. Is there a way to prevent the line > breaks from showing up if a showif does not evaluate to true? anywhere you don't want the line break to appear when webdna spite out the html then just wrap it with the webdna comment tag, like this one [!] [/!] > > > 3. Does a SWITCH/CASE statement create line breaks for all the cases > that evaluate to false? if it does , then try the trick I just mentioned. > Govinda

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:

b12 cannot limit records returned and more. (1997) Shopping Cart Problem (1998) taxrate - off by 1 cent (1997) Tags in the header (2000) Tab Charactor (1997) Extended [ConvertChars] (1997) [OT] CSS and SSI books (2004) RE: Purchased cart being overwritten - still !?? (1997) Strange behavior (2000) Frames and WebCat (1997) [tcp connect] (1998) [WebDNA] [OT] iTools FTP question (2010) [SearchString] usage (1997) Shipping cost brain lock (1999) Re:Searching for ALL / empty form field (1997) Help w/ Duplicating The General Store 5 times. (1997) PR: WebCatalog Affiliates Program Announced -- Share the revenue for promoting WebCatalog (2000) OBDC Support (1997) Individual Tax on Items (1998) Shownext problems (1999)