Kbase P19010: Will a statement with ?or ? check both arguments before execution?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/10/2008 |
|
Status: Unverified
GOAL:
Will a statement with “or “ check both arguments before execution?
SYMPTOM(s):
IF customer.cust-num = 4 OR customer.cust-num = 5 THEN DO:
MESSAGE "vai dar get-nex"
VIEW-AS ALERT-BOX INFO BUTTONS OK.
ASSIGN i = i + 1.
GET NEXT br_table.
END.
customer.cust-num = 5 will be displayed
FIX:
When the statement validates the first “or” criteria if it is true it will move inside the block. This is a expected language behavior. To avoid displaying rolls on a smart browser the best way would be modify the browser query to something like the following example to suppress records 4 and 5:
EACH sports2000.Customer WHERE ~{&KEY-PHRASE}
AND Customer.Cust-Num < 4
AND Customer.Cust-Num > 5 NO-LOCK
~{&SORTBY-PHRASE}