Re: Unexpected comparison behavior change in 4.5.1
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 48764
interpreted = N
texte = Brian,That is not correct.bob is a string consisting of the letters 'bob' it DOES contain 'b' (which is what the ^ means to WebDNA) it does not contain '' which is what [showif bob^] means as well as [if bob^]. Both these statements are FALSE.Someone correct me if I'm wrong please :)- CharlesOn Tuesday, March 18, 2003, at 10:29 AM, Brian Fries wrote:> Your description is inconclusive. If I was checking for b, then, to > paraphrase you:>> What your comparison is saying IF bob contains b then true. bob > contains bob therefore is false in both cases.>> This is not a test for equality, and bob contains NOTHING an infinite > number of times.>> Again, I'm not saying that one result is better than the other - > logically it's an inconclusive test. What I am saying is that, since > it's inconclusive, it SHOULD NOT HAVE BEEN CHANGED WITHOUT GOOD REASON > AND WITHOUT NOTIFYING DEVELOPERS THAT THEIR CODE MIGHT BREAK.>> SMSI: Comments? Scott? Please?>> - brian>> On Tuesday, March 18, 2003, at 12:47 AM, Charles Kline wrote:>>> What your comparison is saying IF bob contains NOTHING then true. bob >> contains bob therefore is false in both cases.>>>> On Tuesday, March 18, 2003, at 01:56 AM, Brian Fries wrote:>>>>> On Monday, March 17, 2003, at 10:38 PM, Charles Kline wrote:>>>>>>>>>>> On Tuesday, March 18, 2003, at 01:32 AM, Brian Fries wrote:>>>>>>>>> [showif bob^]>>>>>>>>>> or>>>>>>>>>> [if bob^]>>>>>>>>>>>>>>> In my tests, these evaluate to true under 4.5.0 and earlier, and >>>>> to false under 4.5.1. Clearly URL is not the issue here.>>>>>>>>> [showif bob^] should evaluate to 'false' so it seems the bug was in >>>> 4.5.0>>>>>> And WHY should [showif bob^] evaluate false? I don't see anything in >>> the empty string that isn't also in bob, therefore I - and every >>> version of WebDNA prior to 4.5.1 - would expect it to evaluate to > >>> true.>>>>>>>>>>> [if bob^] should evaluate to 'false' as well.>>>>>>>>>> Again, why is false any better than true for this? If WebDNA >>> were being written from scratch, then it would be the right time to >>> make a choice on this. But, since it's worked the same way since I >>> began using the product in 1997, I think its a little late to make >>> this change.>>>>>> I'm not really here to debate which way it SHOULD resolve the >>> comparison, I'm only here to point out that it broke my code - which >>> was fully tested and had been working fine for years.>>>>>>> It was always my understanding that when using [if] to compare >>>> strings, they needed to be in quotes. Was in the docs. as that from >>>> the beginning.>>>>>>>>>> Relevance? What quotes do you see missing from my example?>>>>>> - brian>>> -------------------------------------------------------------> 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://webdna.smithmicro.com/>-------------------------------------------------------------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://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Brian,That is not correct.bob is a string consisting of the letters 'bob' it DOES contain 'b' (which is what the ^ means to WebDNA) it does not contain '' which is what [showif bob^] means as well as [if bob^]. Both these statements are FALSE.Someone correct me if I'm wrong please :)- CharlesOn Tuesday, March 18, 2003, at 10:29 AM, Brian Fries wrote:> Your description is inconclusive. If I was checking for b, then, to > paraphrase you:>> What your comparison is saying IF bob contains b then true. bob > contains bob therefore is false in both cases.>> This is not a test for equality, and bob contains NOTHING an infinite > number of times.>> Again, I'm not saying that one result is better than the other - > logically it's an inconclusive test. What I am saying is that, since > it's inconclusive, it SHOULD NOT HAVE BEEN CHANGED WITHOUT GOOD REASON > AND WITHOUT NOTIFYING DEVELOPERS THAT THEIR CODE MIGHT BREAK.>> SMSI: Comments? Scott? Please?>> - brian>> On Tuesday, March 18, 2003, at 12:47 AM, Charles Kline wrote:>>> What your comparison is saying IF bob contains NOTHING then true. bob >> contains bob therefore is false in both cases.>>>> On Tuesday, March 18, 2003, at 01:56 AM, Brian Fries wrote:>>>>> On Monday, March 17, 2003, at 10:38 PM, Charles Kline wrote:>>>>>>>>>>> On Tuesday, March 18, 2003, at 01:32 AM, Brian Fries wrote:>>>>>>>>> [showif bob^]>>>>>>>>>> or>>>>>>>>>> [if bob^]>>>>>>>>>>>>>>> In my tests, these evaluate to true under 4.5.0 and earlier, and >>>>> to false under 4.5.1. Clearly URL is not the issue here.>>>>>>>>> [showif bob^] should evaluate to 'false' so it seems the bug was in >>>> 4.5.0>>>>>> And WHY should [showif bob^] evaluate false? I don't see anything in >>> the empty string that isn't also in bob, therefore I - and every >>> version of WebDNA prior to 4.5.1 - would expect it to evaluate to > >>> true.>>>>>>>>>>> [if bob^] should evaluate to 'false' as well.>>>>>>>>>> Again, why is false any better than true for this? If WebDNA >>> were being written from scratch, then it would be the right time to >>> make a choice on this. But, since it's worked the same way since I >>> began using the product in 1997, I think its a little late to make >>> this change.>>>>>> I'm not really here to debate which way it SHOULD resolve the >>> comparison, I'm only here to point out that it broke my code - which >>> was fully tested and had been working fine for years.>>>>>>> It was always my understanding that when using [if] to compare >>>> strings, they needed to be in quotes. Was in the docs. as that from >>>> the beginning.>>>>>>>>>> Relevance? What quotes do you see missing from my example?>>>>>> - brian>>> -------------------------------------------------------------> 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://webdna.smithmicro.com/>-------------------------------------------------------------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://webdna.smithmicro.com/
Charles Kline
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:
verify online (1997)
Re:Virtual hosting and webcatNT (1997)
Nested tags count question (1997)
WebCat2b13MacPlugIn - [include] doesn't allow creator (1997)
Yahoo! Auto Response (2000)
WebCat2 Append problem (B14Macacgi) (1997)
[WebDNA] v7 Stress Test and Strange Behaviour (2012)
Wireless WebDNA available today! (2000)
Leap Day Triggers (2000)
OT - webdnadev.net ...... links bad??? (2005)
Not really WebCat (1997)
[WebDNA] More wish-list requests implemented (2016)
using showpage and showcart commands (1996)
Seeking Better Display of results... (1997)
Finding max value for a field (1997)
Using the sendmail command on CGate Pro (Unix) (2000)
[AppendFile] problem (WebCat2b13 Mac .acgi) (1997)
passing large amount of text in post form (2005)
WebCat2b12plugin - [search] is broken ... not! (1997)
WebCat2 as a chat server? (1997)