Why is this not false?

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 38038
interpreted = N
texte = I seem to be having a problem with an if/then/else context. Here is the code that is giving me the problem:-------------------------------------------------------------------------[text]discount_active=T[/text] [math show=F]discount_quantity=1[/math] [math show=F]current_quantity=2[/math] [math show=F]discount_total=6[/math] [math show=F]current_total=5[/math][if ([discount_active]=T)&([discount_quantity]<[current_quantity])&([discount_total]<[current_total])]-------------------------------------------------------------------------It seems as though the contents of the if/then/else statement AFTER the second ampersand (the third comparison) are not being evaluated. In the above example, ELSE should activate, as the third comparison is false, but THEN activates instead. If I reverse the second and third comparisons, then the new second comparison seems to be evaaluated, but the new third is no longer evaluated.Am I doing something wrong, or how can I get this statement to evaluate all three comparisons?Thanks for the assistance,Dennis ------------------------------------------------------------- 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://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Why is this not false? (Gene Beljaeff 2001)
  2. Re: Why is this not false? (Samuel Renkert 2001)
  3. Re: Why is this not false? (Dennis J. Bonsall, Jr. 2001)
  4. Re: Why is this not false? (Kenneth Grome 2001)
  5. Re: Why is this not false? (Bob Minor 2001)
  6. Re: Why is this not false? (Bob Minor 2001)
  7. Why is this not false? (Dennis J. Bonsall, Jr. 2001)
I seem to be having a problem with an if/then/else context. Here is the code that is giving me the problem:-------------------------------------------------------------------------[text]discount_active=T[/text] [math show=F]discount_quantity=1[/math] [math show=F]current_quantity=2[/math] [math show=F]discount_total=6[/math] [math show=F]current_total=5[/math][if ([discount_active]=T)&([discount_quantity]<[current_quantity])&([discount_total]<[current_total])]-------------------------------------------------------------------------It seems as though the contents of the if/then/else statement AFTER the second ampersand (the third comparison) are not being evaluated. In the above example, ELSE should activate, as the third comparison is false, but THEN activates instead. If I reverse the second and third comparisons, then the new second comparison seems to be evaaluated, but the new third is no longer evaluated.Am I doing something wrong, or how can I get this statement to evaluate all three comparisons?Thanks for the assistance,Dennis ------------------------------------------------------------- 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://search.smithmicro.com/ Dennis J. Bonsall, Jr.

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:

The IBC root beer has arrived! (1997) Email Problem (1997) Cookie Problems (2000) WebCat2 beta 11 - new prefs ... (1997) Problems appending to database (1997) [WebDNA] Brian Harrington (2019) Help! WebCat2 bug (Ben's input) (1997) Snake Bites (1997) Mac Vs WindowsNT (1997) PDF writefile problem (2004) Getting around DOS filenames (2000) WebCat2b12 Mac.acgi--[searchstring] bug (1997) [WebDNA] Problem with excessive cart file creation (2011) shownext not showing next...still r2 (1997) Generating Report Totals (1997) Questions To Answer (1997) Sendmail question [Newbie] (1999) Pithy questions on webcommerce & siteedit (1997) Limiting user access to .tmpl files (1997) Daze to Dates (1998)