Download Informix 4GL By Example, Version 4.1

Transcript
The input_order() Function
33 ➤ An Interrupt at this stage of the program cancels only this interaction and not
the entire order entry. The int_flag is cleared so that it will not affect the calling function. A null value is forced into the current row of the array.
34 ➤ The customer_num value in this row will be null in two cases: if the customer
table was empty, and if the display ended with Interrupt. Otherwise the customer number reflects the user’s choice and input_cust() can terminate.
The input_order() Function
35 ➤ The input_order() function collects the rest of the order header fields: the date
and the customer’s Purchase Order number. It returns TRUE normally, or
FALSE to indicate that the user cancelled.
36 ➤ The BEFORE FIELD clause is executed when the cursor enters a field. It enters
the order_date field as soon as the INPUT statement begins, since it is the first
field listed in the BY NAME clause. Thus today’s date, the most likely choice,
will be displayed initially.
37 ➤ When the cursor leaves the field, it could only be null if the user had cleared
it with control-D. In that case, today’s date is again supplied, so as to make
sure that a valid date is available.
38 ➤ Handling of Interrupt is similar to that in the input_cust() function.
242
Implementing a Master/Detail Relationship
November 11, 1997 8:58 am