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:

Separate SSL Server (1997) Text data with spaces in them... (1997) Emailer Problem (2000) Help formatting search results w/ table (1997) Version f1 status (1997) [OT] See Flash? (2003) cart converting to scientific notation format (2001) Don'y know if this is a sily question... (2003) The Archives? (1999) [ListFiles] & [loop] (1998) Username for Admin Group (1997) The IBC root beer has arrived! (1997) Stopping bad HTML propagation ? (1997) Replacing entry (1998) A little syntax help (1997) Max Record length restated as maybe bug (1997) New public beta available (1997) WebCat2b13MacPlugIn - more [date] problems (1997) Random Images (2000) Banner DNA (1997)