Re: if then else. BUG?

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 53409
interpreted = N
texte = If page = "[page]", then the second condition of your OR statement is true, so the [then] block will get called. "[page]" is not enpty. -----Original Message----- From: Donovan Brooke [mailto:dbrooke@euca.us] Sent: Thursday, October 16, 2003 10:48 AM To: WebDNA Talk Subject: Re: if then else. BUG? My logic has been known to have bugs :-) However, I do want the "or" comparison in this case. If page = "[page]" shouldn't I get results from below stating: "var does equal var name or nothing" ? [if ("[page]" ! "[raw][page][/raw]") | ("[page]" ! "")] [then] var does not eqaul var name or nothing [/then] [else] var does equal var name or nothing [/else] [/if] Donovan Scott Anderson wrote: > Looks like a bug in your logic ;) > > 'IF ( P | Q )' is not the same as 'IF ( !P | !Q )' > > 'IF ( P | Q )' is the same as 'IF ( !P & !Q )' > > So test two should be: > [if ("[page]" ! "[raw][page][/raw]") & ("[page]" ! "")] -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE Eucalyptus Design WWW Developer / Consultant <-Web Development (specializing in eCommerce), -> <-Graphic Design, and Pre-Press Consultation -> ADDRESS:> Donovan Brooke DBA Eucalyptus Design N2862 Summerville Park Rd. Lodi, WI 53555 PH:> 1.608.592.3567 email:> dbrooke(AT)euca.us Web:> http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o ------------------------------------------------------------- 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 Web Archive of this list is at: http://webdna.smithmicro.com/ ------------------------------------------------------------- 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 Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: if then else. BUG? ( Donovan Brooke 2003)
  2. Re: if then else. BUG? ( "Scott Anderson" 2003)
  3. Re: if then else. BUG? ( Donovan Brooke 2003)
  4. Re: if then else. BUG? ( "Scott Anderson" 2003)
  5. if then else. BUG? ( Donovan Brooke 2003)
If page = "[page]", then the second condition of your OR statement is true, so the [then] block will get called. "[page]" is not enpty. -----Original Message----- From: Donovan Brooke [mailto:dbrooke@euca.us] Sent: Thursday, October 16, 2003 10:48 AM To: WebDNA Talk Subject: Re: if then else. BUG? My logic has been known to have bugs :-) However, I do want the "or" comparison in this case. If page = "[page]" shouldn't I get results from below stating: "var does equal var name or nothing" ? [if ("[page]" ! "[raw][page][/raw]") | ("[page]" ! "")] [then] var does not eqaul var name or nothing [/then] [else] var does equal var name or nothing [/else] [/if] Donovan Scott Anderson wrote: > Looks like a bug in your logic ;) > > 'IF ( P | Q )' is not the same as 'IF ( !P | !Q )' > > 'IF ( P | Q )' is the same as 'IF ( !P & !Q )' > > So test two should be: > [if ("[page]" ! "[raw][page][/raw]") & ("[page]" ! "")] -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE Eucalyptus Design WWW Developer / Consultant <-Web Development (specializing in eCommerce), -> <-Graphic Design, and Pre-Press Consultation -> ADDRESS:> Donovan Brooke DBA Eucalyptus Design N2862 Summerville Park Rd. Lodi, WI 53555 PH:> 1.608.592.3567 email:> dbrooke(AT)euca.us Web:> http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o ------------------------------------------------------------- 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 Web Archive of this list is at: http://webdna.smithmicro.com/ ------------------------------------------------------------- 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 Web Archive of this list is at: http://webdna.smithmicro.com/ "Scott Anderson"

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:

WebCat2: Items xx to xx shown, etc. (1997) More Shopping Cart Questions/Problems (2000) WebMerchant 3.0? (1998) no global [username] or [password] displayed ... (1997) Programmer Needed (1998) Re(2): typhoon ? (2003) Using Plug-In while running 1.6.1 (1997) searchable list archive (1997) Integration with SQL (1997) SetCookie / GetCookie Problem.... (2004) $Replace with [founditems] (1997) Not really WebCat (1997) WebCat2 - Getting to the browser's username/password data (1997) Country & Ship-to address & other fields ? (1997) iTools WebDNA module keeps crashing (2006) Updating a database once per day - An example (1998) Emailer (1997) restarting service remotely on NT (1997) Major bug report on rootbeer (1997) WebCatalog 2.0 & WebDNA docs in HTML ... (1997)