Re: EXTERNAL EMAIL: [WebDNA] IF statement evaluation bug report,

This WebDNA talk-list message is from

2019


It keeps the original formatting.
numero = 114941
interpreted = N
texte = 2569 --Apple-Mail=_A9273376-513B-47D7-B484-A32460E103B7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Thanks, Dustin, but no, I=E2=80=99m testing for a numeric value, so no = quotes. As I said, I don=E2=80=99t need suggestions, just reporting the bug. > On Oct 29, 2019, at 11:00 AM, McMahon, Dustin = wrote: >=20 > Try wrapping your second comparison in quotes. Should look like this: > =20 > [text]list=3Done,two,three[/text] > [if ("[list]"^"one") & (=E2=80=9C[pParam]=E2=80=9D>=E2=80=9D0=E2=80=9D)]= [then] > TRUE * Got good parameter > [/then][else] > FALSE * No parameter, or invalid parameter, or list does not contain = =E2=80=9Cone" > [/else][/if] > =20 > That should work > =20 > Dustin McMahon > Assistant Database Administrator > Center for Instruction, Technology & Innovation > =20 > From: Brian Fries =20 > Sent: Tuesday, October 29, 2019 1:52 PM > To: WebDNA Talk > Subject: EXTERNAL EMAIL: [WebDNA] IF statement evaluation bug report, = WebDNA 8.5.1 > =20 > I=E2=80=99ve identified a bug with IF statement evaluation. My setup: > =20 > Product: WebDNA - Enterprise Edition > Version: 8.5.1 > Platform: unix-Macintosh OS X > Server OS: macOS 10.12.6 (16G2016) > =20 > Also tested on: > Product: WebDNA - Enterprise Edition > Version: 8.5.1 > Platform: unix-Macintosh OS X > Server OS: macOS 10.14.6 (18G87) > =20 > And on: > Product: WebDNA (FastCGI) > Version: 8.5.1 > Platform: linux unix 64bits > Server OS: Ubuntu 14.04.5 LTS > =20 > =20 > I can code around the bug, so I don=E2=80=99t need suggestions for = other ways to achieve my goals, I=E2=80=99m just reporting inconsistent = and incorrect behavior by WebDNA. > =20 > My code was testing for the presence of a page parameter which should = either not be present or should have a numeric value greater than zero, = depending on how the user got to the page: > =20 > [if ([pParam]>0)][then] > * Got good parameter > [/then][else] > * No parameter, or invalid parameter > [/else][/if] > =20 > This worked fine, until I added an additional expression to the IF = statement: > =20 > [text]list=3Done,two,three[/text] > [if ("[list]"^"one") & ([pParam]>0)][then] > TRUE * Got good parameter > [/then][else] > FALSE * No parameter, or invalid parameter, or list does not contain = =E2=80=9Cone" > [/else][/if] > =20 > This example ALWAYS goes to the TRUE clause, unless the first = expression fails. Whether the second expression is TRUE or FALSE = doesn=E2=80=99t matter. > =20 > For debugging, I simplified the components until I got to this, which = incorrectly executes the TRUE clause: > =20 > [if (2=3D2) & (ABC>0)][then] > TRUE > [/then][else] > FALSE > [/else][/if] >=20 > Testing the individual expressions, they both work correctly. (2=3D2) = executes the TRUE clause, while (ABC>0) executes the FALSE clause: > =20 > [if (2=3D2)][then] > TRUE > [/then][else] > FALSE > [/else][/if] > =20 > [if (ABC>0)][then] > TRUE > [/then][else] > FALSE > [/else][/if] > =20 > =20 > Interestingly, switching the order of the expressions, correctly = evaluates to the FALSE clause: > =20 > [if (ABC>0) & (2=3D2)][then] > TRUE > [/then][else] > FALSE > [/else][/if] > =20 > =20 > Thanks, > Brian Fries > =20 > --------------------------------------------------------- This message = is sent to you because you are subscribed to the mailing list = talk@webdna.us To unsubscribe, E-mail to: = talk-leave@webdna.us archives: = http://www.webdna.us/page.dna?numero=3D55 = Bug Reporting: = support@webdna.us > CAUTION: This email originated from outside of the organization. Do = not click links or open attachments unless you recognize the sender and = know the content is safe. > =20 > = N=18=EF=BF=BD=EF=BF=BD,j=07=EF=BF=BD=C7=A7=EF=BF=BD=EF=BF=BD2=EF=BF=BD=EF=BF= =BD=EF=BF=BDq=EF=BF=BD{*.j=EF=BF=BD=1C=EF=BF=BD&=EF=BF=BDv=EF=BF=BD-=EF=BF= =BD=E9=9A=8AX=EF=BF=BDX#<^_NSEDR_^#<=D6=A5=EF=BF=BD=07=EF=BF=BDvv=EF=BF=BD= :.=EF=BF=BD=CB=9B=EF=BF=BD=EF=BF=BD=EF=BF=BDm=EF=BF=BD&j)m#<^_NSEDR_^#<=D6= =A5=EF=BF=BDW=EF=BF=BD=EF=BF=BD=1Em=EF=BF=BD=DA=BA=C6=ABr=18=EF=BF=BDz=EF=BF= =BDm=EF=BF=BD=EF=BF=BD=0C= 0y=EF=BF=BDgj=EF=BF=BD?=EF=BF=BD=1Evv=EF=BF=BDg=EF=BF=BD=0Ey=06=EF=BF=BD=11= z=EF=BF=BD+=EF=BF=BD)=EF=BF=BD=EF=BF=BDi=EF=BF=BDpy=EF=BF=BDg --Apple-Mail=_A9273376-513B-47D7-B484-A32460E103B7 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Thanks, Dustin, but no, I=E2=80=99m testing for a numeric = value, so no quotes.

As I said, I don=E2=80=99t need suggestions, just reporting = the bug.

On Oct 29, 2019, at 11:00 AM, McMahon, Dustin = <dmcmahon@citiboces.org> wrote:

Try = wrapping your second comparison in quotes.  Should look like = this:
 
[text]list=3Done,two,three[/text]
[if = ("[list]"^"one") & (=E2=80=9C[pParam]=E2=80=9D>=E2=80=9D0=E2=80=9D)= ][then]
TRUE * Got good parameter
[/then][else]
FALSE * = No parameter, or invalid parameter, or list does not contain =E2=80=9Cone"=
[/else][/if]
 
That should work
 
Dustin = McMahon
Assistant Database Administrator
Center = for Instruction, Technology & Innovation
 
From: Brian Fries <iphonzie@gmail.com> 
Sent: Tuesday, October 29, 2019 = 1:52 PM
To: WebDNA Talk <talk@webdna.us>
Subject: EXTERNAL EMAIL: [WebDNA] IF = statement evaluation bug report, WebDNA 8.5.1
 
I=E2=80=99ve identified a bug with IF = statement evaluation. My setup:
 
Product: WebDNA - Enterprise Edition
Version: 8.5.1
Platform: unix-Macintosh= OS X
Server OS: macOS 10.12.6 (16G2016)
 
Also tested on:
Product: WebDNA - Enterprise Edition
Version: 8.5.1
Platform: unix-Macintosh= OS X
Server OS: macOS 10.14.6 (18G87)
 
And on:
Product: WebDNA (FastCGI)
Version: 8.5.1
Platform: linux unix = 64bits
Server OS: Ubuntu 14.04.5 LTS
 
 
I can code around the bug, so I don=E2=80=99t need = suggestions for other ways to achieve my goals, I=E2=80=99m just = reporting inconsistent and incorrect behavior by WebDNA.
 
My code was testing for the presence of = a page parameter which should either not be present or should have a = numeric value greater than zero, depending on how the user got to the = page:
 
[if ([pParam]>0)][then]
* Got good = parameter
[/then][else]
* No parameter, or invalid = parameter
[/else][/if]
 
This worked fine, until I added an additional expression to = the IF statement:
 
[text]list=3Done,two,three[/text]
[if = ("[list]"^"one") & ([pParam]>0)][then]
TRUE * Got good parameter
[/then][else]
FALSE * No parameter, or invalid parameter, or list does = not contain =E2=80=9Cone"
[/else][/if]
 
This example ALWAYS goes to the TRUE clause, unless the first = expression fails. Whether the second expression is TRUE or FALSE = doesn=E2=80=99t matter.
 
For debugging, I simplified the components until I got to = this, which incorrectly executes the TRUE clause:
 
[if (2=3D2) & = (ABC>0)][then]

TRUE
[/then][else]
FALSE
[/else][/if]

Testing the individual expressions, they both work correctly. = (2=3D2) executes the TRUE clause, while (ABC>0) executes the FALSE = clause:
 
[if (2=3D2)][then]
TRUE
[/then][else]
FALSE
[/else][/if]
 
[if (ABC>0)][then]
TRUE
[/then][else]
FALSE
[/else][/if]
 
 
Interestingly, switching the order of = the expressions, correctly evaluates to the FALSE clause:
 
[if = (ABC>0) & (2=3D2)][then]
TRUE
[/then][else]
FALSE
[/else][/if]
 
 
Thanks,
Brian Fries
 
--------------------------------------------------------- = This message is sent to you because you are subscribed to the mailing = list talk@webdna.us To unsubscribe, E-mail = to: talk-leave@webdna.us archives: http://www.webdna.us/page.dna?numero=3D55 Bug Reporting: support@webdna.us
CAUTION: This email = originated from outside of the organization. Do not click links or open = attachments unless you recognize the sender and know the content is = safe.
 
N=18=EF=BF=BD=EF=BF=BD,j=07=EF=BF=BD=C7=A7=EF=BF=BD=EF=BF=BD2=EF= =BF=BD=EF=BF=BD=EF=BF=BDq=EF=BF=BD{*.j=EF=BF=BD=1C=EF=BF=BD&=EF=BF=BDv= =EF=BF=BD-=EF=BF=BD=E9=9A=8AX=EF=BF=BDX#<^_NSEDR_^#<=D6=A5=EF=BF=BD=07= =EF=BF=BDvv=EF=BF=BD:.=EF=BF=BD=CB=9B=EF=BF=BD=EF=BF=BD=EF=BF=BDm=EF=BF=BD= &j)m#<^_NSEDR_^#<=D6=A5=EF=BF=BDW=EF=BF=BD=EF=BF=BD=1Em=EF=BF=BD= =DA=BA=C6=ABr=18=EF=BF=BDz=EF=BF=BDm=EF=BF=BD=EF=BF=BD=0C= 0y=EF=BF=BDgj=EF=BF=BD?=EF=BF=BD=1Evv=EF=BF=BDg=EF=BF=BD=0Ey=06=EF=BF=BD=11= z=EF=BF=BD+=EF=BF=BD)=EF=BF=BD=EF=BF=BDi=EF=BF=BDpy=EF=BF=BDg
=

= --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list talk@webdna.us To unsubscribe, E-mail to: talk-leave@webdna.us archives: http://www.webdna.us/page.dna?numero=3D55 Bug Reporting: support@webdna.us --Apple-Mail=_A9273376-513B-47D7-B484-A32460E103B7-- . Associated Messages, from the most recent to the oldest:

    
  1. Re: EXTERNAL EMAIL: [WebDNA] IF statement evaluation bug report, (Brian Fries 2019)
  2. RE: EXTERNAL EMAIL: [WebDNA] IF statement evaluation bug report, ("McMahon, Dustin" 2019)
2569 --Apple-Mail=_A9273376-513B-47D7-B484-A32460E103B7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Thanks, Dustin, but no, I=E2=80=99m testing for a numeric value, so no = quotes. As I said, I don=E2=80=99t need suggestions, just reporting the bug. > On Oct 29, 2019, at 11:00 AM, McMahon, Dustin = wrote: >=20 > Try wrapping your second comparison in quotes. Should look like this: > =20 > [text]list=3Done,two,three[/text] > [if ("[list]"^"one") & (=E2=80=9C[pParam]=E2=80=9D>=E2=80=9D0=E2=80=9D)]= [then] > TRUE * Got good parameter > [/then][else] > FALSE * No parameter, or invalid parameter, or list does not contain = =E2=80=9Cone" > [/else][/if] > =20 > That should work > =20 > Dustin McMahon > Assistant Database Administrator > Center for Instruction, Technology & Innovation > =20 > From: Brian Fries =20 > Sent: Tuesday, October 29, 2019 1:52 PM > To: WebDNA Talk > Subject: EXTERNAL EMAIL: [WebDNA] IF statement evaluation bug report, = WebDNA 8.5.1 > =20 > I=E2=80=99ve identified a bug with IF statement evaluation. My setup: > =20 > Product: WebDNA - Enterprise Edition > Version: 8.5.1 > Platform: unix-Macintosh OS X > Server OS: macOS 10.12.6 (16G2016) > =20 > Also tested on: > Product: WebDNA - Enterprise Edition > Version: 8.5.1 > Platform: unix-Macintosh OS X > Server OS: macOS 10.14.6 (18G87) > =20 > And on: > Product: WebDNA (FastCGI) > Version: 8.5.1 > Platform: linux unix 64bits > Server OS: Ubuntu 14.04.5 LTS > =20 > =20 > I can code around the bug, so I don=E2=80=99t need suggestions for = other ways to achieve my goals, I=E2=80=99m just reporting inconsistent = and incorrect behavior by WebDNA. > =20 > My code was testing for the presence of a page parameter which should = either not be present or should have a numeric value greater than zero, = depending on how the user got to the page: > =20 > [if ([pParam]>0)][then] > * Got good parameter > [/then][else] > * No parameter, or invalid parameter > [/else][/if] > =20 > This worked fine, until I added an additional expression to the IF = statement: > =20 > [text]list=3Done,two,three[/text] > [if ("[list]"^"one") & ([pParam]>0)][then] > TRUE * Got good parameter > [/then][else] > FALSE * No parameter, or invalid parameter, or list does not contain = =E2=80=9Cone" > [/else][/if] > =20 > This example ALWAYS goes to the TRUE clause, unless the first = expression fails. Whether the second expression is TRUE or FALSE = doesn=E2=80=99t matter. > =20 > For debugging, I simplified the components until I got to this, which = incorrectly executes the TRUE clause: > =20 > [if (2=3D2) & (ABC>0)][then] > TRUE > [/then][else] > FALSE > [/else][/if] >=20 > Testing the individual expressions, they both work correctly. (2=3D2) = executes the TRUE clause, while (ABC>0) executes the FALSE clause: > =20 > [if (2=3D2)][then] > TRUE > [/then][else] > FALSE > [/else][/if] > =20 > [if (ABC>0)][then] > TRUE > [/then][else] > FALSE > [/else][/if] > =20 > =20 > Interestingly, switching the order of the expressions, correctly = evaluates to the FALSE clause: > =20 > [if (ABC>0) & (2=3D2)][then] > TRUE > [/then][else] > FALSE > [/else][/if] > =20 > =20 > Thanks, > Brian Fries > =20 > --------------------------------------------------------- This message = is sent to you because you are subscribed to the mailing list = talk@webdna.us To unsubscribe, E-mail to: = talk-leave@webdna.us archives: = http://www.webdna.us/page.dna?numero=3D55 = Bug Reporting: = support@webdna.us > CAUTION: This email originated from outside of the organization. Do = not click links or open attachments unless you recognize the sender and = know the content is safe. > =20 > = N=18=EF=BF=BD=EF=BF=BD,j=07=EF=BF=BD=C7=A7=EF=BF=BD=EF=BF=BD2=EF=BF=BD=EF=BF= =BD=EF=BF=BDq=EF=BF=BD{*.j=EF=BF=BD=1C=EF=BF=BD&=EF=BF=BDv=EF=BF=BD-=EF=BF= =BD=E9=9A=8AX=EF=BF=BDX#<^_NSEDR_^#<=D6=A5=EF=BF=BD=07=EF=BF=BDvv=EF=BF=BD= :.=EF=BF=BD=CB=9B=EF=BF=BD=EF=BF=BD=EF=BF=BDm=EF=BF=BD&j)m#<^_NSEDR_^#<=D6= =A5=EF=BF=BDW=EF=BF=BD=EF=BF=BD=1Em=EF=BF=BD=DA=BA=C6=ABr=18=EF=BF=BDz=EF=BF= =BDm=EF=BF=BD=EF=BF=BD=0C= 0y=EF=BF=BDgj=EF=BF=BD?=EF=BF=BD=1Evv=EF=BF=BDg=EF=BF=BD=0Ey=06=EF=BF=BD=11= z=EF=BF=BD+=EF=BF=BD)=EF=BF=BD=EF=BF=BDi=EF=BF=BDpy=EF=BF=BDg --Apple-Mail=_A9273376-513B-47D7-B484-A32460E103B7 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Thanks, Dustin, but no, I=E2=80=99m testing for a numeric = value, so no quotes.

As I said, I don=E2=80=99t need suggestions, just reporting = the bug.

On Oct 29, 2019, at 11:00 AM, McMahon, Dustin = <dmcmahon@citiboces.org> wrote:

Try = wrapping your second comparison in quotes.  Should look like = this:
 
[text]list=3Done,two,three[/text]
[if = ("[list]"^"one") & (=E2=80=9C[pParam]=E2=80=9D>=E2=80=9D0=E2=80=9D)= ][then]
TRUE * Got good parameter
[/then][else]
FALSE * = No parameter, or invalid parameter, or list does not contain =E2=80=9Cone"=
[/else][/if]
 
That should work
 
Dustin = McMahon
Assistant Database Administrator
Center = for Instruction, Technology & Innovation
 
From: Brian Fries <iphonzie@gmail.com> 
Sent: Tuesday, October 29, 2019 = 1:52 PM
To: WebDNA Talk <talk@webdna.us>
Subject: EXTERNAL EMAIL: [WebDNA] IF = statement evaluation bug report, WebDNA 8.5.1
 
I=E2=80=99ve identified a bug with IF = statement evaluation. My setup:
 
Product: WebDNA - Enterprise Edition
Version: 8.5.1
Platform: unix-Macintosh= OS X
Server OS: macOS 10.12.6 (16G2016)
 
Also tested on:
Product: WebDNA - Enterprise Edition
Version: 8.5.1
Platform: unix-Macintosh= OS X
Server OS: macOS 10.14.6 (18G87)
 
And on:
Product: WebDNA (FastCGI)
Version: 8.5.1
Platform: linux unix = 64bits
Server OS: Ubuntu 14.04.5 LTS
 
 
I can code around the bug, so I don=E2=80=99t need = suggestions for other ways to achieve my goals, I=E2=80=99m just = reporting inconsistent and incorrect behavior by WebDNA.
 
My code was testing for the presence of = a page parameter which should either not be present or should have a = numeric value greater than zero, depending on how the user got to the = page:
 
[if ([pParam]>0)][then]
* Got good = parameter
[/then][else]
* No parameter, or invalid = parameter
[/else][/if]
 
This worked fine, until I added an additional expression to = the IF statement:
 
[text]list=3Done,two,three[/text]
[if = ("[list]"^"one") & ([pParam]>0)][then]
TRUE * Got good parameter
[/then][else]
FALSE * No parameter, or invalid parameter, or list does = not contain =E2=80=9Cone"
[/else][/if]
 
This example ALWAYS goes to the TRUE clause, unless the first = expression fails. Whether the second expression is TRUE or FALSE = doesn=E2=80=99t matter.
 
For debugging, I simplified the components until I got to = this, which incorrectly executes the TRUE clause:
 
[if (2=3D2) & = (ABC>0)][then]

TRUE
[/then][else]
FALSE
[/else][/if]

Testing the individual expressions, they both work correctly. = (2=3D2) executes the TRUE clause, while (ABC>0) executes the FALSE = clause:
 
[if (2=3D2)][then]
TRUE
[/then][else]
FALSE
[/else][/if]
 
[if (ABC>0)][then]
TRUE
[/then][else]
FALSE
[/else][/if]
 
 
Interestingly, switching the order of = the expressions, correctly evaluates to the FALSE clause:
 
[if = (ABC>0) & (2=3D2)][then]
TRUE
[/then][else]
FALSE
[/else][/if]
 
 
Thanks,
Brian Fries
 
--------------------------------------------------------- = This message is sent to you because you are subscribed to the mailing = list talk@webdna.us To unsubscribe, E-mail = to: talk-leave@webdna.us archives: http://www.webdna.us/page.dna?numero=3D55 Bug Reporting: support@webdna.us
CAUTION: This email = originated from outside of the organization. Do not click links or open = attachments unless you recognize the sender and know the content is = safe.
 
N=18=EF=BF=BD=EF=BF=BD,j=07=EF=BF=BD=C7=A7=EF=BF=BD=EF=BF=BD2=EF= =BF=BD=EF=BF=BD=EF=BF=BDq=EF=BF=BD{*.j=EF=BF=BD=1C=EF=BF=BD&=EF=BF=BDv= =EF=BF=BD-=EF=BF=BD=E9=9A=8AX=EF=BF=BDX#<^_NSEDR_^#<=D6=A5=EF=BF=BD=07= =EF=BF=BDvv=EF=BF=BD:.=EF=BF=BD=CB=9B=EF=BF=BD=EF=BF=BD=EF=BF=BDm=EF=BF=BD= &j)m#<^_NSEDR_^#<=D6=A5=EF=BF=BDW=EF=BF=BD=EF=BF=BD=1Em=EF=BF=BD= =DA=BA=C6=ABr=18=EF=BF=BDz=EF=BF=BDm=EF=BF=BD=EF=BF=BD=0C= 0y=EF=BF=BDgj=EF=BF=BD?=EF=BF=BD=1Evv=EF=BF=BDg=EF=BF=BD=0Ey=06=EF=BF=BD=11= z=EF=BF=BD+=EF=BF=BD)=EF=BF=BD=EF=BF=BDi=EF=BF=BDpy=EF=BF=BDg
=

= --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list talk@webdna.us To unsubscribe, E-mail to: talk-leave@webdna.us archives: http://www.webdna.us/page.dna?numero=3D55 Bug Reporting: support@webdna.us --Apple-Mail=_A9273376-513B-47D7-B484-A32460E103B7-- . 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:

Banners (1997) Fufillment e-mail? (1998) Shopping Cart - prices? (1997) Public beta 4 of WebCatalog 4.0 is now available (2000) I'm tired of all this! (2000) TCPconnect to DNS (2000) RE: New WebCatalog Version !!! (1997) tiny Linux issue (1999) WebCat2: Master Counter snippet (1997) NT Manual (1997) Add a field to the error log? (1997) Further on formula.db failure to calculate shipCost (1997) Help! WebCat2 bug (1997) Multiple Users.db Possible? (1997) Bug Report, maybe (1997) OT-listserver stuff -WAS-webcat method for waiting (2000) splitting numbers in webDNA? (1997) looping table rows (1999) writing db to disk (1997) Updating a database once per day - An example (1998)