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 AMTo: WebDNA TalkSubject: 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 belowstating:"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]DonovanScott 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 toWeb 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:
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 AMTo: WebDNA TalkSubject: 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 belowstating:"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]DonovanScott 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 toWeb 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:
If Empty ? (1997)
Quitting WebMerchant ? (1997)
Problems passing [SKU] with $Replace in 2.0 (1997)
HELP! 10K hits per hour for pages that no longer exist! (2000)
How to find 100 most recent additions. (1997)
THANKS (1997)
[LOOKUP] (1997)
Carriage Returns on mail receipt (2002)
WebCat2b15MacPlugIn - [authenticate] not [protect] (1997)
problems with 2 tags (1997)
Generating Report Totals (1997)
What am I missing (1997)
Location of Webcat site in folder hierarchy (1997)
final on include (1997)
(2004)
Security Question (1997)
[WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (2012)
international time (1997)
[OT] Mac Utility Required (2000)
Javascript and Pull Down menus (1999)