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:

remotely add + sign (1997) [WebDNA] TCPConnect assist (2016) Expert tech support -- a fast and simple solution (long) ... (2000) BR (1997) Searchable WebCat (etc.) Docs ? (1997) Separate SSL Server (1997) Search Engine questions ... (2002) Summing fields (1997) Error Log.db --however (1997) Running _every_ page through WebCat-error.html (1997) this works sometimes and sometimes not (1997) RE: Clearing orders and database help! (1997) Re:no [search] with NT (1997) Include file not working on remote directory. (2004) Emailer help....! (1997) Calendar Snippet Problems (1998) NumFound (1999) Big Databases (1997) Not seeing cart info on Invoice.tmpl (was PROBLEM) (1997) Simple way to create unique SKU (1997)