Check for negative number

Tom Aldridge toma at aldridgeinc.com
Fri May 21 17:52:55 PDT 2010


I have this subroutine that when exiting a browse lookup of inventory 
items, it checks to see if there are any orders of those items, i.e. a 
number gt zero in a field. Works great. If there are any, it asks if you 
want to clear those values.

154 chkord:::
155 ::kl(3,.0)="0":
156 ::lookup invo = ("inventory@"{dept(1))  k=kl   i=I -ng:
157 :not invo:return:
158 :gosub clrord; return:

However, I also want to check if there any negative order amounts, i.e. 
"-1" up to -99. So I set the key (kl) to "-99" thinking that it would 
begin there and work up. Problem it always finds a record even if there 
are no records with orders.

So then I tested it using "Scan for Records" and it finds the first 
record in the file. I suppose it's finding the first record with an 
empty order field?

Anyway, I'm looking for a way to do a lookup from -99 to 99 and 
reporting "not" if there are no records with an order value in the range 
abovea; and the converse if there is.

The field is a 3,.0 and the index is on that field.

Thanks

Tom Aldridge



More information about the Filepro-list mailing list