Re: Dividers

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 52037
interpreted = N
texte = Yes, the "if" context performs an implied [math] context on numeric values or expressions, but you do need to be careful with it. For example: [if 3-2>4][then]yes[/then][else]no[/else][/if] returns "yes", even though 3-2 is not greater than 4. If you put the 3-2 in parentheses: [if (3-2)>4][then]yes[/then][else]no[/else][/if] it returns the correct "no". I tried a test with Donovan's "[if floor([num]/100) ! mHundreds]", and it works. So, while I know that the implied math in the if context works, the requirement to be careful with your math expressions is enough to keep me using the (unnecessary) math contexts and square brackets. - brian On Thursday, July 31, 2003, at 10:29 AM, Donovan wrote: > A little slimmer.. (brians minus the [math] stuff): > > > [math show=F]mHundreds=-1[/math] > > [search ...][founditems] > > [if mHundreds < 0][then] > > [math show=F]mHundreds=floor([num]/100)[/math] > > [/then][else] > > [if floor([num]/100) ! mHundreds][then] > >
> > [math show=F]mHundreds=floor([num]/100)[/math] > > [/then][/if] > > [/else][/if] > > [num][field1][field2] > > [/founditems][/search] > > :-) Donovan > > > > Brian Fries wrote: >> My turn... >> [math show=F]mHundreds=-1[/math] >> [search ...][founditems] >> [if [mHundreds]<0][then] >> [math show=F]mHundreds=floor([num]/100)[/math] >> [/then][else] >> [if [math]floor([num]/100)[/math]![mHundreds]][then] >>
>> [math show=F]mHundreds=floor([num]/100)[/math] >> [/then][/if] >> [/else][/if] >> [num][field1][field2] >> [/founditems][/search] >> - brian >> -- Brian Fries, BrainScan Software -- http://www.brainscansoftware.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: Dividers ( Brian Fries 2003)
  2. Re: Dividers ( Donovan 2003)
  3. Re: Dividers ( Brian Fries 2003)
  4. Re: Dividers ( sallyr@dvinci.com (Sally Reidy) 2003)
  5. Re: Dividers ( "WebDna @" 2003)
  6. Re: Dividers ( Steve Craig 2003)
  7. Re: Dividers ( Paul Willis 2003)
  8. Dividers ( Steve Craig 2003)
Yes, the "if" context performs an implied [math] context on numeric values or expressions, but you do need to be careful with it. For example: [if 3-2>4][then]yes[/then][else]no[/else][/if] returns "yes", even though 3-2 is not greater than 4. If you put the 3-2 in parentheses: [if (3-2)>4][then]yes[/then][else]no[/else][/if] it returns the correct "no". I tried a test with Donovan's "[if floor([num]/100) ! mHundreds]", and it works. So, while I know that the implied math in the if context works, the requirement to be careful with your math expressions is enough to keep me using the (unnecessary) math contexts and square brackets. - brian On Thursday, July 31, 2003, at 10:29 AM, Donovan wrote: > A little slimmer.. (brians minus the [math] stuff): > > > [math show=F]mHundreds=-1[/math] > > [search ...][founditems] > > [if mHundreds < 0][then] > > [math show=F]mHundreds=floor([num]/100)[/math] > > [/then][else] > > [if floor([num]/100) ! mHundreds][then] > >
> > [math show=F]mHundreds=floor([num]/100)[/math] > > [/then][/if] > > [/else][/if] > > [num][field1][field2] > > [/founditems][/search] > > :-) Donovan > > > > Brian Fries wrote: >> My turn... >> [math show=F]mHundreds=-1[/math] >> [search ...][founditems] >> [if [mHundreds]<0][then] >> [math show=F]mHundreds=floor([num]/100)[/math] >> [/then][else] >> [if [math]floor([num]/100)[/math]![mHundreds]][then] >>
>> [math show=F]mHundreds=floor([num]/100)[/math] >> [/then][/if] >> [/else][/if] >> [num][field1][field2] >> [/founditems][/search] >> - brian >> -- Brian Fries, BrainScan Software -- http://www.brainscansoftware.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/ Brian Fries

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:

[WebDNA] WA,WO or how to find products with multiple selects .... (2018) SiteGuard Admin Feature ? (1997) [WebDNA] Live Currency exchanege rates (2008) When do we get to request new features? (1999) psst (1997) NTbeta18 corrupted? (1997) WebCatalog 2.0 & WebDNA docs in HTML ... (1997) searchable list archive (1997) Download URL & access on the fly ? (1997) Convert characters (2002) Fwd: checkboxes (2000) Newbie from and old bee (1997) Authorize.net? (2003) StoreBuilder Shopping Cart (2000) ShipCost and TaxRate problems (1998) [WebDNA] OT: what is the "right" platform ? (2009) [include] affect on filepaths for links? (1997) WC Database Format (1997) How do I get multiple unique numbers on one template? (2000) setting taxable to true (1997)