Why is this debugger line TRUE?

Stanley - stanlyn-com stanley at stanlyn.com
Wed Dec 14 22:54:05 PST 2011


Top post...

In this case, the if statement should be false, but it is showing true.  

This code is being triggered when saving the record that calls the
subroutine.  This subroutine is also called by a @wlfI7) routine at other
times.  

Lets dissect it...  The I2) component by itself is true, and the I7)
component is false...  Just look at the I7) part of the if statement that is
If: I7) eq "", and then look at the last line where I asked the debugger
"what is the value of I7)?" and it shows me its 18.70 also shown on the last
line, so clearly the reported value of 18.70 is not equal "" as shown in the
if statement, and that why it should be evaluating to false...  

Is the debugger trustworthy, as it sure has it wrong here, or am I missing
something?

The debugger image is at http://www.stanlyn.com/public/fpError.png
The field map is at http://www.stanlyn.com/public/fieldmap.png


Stanley





-----Original Message-----
From: filepro-list-bounces+stanley=stanlyn.com at lists.celestial.com
[mailto:filepro-list-bounces+stanley=stanlyn.com at lists.celestial.com] On
Behalf Of Jeff Harrison
Sent: Tuesday, December 13, 2011 1:47 PM
To: Craig Tooker; filepro-list at lists.celestial.com
Subject: Re: Why is this debugger line TRUE?

>________________________________
> From: Craig Tooker <craig at cwtsoftware.com>
>To: filepro-list at lists.celestial.com
>Sent: Tuesday, December 13, 2011 1:21 PM
>Subject: Re: Why is this debugger line TRUE?
> 
>On 12/13/2011 03:54, Stanley - stanlyn-com wrote:
>> Hi, here is a screenshot showing a line in the debugger that is 
>> evaluating as true and you can clearly see it should be false. Look 
>> at the I7) expression.
>>
>>
>>
>> Help, Can someone explain this?
>If I'm reading your screen shot correctly, I7) is blank and I2) is 
>18.70.  That would make the logic expression TRUE.
>
>Remember that if any of the associated fields in I7) and I2) match 
>these criteria the expression will be true.
>
>If what is depicted is *just* I7), then you will need to let us know 
>how both I7) and I2) are defined in the table (their respective length 
>and edits), and how many of them exist in the table.
>
>Craig
>>
>>
>>
>> Sco unix sys 5.6  processing is 5.0.14d4
>>
>>
>>
>> http://www.stanlyn.com/public/fpError.png
>>
>> -------------- next part --------------


Also, we need to know the context of how the code is being executed.  I
believe that I can conclude that this from *clerk and it is not being hit
from @wlf*, @wbl*, etc.  If that is the case, then the debugger is simply
showing you the first field in your associated field group.  That is all the
debugger is set up to do.  However, If I recall properly,  when it is being
evaluated for true/false it is considering the whole group.  So, for example
with the I7) group, if any of these fields are blank then I7) eq "" will be
true.

Conversely, if any of the I2 fields are populated then I2) ne "" would be
true.


Now, if you were hitting this code from @wlfI2, for example,  that would be
a different story.  In this case it would look at the individual field that
you were leaving - not the whole group.


Jeff Harrison
jeffaharrison at yahoo.com
Author of JHExport and JHImport.

_______________________________________________
Filepro-list mailing list
Filepro-list at lists.celestial.com
Subscribe/Unsubscribe/Subscription Changes
http://mailman.celestial.com/mailman/listinfo/filepro-list



More information about the Filepro-list mailing list