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:

OT (maybe) Setting up local (non internet) test computers (2000) [WebDNA] Need Rosetta to install on OS X? (2010) Removing [showif] makes a big difference in speed (1997) Hiding my Source Code with W* (2000) WebCat2b15MacPlugin - showing [math] (1997) Sendmail (1997) Storebuilder Problems...Looking for last minute heroic effort. (2004) Variable Prices (1998) Cannot calculate prices (1997) re-sorting founditems (2002) Date Sorting (1997) RE: OK, here goes... (1997) [WebDNA] WebDNA hosting options (2020) Running WebCat from a CD-ROM (1997) FEA REQ: One .hdr, multiple .db's (2003) Two prices in shoppingcart? (1997) international time (1997) cart converting to scientific notation format (2001) E-mailer application times out (1998) [WebDNA] random blank results? how come? (2014)