f_getrightsize_h_auto.srf 534 B

1234567891011121314151617181920212223242526
  1. $PBExportHeader$f_getrightsize_h_auto.srf
  2. global type f_getrightsize_h_auto from function_object
  3. end type
  4. forward prototypes
  5. global function decimal f_getrightsize_h_auto (decimal arg_aw, integer arg_ah, decimal arg_bw, decimal arg_bh)
  6. end prototypes
  7. global function decimal f_getrightsize_h_auto (decimal arg_aw, integer arg_ah, decimal arg_bw, decimal arg_bh);Long rslt = 0
  8. IF arg_bw <> 0 THEN
  9. rslt = arg_bh * (arg_aw / arg_bw)
  10. else
  11. rslt = arg_ah
  12. END IF
  13. if rslt > arg_ah then rslt = arg_ah
  14. RETURN rslt
  15. end function