Re: [WebDNA] Data Type Bool

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 103228
interpreted = N
texte = --Apple-Mail-7--829851018 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On Aug 5, 2009, at 11:37 AM, Govinda wrote: >>> > Be aware that something like [showif [instock]=1] is >>> >the same as [showif [instock]] as long as [instock] is >>> >greater than zero when an item is actually in stock. It >>> >helps make the code a little bit more readable, too. > > there was discussion back around version 4 release (year 2000?) > (IIRC) about [if] expressions taking advantage of boolean states > behind the scenes, so that one could use code like what Patrick was > referring to. In those days I did not pay enough attention about > that to say more now... but if you wanted to look into the roots of > this discussion, searching the old archives for what I am referring > to would be a good start. I happened on this from the docs on [if].. (this was what I was referring to.. in case it's useful for anyone who did not already see this before) - " Comparisons are always case-insensitive so "grant" equals "GRANT". The expression is evaluated as a mathematical boolean equation, where each sub-expression evaluates to either 0 or 1 (meaning true or false). If the entire evaluated expression is true, then the WebDNA inside the [Then] contexxt is executed, otherwise the [Else] context is executed. The [Math] context has been extended to allow for quoted text and boolean operators, and is actually what is used by [If] to perform the work of evaluating the expression. A side-effect of this allows you to use these operators inside a [math] equation: [math]1<3[/math] evaluates to "1", because the equation is true. Conversely, [math]3<1[/ math] evaluates to "0" because the equation is false. Similarly, [math]1&1[/math] evaluates to "1", and [math]1&0[/math] evaluates to "0". " --Apple-Mail-7--829851018 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable
On Aug = 5, 2009, at 11:37 AM, Govinda wrote:

> Be aware that something like [showif = [instock]=3D1] is 
>the same as [showif [instock]] as long as = [instock] is 
>greater than zero when an item is actually in = stock. It 
>helps make the code a little bit more readable, = too.
<= br>
there was discussion back around version 4 release (year = 2000?)  (IIRC) about [if] expressions taking advantage of boolean = states behind the scenes, so that one could use code like what Patrick = was referring to.  In those days I did not pay enough attention = about that to say more now...  but if you wanted to look into the = roots of this discussion, searching the old archives for what I am = referring to would be a good start.

I happened on = this from the docs on [if]..  
(this was what = I was referring to..  in case it's useful for anyone who did not = already see this before) -

"
Comparisons are = always case-insensitive so "grant" equals "GRANT". The expression is = evaluated as a mathematical boolean equation, where each sub-expression = evaluates to either 0 or 1 (meaning true or false). If the entire = evaluated expression is true, then the WebDNA inside the [Then] contexxt = is executed, otherwise the [Else] context is executed. The [Math] = context has been extended to allow for quoted text and boolean = operators, and is actually what is used by [If] to perform the work of = evaluating the expression. A side-effect of this allows you to use these = operators inside a [math] equation: [math]1<3[/math] evaluates to = "1", because the equation is true. Conversely, [math]3<1[/math] = evaluates to "0" because the equation is false. Similarly, = [math]1&1[/math] evaluates to "1", and [math]1&0[/math] = evaluates to "0".
"
=
= --Apple-Mail-7--829851018-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Data Type Bool (John Butler 2009)
  2. Re: [WebDNA] Data Type Bool (Patrick McCormick 2009)
  3. Re: [WebDNA] Data Type Bool (Brian Fries 2009)
  4. Re: [WebDNA] Data Type Bool (Patrick McCormick 2009)
  5. Re: [WebDNA] Data Type Bool (Govinda 2009)
  6. Re: [WebDNA] Data Type Bool ("Terry Wilson" 2009)
  7. Re: [WebDNA] Data Type Bool (Patrick McCormick 2009)
  8. Re: [WebDNA] Data Type Bool ("Ki Song - Knifecenter.com" 2009)
  9. Re: [WebDNA] Data Type Bool ("Terry Wilson" 2009)
  10. Re: [WebDNA] Data Type Bool (Patrick McCormick 2009)
  11. Re: [WebDNA] Data Type Bool (Donovan Brooke 2009)
  12. Re: [WebDNA] Data Type Bool (Marc Thompson 2009)
  13. Re: [WebDNA] Data Type Bool (Patrick McCormick 2009)
  14. Re: [WebDNA] Data Type Bool (Marc Thompson 2009)
  15. Re: [WebDNA] Data Type Bool (Patrick McCormick 2009)
  16. Re: [WebDNA] Data Type Bool (Terry Wilson 2009)
  17. Re: [WebDNA] Data Type Bool ("Ki Song - Knifecenter.com" 2009)
  18. Re: [WebDNA] Data Type Bool (Govinda 2009)
  19. [WebDNA] Data Type Bool ("Ki Song - Knifecenter.com" 2009)
--Apple-Mail-7--829851018 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On Aug 5, 2009, at 11:37 AM, Govinda wrote: >>> > Be aware that something like [showif [instock]=1] is >>> >the same as [showif [instock]] as long as [instock] is >>> >greater than zero when an item is actually in stock. It >>> >helps make the code a little bit more readable, too. > > there was discussion back around version 4 release (year 2000?) > (IIRC) about [if] expressions taking advantage of boolean states > behind the scenes, so that one could use code like what Patrick was > referring to. In those days I did not pay enough attention about > that to say more now... but if you wanted to look into the roots of > this discussion, searching the old archives for what I am referring > to would be a good start. I happened on this from the docs on [if].. (this was what I was referring to.. in case it's useful for anyone who did not already see this before) - " Comparisons are always case-insensitive so "grant" equals "GRANT". The expression is evaluated as a mathematical boolean equation, where each sub-expression evaluates to either 0 or 1 (meaning true or false). If the entire evaluated expression is true, then the WebDNA inside the [Then] contexxt is executed, otherwise the [Else] context is executed. The [math] context has been extended to allow for quoted text and boolean operators, and is actually what is used by [if] to perform the work of evaluating the expression. A side-effect of this allows you to use these operators inside a [math] equation: [math]1<3[/math] evaluates to "1", because the equation is true. Conversely, [math]3<1[/ math] evaluates to "0" because the equation is false. Similarly, [math]1&1[/math] evaluates to "1", and [math]1&0[/math] evaluates to "0". " --Apple-Mail-7--829851018 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable
On Aug = 5, 2009, at 11:37 AM, Govinda wrote:

> Be aware that something like [showif = [instock]=3D1] is 
>the same as [showif [instock]] as long as = [instock] is 
>greater than zero when an item is actually in = stock. It 
>helps make the code a little bit more readable, = too.
<= br>
there was discussion back around version 4 release (year = 2000?)  (IIRC) about [if] expressions taking advantage of boolean = states behind the scenes, so that one could use code like what Patrick = was referring to.  In those days I did not pay enough attention = about that to say more now...  but if you wanted to look into the = roots of this discussion, searching the old archives for what I am = referring to would be a good start.

I happened on = this from the docs on [if]..  
(this was what = I was referring to..  in case it's useful for anyone who did not = already see this before) -

"
Comparisons are = always case-insensitive so "grant" equals "GRANT". The expression is = evaluated as a mathematical boolean equation, where each sub-expression = evaluates to either 0 or 1 (meaning true or false). If the entire = evaluated expression is true, then the WebDNA inside the [Then] contexxt = is executed, otherwise the [Else] context is executed. The [math] = context has been extended to allow for quoted text and boolean = operators, and is actually what is used by [if] to perform the work of = evaluating the expression. A side-effect of this allows you to use these = operators inside a [math] equation: [math]1<3[/math] evaluates to = "1", because the equation is true. Conversely, [math]3<1[/math] = evaluates to "0" because the equation is false. Similarly, = [math]1&1[/math] evaluates to "1", and [math]1&0[/math] = evaluates to "0".
"
=
= --Apple-Mail-7--829851018-- John Butler

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:

problems with 2 tags (1997) Help! WebCat2 bug (1997) WebCatalog not recognizing ShoppingCarts folder (2000) database freeze (1997) Errata: WCS Newbie question (1997) Hummm .... (2002) [Announce]: Web server security and password protection (1997) If Empty ? (1997) Date search and sendmail (1997) Use WebCat to search files in a folder like a search engine? (2001) Web Developer Product Awards (1997) Image maps/Webcat (1997) advanced sorting (2001) Country & Ship-to address & other fields ? (1997) Upcoming 2.1 Release and PCS Committment (1997) No Data (1997) Close-to Comparison Code (1998) WebCat b15 Mac plug-in (1997) Question (2001) Automatic Download? (2003)