Re: [include ...] behavior

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 13860
interpreted = N
texte = Thanks, Grant. I have a few questions and I'm including the specific code below.At 2:07 AM 10/10/97, you wrote: >>What kind of reasons might there be this scenario: an [include ...] to not >>work properly but the pasting the exact contents of that included functions >>fine? > >Depends on what you're trying to do. Can you be more specific? I'll rub >my crystal monitor here and imagine... > >1) You're using an [include] inside a math expression, and you use BBEdit >to create the include file >2) You've nested the [include]s really really deep >3) Your included file uses [cart], and for some reason the cart# just >doesn't make it through > >Answers: >1) BBEdit has the annoying habit of adding an extra carriage return to the >end of a file, thus messing up the [math] context because carriage return >is illegalI am using BBEdit. This info helps, and I definitely notice that behavior, but it didn't resolve the problem.>2) Stack space being limited, the [include] just uses up so much that >there's none left, and can't execute any more WebDNAI am nesting includes. How deep is really really deep? Is there a way to adjust stack space? Is there a way to know when this takes place other than by guessing based on incorrect results?>3) Change it to [include file=xx&cart=[cart]]Didn't change things.Here's my code, along with commentary about the part that is not working. (In our store, there are different prices for nonsubscribers and subscribers, as well as quantity pricing, which is available to both):*** in ShoppingCart.tmpl ******************************[orderfile cart=[cart]]nosub: [format .2f][math]0[lineitems]+([math][quantity]*[include incs/nosubpricecalc.inc][/math])[/lineitems][/math][/format]
sub(inc): [format .2f][math]0[lineitems]+([math][quantity]*[include file=incs/subpricecalc.inc&cart=[cart]][/math])[/lineitems][/math][/format]
sub(spelledout): [format .2f][math]0[lineitems]+([math][quantity]*[SHOWIF [lookup db=upline.db&lookInField=sku&value=[sku]&returnField=subprice]>[include Incs/nosubpricecalc.inc]][include Incs/nosubpricecalc.inc][/SHOWIF][HIDEIF [lookup db=upline.db&lookInField=sku&value=[sku]&returnField=subprice]>[include Incs/nosubpricecalc.inc]][lookup db=upline.db&lookInField=sku&value=[sku]&returnField=subprice][/HIDEIF][/math])[ /lineitems][/math][/format]
[/orderfile]*** in Incs/nosubpricecalc.inc ******************************[math][lookup db=upline.db&lookInField=sku&value=[sku]&returnField=price]-[SEARCH db=break.db&eqSKUdatarq=[URL][SKU][/URL]&QuanType=num&Quansort=1&Quansdir=de&leQ uandatarq=[Quantity]&max=1][FOUNDITEMS][Break][/FOUNDITEMS][/SEARCH][/math] *** in Incs/subpricecalc.inc ******************************[SHOWIF [lookup db=upline.db&lookInField=sku&value=[sku]&returnField=subprice]>[include incs/nosubpricecalc.inc][include incs/nosubpricecalc.inc][/SHOWIF][HIDEIF [lookup db=upline.db&lookInField=sku&value=[sku]&returnField=subprice]>[include Incs/nosubpricecalc.inc][lookup db=upline.db&lookInField=sku&value=[sku]&returnField=subprice][/HIDEIF] *** end of code ***********Any ideas?Yours in Success,Luke Melia___________________________________________________________________________ For software for Network Marketers, check out http://www.kaizensoft.com Upline is Online: http://www.upline.com ___________________________________________________________________________ ============================ Luke Melia || Was it for this my || || life I sought? || Snail Mail: || Maybe so and || 106 South St. Suite 209 || maybe not... || Charlottesville, VA 22902 ===========PHISH============ (804) 963-2608 Associated Messages, from the most recent to the oldest:

    
  1. Re: [include ...] behavior (Dale LaFountain 1997)
  2. Re: [include ...] behavior (Christer Olsson 1997)
  3. Re: [include ...] behavior (Luke Melia 1997)
  4. Everyone: List Traffic (was Re: [include ...] behavior) (Grant Hulbert 1997)
  5. Re: [include ...] behavior (Nevin Lyne 1997)
  6. Re: [include ...] behavior (wahl@dnai.com (Bernt Wahl) 1997)
  7. Re: [include ...] behavior (Luke Melia 1997)
  8. Re: [include ...] behavior (Christer Olsson 1997)
  9. [include ...] behavior (Luke Melia 1997)
  10. Re: [include ...] behavior (Grant Hulbert 1997)
Thanks, Grant. I have a few questions and I'm including the specific code below.At 2:07 AM 10/10/97, you wrote: >>What kind of reasons might there be this scenario: an [include ...] to not >>work properly but the pasting the exact contents of that included functions >>fine? > >Depends on what you're trying to do. Can you be more specific? I'll rub >my crystal monitor here and imagine... > >1) You're using an [include] inside a math expression, and you use BBEdit >to create the include file >2) You've nested the [include]s really really deep >3) Your included file uses [cart], and for some reason the cart# just >doesn't make it through > >Answers: >1) BBEdit has the annoying habit of adding an extra carriage return to the >end of a file, thus messing up the [math] context because carriage return >is illegalI am using BBEdit. This info helps, and I definitely notice that behavior, but it didn't resolve the problem.>2) Stack space being limited, the [include] just uses up so much that >there's none left, and can't execute any more WebDNAI am nesting includes. How deep is really really deep? Is there a way to adjust stack space? Is there a way to know when this takes place other than by guessing based on incorrect results?>3) Change it to [include file=xx&cart=[cart]]Didn't change things.Here's my code, along with commentary about the part that is not working. (In our store, there are different prices for nonsubscribers and subscribers, as well as quantity pricing, which is available to both):*** in ShoppingCart.tmpl ******************************[orderfile cart=[cart]]nosub: [format .2f][math]0[lineitems]+([math][quantity]*[include incs/nosubpricecalc.inc][/math])[/lineitems][/math][/format]
sub(inc): [format .2f][math]0[lineitems]+([math][quantity]*[include file=incs/subpricecalc.inc&cart=[cart]][/math])[/lineitems][/math][/format]
sub(spelledout): [format .2f][math]0[lineitems]+([math][quantity]*[SHOWIF [lookup db=upline.db&lookInField=sku&value=[sku]&returnField=subprice]>[include Incs/nosubpricecalc.inc]][include Incs/nosubpricecalc.inc][/SHOWIF][HIDEIF [lookup db=upline.db&lookInField=sku&value=[sku]&returnField=subprice]>[include Incs/nosubpricecalc.inc]][lookup db=upline.db&lookInField=sku&value=[sku]&returnField=subprice][/HIDEIF][/math])[ /lineitems][/math][/format]
[/orderfile]*** in Incs/nosubpricecalc.inc ******************************[math][lookup db=upline.db&lookInField=sku&value=[sku]&returnField=price]-[SEARCH db=break.db&eqSKUdatarq=[url][SKU][/URL]&QuanType=num&Quansort=1&Quansdir=de&leQ uandatarq=[Quantity]&max=1][founditems][Break][/FOUNDITEMS][/SEARCH][/math] *** in Incs/subpricecalc.inc ******************************[SHOWIF [lookup db=upline.db&lookInField=sku&value=[sku]&returnField=subprice]>[include incs/nosubpricecalc.inc][include incs/nosubpricecalc.inc][/SHOWIF][HIDEIF [lookup db=upline.db&lookInField=sku&value=[sku]&returnField=subprice]>[include Incs/nosubpricecalc.inc][lookup db=upline.db&lookInField=sku&value=[sku]&returnField=subprice][/HIDEIF] *** end of code ***********Any ideas?Yours in Success,Luke Melia___________________________________________________________________________ For software for Network Marketers, check out http://www.kaizensoft.com Upline is Online: http://www.upline.com ___________________________________________________________________________ ============================ Luke Melia || Was it for this my || || life I sought? || Snail Mail: || Maybe so and || 106 South St. Suite 209 || maybe not... || Charlottesville, VA 22902 ===========PHISH============ (804) 963-2608 Luke Melia

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:

triggers.db (1999) WebCat2b13MacPlugIn - [shownext method=post] ??? (1997) [username][password] not showing up! HELP! (1999) Was 5.0 Pricing, now Sandbox versus Website and ruminating (2003) What am I missing (1997) RE: Suggestions for Topics to be covered in an Advanced WebDNACourse... (1998) SQLCONNECT (2005) Date Comparison (1998) Notepad problems - SOLVED! (1998) RE: Emailer Set Up (1997) Date Time Oddness (1999) Showif Error Generated... (2003) Wanted: More Math Functions (or, Can You Solve This?) (1997) YACBQ.....(Yet another checkbox question) (2000) Using Plug-In while running 1.6.1 (1997) Formvariable Heirarchy (2000) Frames and WebCat (1997) Summing fields (1997) listfiles-looking for slick solution (1997) Emailer setup (1997)