Re: [math] are you there?

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 24341
interpreted = N
texte = *This message was transferred with a trial version of CommuniGate(tm) Pro* Howard's correct that the length of the variable name is the source of your problem. In general, there's no problem putting [format] inside [math]. However, the best solution, is to reduce the overall number of contexts (and not nest [math] inside of [math]) and just do this:[format .2f][math]sub=[sub]+([price]*[quantity])[/math][/format]Note that this has the same desired affect. Most of the time, when you embed a [math] inside a [math] you can do it differently with one [math] and make the code clearer and faster.John.At 01:59 PM 11/13/99, you wrote: >*This message was transferred with a trial version of CommuniGate(tm) Pro* >I could be wrong on this, but I believe it's illegal to use a format >context inside of a math context. Try to take that out of there and see >if it works. > >If you *need* to have the truncated value before you deal with the rest >of the math statement, as opposed to truncating on the end, try this >debug method: > >[text show=f]TempVal=[format .2f][quantity]*[price][/format][/text] >[math]ModifiedSubTotal=ModifiedSubTotal+[TempVal][/math] > > >Another note as well. I remember reading a long time ago that math and >text variables were limited to 12 characters in length, and that it >ignored anything after that. So, if that is the case, remember to steer >away from other variable names that begin with ModifiedSubT > > > >-Howard > >On Sat, 13 Nov 1999, John Butler wrote: > >> Weekend cats :-), >> >> My simple [math] is turning up nothing and I don't know why... >> >> I'm on: >> web* 4.1 b/17 >> webcat plugin 3.05b10 >> >> I have an embedded search that finds records from the orders-lineitmes.db and calculates >> the subtotal for that order on the fly with this: >> >> >> [Search db=Orders-Lineitems.db&eqOrderIDdatarq=[OrderID]&LineIndexsort=1] >> [FoundItems] >> >> > > > > >> [Replace >> db=TempModSubTotal.db&eqOrderIDdata=[OrderID]&Append=T]OrderID=[OrderID]&Mod ifiedSubTotal=[math]ModifiedSubTotal[/math][/Replace] >> >> ModifiedSubTotal=[math]ModifiedSubTotal[/math] or >> [ModifiedSubTotal] >> [/FoundItems][/Search] >> >> (That last table row is just so I can see the status of [ModifiedSubTotal] each loop thru >> the founditems) >> The value for ModifiedSubTotal never makes it into the db, and the returned html for >> that test table row always comes out- >> >> ModifiedSubTotal= or [ModifiedSubTotal] >> >> And for sure the search does find something, so that is not the issue >> Seems like I am not understanding something about the way [math] works...? >> ANyone know what is up? >> >> -John >> >> >> ------------------------------------------------------------- >> Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. >> To end your Mail problems go to . >> >> 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 >> > > >------------------------------------------------------------- >Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. >To end your Mail problems go to . > >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 >John Hill ------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .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 Associated Messages, from the most recent to the oldest:

    
  1. Re: [math] are you there? (Kenneth Grome 1999)
  2. Re: [math] are you there? (PCS Technical Support 1999)
  3. Re: [math] are you there? (John Butler 1999)
  4. Re: [math] are you there? (Kenneth Grome 1999)
  5. Re: [math] are you there? (PCS Technical Support 1999)
  6. Re: [math] are you there? (Howard Wolosky 1999)
  7. Re: [math] are you there? (Kenneth Grome 1999)
  8. Re: [math] are you there? (John Hill 1999)
  9. Re: [math] are you there? (Howard Wolosky 1999)
  10. [math] are you there? (John Butler 1999)
*This message was transferred with a trial version of CommuniGate(tm) Pro* Howard's correct that the length of the variable name is the source of your problem. In general, there's no problem putting [format] inside [math]. However, the best solution, is to reduce the overall number of contexts (and not nest [math] inside of [math]) and just do this:[format .2f][math]sub=[sub]+([price]*[quantity])[/math][/format]Note that this has the same desired affect. Most of the time, when you embed a [math] inside a [math] you can do it differently with one [math] and make the code clearer and faster.John.At 01:59 PM 11/13/99, you wrote: >*This message was transferred with a trial version of CommuniGate(tm) Pro* >I could be wrong on this, but I believe it's illegal to use a format >context inside of a math context. Try to take that out of there and see >if it works. > >If you *need* to have the truncated value before you deal with the rest >of the math statement, as opposed to truncating on the end, try this >debug method: > >[text show=f]TempVal=[format .2f][quantity]*[price][/format][/text] >[math]ModifiedSubTotal=ModifiedSubTotal+[TempVal][/math] > > >Another note as well. I remember reading a long time ago that math and >text variables were limited to 12 characters in length, and that it >ignored anything after that. So, if that is the case, remember to steer >away from other variable names that begin with ModifiedSubT > > > >-Howard > >On Sat, 13 Nov 1999, John Butler wrote: > >> Weekend cats :-), >> >> My simple [math] is turning up nothing and I don't know why... >> >> I'm on: >> web* 4.1 b/17 >> webcat plugin 3.05b10 >> >> I have an embedded search that finds records from the orders-lineitmes.db and calculates >> the subtotal for that order on the fly with this: >> >> >> [Search db=Orders-Lineitems.db&eqOrderIDdatarq=[OrderID]&LineIndexsort=1] >> [founditems] >> >> > > > > >> [Replace >> db=TempModSubTotal.db&eqOrderIDdata=[OrderID]&Append=T]OrderID=[OrderID]&Mod ifiedSubTotal=[math]ModifiedSubTotal[/math][/Replace] >> >> ModifiedSubTotal=[math]ModifiedSubTotal[/math] or >> [ModifiedSubTotal] >> [/FoundItems][/Search] >> >> (That last table row is just so I can see the status of [ModifiedSubTotal] each loop thru >> the founditems) >> The value for ModifiedSubTotal never makes it into the db, and the returned html for >> that test table row always comes out- >> >> ModifiedSubTotal= or [ModifiedSubTotal] >> >> And for sure the search does find something, so that is not the issue >> Seems like I am not understanding something about the way [math] works...? >> ANyone know what is up? >> >> -John >> >> >> ------------------------------------------------------------- >> Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. >> To end your Mail problems go to . >> >> 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 >> > > >------------------------------------------------------------- >Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. >To end your Mail problems go to . > >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 >John Hill ------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .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 John Hill

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:

mac hack (1997) OT Weird Messenger Service message (2002) WebTV (1998) Implementing Gift Certificates in online store (1998) how does multiple [cart] commands work? (2007) writefile and deletefile (1998) pc (1997) Add htmlarea 3 to SiteBuilder (2004) WebCat website for developers and hosters (2001) Tab Delimited Files / FM Pro (1997) Help with Repost Data msg from form (1997) [CART] inside a [LOOP] (1997) Summing fields (1997) [listfiles] with max? (2000) Not reading code (1997) WC2b15 File Corruption (1997) authenticate and password (1998) Emailer (WebCat2) (1997) big database file (2000) autocommit problem (1998)