What is WebDNA

WebDNA is a scripting and database system designed to easily build web applications.

WebDNA and BioType

BioType service is a biometric keystroke dynamic system. It will be part of WebDNA 8.5

Download WebDNA

Download WebDNA freeware, try it and register later if you want.

WebDNA resources

The list of all WebDNA instructions.
WebDNA
Software Corporation
Search WebDNA Site
 Menu


HOME


DOWNLOADS


LEARN


EDUCATION


NEWS


COMMUNITY


STORE


SUPPORT


CONTACT

{Comparisons} in [showif] vs. [if] Bug? Inconsistency?

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 46364
interpreted = N
texte = on 12/17/02 12:54 PM, Dan Strong at webdna@stronggraphicdesign.com so noted...> [text show=f]duedate=12/18/2002[/text] >
> Payment is due on: [duedate]
> Today's date is: [date]
>
> [SHOWIF {[duedate]}>{[date]}]ACCOUNT IS CURRENT[/SHOWIF] > [SHOWIF {[duedate]}={[date]}]ACCOUNT IS DUE TODAY[/SHOWIF] > [SHOWIF {[duedate]}<{[date]}]ACCOUNT IS OVER DUE[/SHOWIF] >
This brought up an interesting point. I was wondering if the whole [math]{[duedate]}[/math]>[math]{[date]}[/math] thing was still needed in [showif] after the [if] context was introduced. It turns out that they don't operate identically.[if {[duedate]}<{[date]}][then]ACCOUNT IS OVER DUE[/then][/if]Works if [duedate] = 02/01/2002 or 2/1/2002.[showif {[duedate]}<{[date]}]ACCOUNT IS OVER DUE[/showif]Works ONLY if [duedate] = 02/01/2002. It fails if [duedate] = 2/1/2002.For real fun, try this code:[loop start=1&end=12][math show=f]month=[index][/math] [loop start=1&end=31] [showif {[month]/[index]/2002}<{12/31/2002}][month]/[index]/2002 is less
[/showif] [showif {[month]/[index]/2002}>{12/31/2002}][month]/[index]/2002 is more
[/showif] [/loop][/loop]Some (most) dates fail, others don't. Same code works as expected when written with [if].... or is this one of the cases where the doctor says well, don't do that and [showif] isn't *supposed* to operate the same as [if] when it comes to {dates}? : )Mac PI v4.5.0 Rob Marquardt Designer/Resident Wirehead Toast Design800 Washington Avenue North Minneapolis MN 55401 612.330.9863 v 612.321.9424 f www.toastdesign.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. {Comparisons} in [showif] vs. [if] Bug? Inconsistency? (Rob Marquardt 2002)
on 12/17/02 12:54 PM, Dan Strong at webdna@stronggraphicdesign.com so noted...> [text show=f]duedate=12/18/2002[/text] >
> Payment is due on: [duedate]
> Today's date is: [date]
>
> [SHOWIF {[duedate]}>{[date]}]ACCOUNT IS CURRENT[/SHOWIF] > [SHOWIF {[duedate]}={[date]}]ACCOUNT IS DUE TODAY[/SHOWIF] > [SHOWIF {[duedate]}<{[date]}]ACCOUNT IS OVER DUE[/SHOWIF] >
This brought up an interesting point. I was wondering if the whole [math]{[duedate]}[/math]>[math]{[date]}[/math] thing was still needed in [showif] after the [if] context was introduced. It turns out that they don't operate identically.[if {[duedate]}<{[date]}][then]ACCOUNT IS OVER DUE[/then][/if]Works if [duedate] = 02/01/2002 or 2/1/2002.[showif {[duedate]}<{[date]}]ACCOUNT IS OVER DUE[/showif]Works ONLY if [duedate] = 02/01/2002. It fails if [duedate] = 2/1/2002.For real fun, try this code:[loop start=1&end=12][math show=f]month=[index][/math] [loop start=1&end=31] [showif {[month]/[index]/2002}<{12/31/2002}][month]/[index]/2002 is less
[/showif] [showif {[month]/[index]/2002}>{12/31/2002}][month]/[index]/2002 is more
[/showif] [/loop][/loop]Some (most) dates fail, others don't. Same code works as expected when written with [if].... or is this one of the cases where the doctor says well, don't do that and [showif] isn't *supposed* to operate the same as [if] when it comes to {dates}? : )Mac PI v4.5.0 Rob Marquardt Designer/Resident Wirehead Toast Design800 Washington Avenue North Minneapolis MN 55401 612.330.9863 v 612.321.9424 f www.toastdesign.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/ Rob Marquardt

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:

Occasional crashes with $remove (1997) Still Stumped on ShowNext...HELP! (1997) Date search - yes or no (1997) RE: [WebDNA] XML vars from Flash (2009) Catalogs and W* (1996) Problems with emailer cutting off carriage returns (Crossplatformissue?) (1999) Help! WebCat2 bug (1997) WebCat2b13MacPlugIn - more [date] problems (1997) showif and cart (1997) [delete] problem (1997) Configuring E-mail (1997) Virtual hosting and webcatNT (1997) range vs greater than/less than (2003) WebCat2 Append problem (B14Macacgi) (1997) Multiple Merchant Accounts? (1997) syntax question, not in online refernce (1997) Setting up shop (1997) PCS Frames (1997) Checkboxes (1998) Error:Too many nested [xxx] contexts (1997)