Re: [WebDNA] tag [validcard] fails on webdna 7.0. Do I need the commerce edition?

This WebDNA talk-list message is from

2011


It keeps the original formatting.
numero = 106399
interpreted = N
texte = On Mar 21, 2011, at 8:59 AM, Tom Duke wrote: > Brian, >=20 > Hi - nice function. I'm curious as to why you use '1=3D1' and '1=3D0' = for your true/false outputs. >=20 > - Tom >=20 If you set a 1=3D1 and 1=3D0, evaluate as true and false within any = [if], [showif] or [hideif]. By returning these values, I can use the = simple syntax examples: [if [ccValid =85]] [then]good stuff[/then] [else]bad stuff[/else] [/if] [showif [ccValid =85]] good stuff [/showif] [hideif [ccValid =85]] bad stuff [/hideif] I use this technique throughout my code, commonly with global text = variables set: [text]true=3D1=3D1[/text] [text]false=3D1=3D0[/text] Then I can do things like this: [text]foundIt=3D[false][/text] [listwords words=3D[listofwords]] [showif [word]=3D[whatIWant]][text]foundIt=3D[true][/text][/showif= ] [/listwords] [if [foundIt]] [then]do the stuff[/then] [else]do the other stuff][/else] [/if] With good variable names, it makes the code very readable. For me, it's = much cleaner than testing for "T" or "F" values. Brian Fries BrainScan Software Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] tag [validcard] fails on webdna 7.0. Do I need the commerce edition? (Brian Fries 2011)
  2. Re: [WebDNA] tag [validcard] fails on webdna 7.0. Do I need the commerce edition? (Govinda 2011)
  3. Re: [WebDNA] tag [validcard] fails on webdna 7.0. Do I need the commerce edition? (Brian Fries 2011)
  4. Re: [WebDNA] tag [validcard] fails on webdna 7.0. Do I need the commerce edition? (Kenneth Grome 2011)
  5. [WebDNA] tag [validcard] fails on webdna 7.0. Do I need the commerce edition? (nelson chen 2011)
On Mar 21, 2011, at 8:59 AM, Tom Duke wrote: > Brian, >=20 > Hi - nice function. I'm curious as to why you use '1=3D1' and '1=3D0' = for your true/false outputs. >=20 > - Tom >=20 If you set a 1=3D1 and 1=3D0, evaluate as true and false within any = [if], [showif] or [hideif]. By returning these values, I can use the = simple syntax examples: [if [ccValid =85]] [then]good stuff[/then] [else]bad stuff[/else] [/if] [showif [ccValid =85]] good stuff [/showif] [hideif [ccValid =85]] bad stuff [/hideif] I use this technique throughout my code, commonly with global text = variables set: [text]true=3D1=3D1[/text] [text]false=3D1=3D0[/text] Then I can do things like this: [text]foundIt=3D[false][/text] [listwords words=3D[listofwords]] [showif [word]=3D[whatIWant]][text]foundIt=3D[true][/text][/showif= ] [/listwords] [if [foundIt]] [then]do the stuff[/then] [else]do the other stuff][/else] [/if] With good variable names, it makes the code very readable. For me, it's = much cleaner than testing for "T" or "F" values. Brian Fries BrainScan Software Brian Fries

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:

Summing fields (1997) variables in or out of includes (2001) Re:trouble (1997) [WebDNA] Admin Login Required to Serve any TPL Page (2009) New WebMerchant/Mac beta available (1997) Multiple catalog databases and showcart (1997) how to post without certain data appearing in the html source (2001) WebCatalog + Linux + ODBC + Oracle ! ? (2000) [LOOKUP] (1997) HELP! Search finding too much! (1998) GMT Date/Time (2000) Multiple download orders of the same product? (1997) proper way to check if a container is empty? (2000) WebTen + WebCatalog Plugin clarification (1998) I'm tired of all this! (2000) Statistics... (2004) More questions about serial number dishing (1997) Multiple cart additions (1997) WebMerchant Problem (1999) Opinion: [input] should be called [output] ... (1997)