time edit testing...

Nancy Palmquist nlp at vss3.com
Fri Apr 11 07:34:43 PDT 2008


>>
>> For example, if slot_time is 9:00 the above line will test FALSE on your
>> processing table.  If you change the above line to:
>>
>>     If: slot_time gt " 6:00" and slot_time le "11:00"

My guess is that hm is being compared as literals, so the position is important. 
  I can see why it was confusing.

> I'm sure I ran into that one before.  I think I also ran
> into this with some other system/global edit.  But as a rule,
> to avoid any surprises, I like to assign any literal to a
> dummy/long_var field  with the same edit as a field I intend
> to compare it to, and then use the dummy/long_var for the
> comparison.  Not everything, but probably any field that is
> right-justified would be in that category for me.

I totally agree with this.  I have been surprised too many times with tests that 
were incorrect.

I always change numerics to the same edit (numeric, literal), and never do 
something like this:

5 eq "01/01/2008"  - even if field 5 has a date edit.  make the literal into a 
date before testing.  Also had issue with dates formated with - such as 
01-01-2008.  You can store dates like that, but indexing and testing gave me 
fits.  Just add the following to the @wlf for any data entry fields with dates: 
  @wlf5 then:5=5+"0" - filepro will change the dashes to slashes nice and neat.

ts(10,mdyy/)="01/01/2008"   or use doedit("01/01/2008","mdyy/","10") to force 
filePro to regard the literal as a real date.

I have a sample in my classes were "0" eq "0" is false because of the edits of 
the two fields.  They even displayed correctly.  It is a difference when 
converting literals to binary, which I think is used for tests involving numbers 
with .n or ,n or F edits (could be others) and a number represented as a literal.

I don't think this is a bug in filepro at all, it is an apples and oranges kind 
of comparison that will occasionally result in a false reading.  So try not to 
compare apples to oranges, just make fruit salad.

Nancy
-- 
Nancy Palmquist 		MOS & filePro Training Available
Virtual Software Systems	Web Based Training and Consulting	
PHONE: (412) 835-9417		   Web site:  http://www.vss3.com


More information about the Filepro-list mailing list