{ Work procedure } Function Calculate_One_Interval {(var loan_status : loan_rec)} : boolean; var s : varying [40] of char; cs : Dwt$Comp_String; actual_repayment : double; new_value : double; insufficient : boolean; begin { Make the repayment } . . . { Display the result } writev(s,interval_number:3,current_value:16:2,total_paid:11:2); Dwt$Latin1_String(s,cs); Dwt$List_Box_Add_Item(list_box, cs, 0); Dwt$List_Box_Set_Pos(list_box, interval_number); Xt$Free (cs); Calculate_One_Interval := (current_value <= 0.0) or insufficient; end;