time edit testing...

Bruce Easton bruce at stn.com
Thu Apr 10 14:14:59 PDT 2008


John Esak wrote Thursday, April 10, 2008 3:39 PM:
>
> A Small workaround required when using the HM edit and testing.
>
> If you have a variable with HM edit,
>
> Declare slot_time(5,hm)
>
> And you want to test the time this field holds for being within
> the morning
> hours of 6am to 11am for example... and you do:
>
>     If: slot_time gt "6:00" and slot_time le "11:00"
>   Then: .....
>
> You will get an incorrect FALSE.
>
> 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"
>
> It will test TRUE and all is right with the world.
>
> It would be expected that the test would be a TIME copare and "6:00" would
> be just as good as " 6:00", but it isn't.  My guess is FP Tech will change
> it to work this way.  Since Ken agreed off line that it should
> work without
> the space as well as with.
>
> John Esak
>

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.

Bruce

Bruce Easton
STN, Inc.




More information about the Filepro-list mailing list