f_rst_grade_len.srf 977 B

12345678910111213141516171819202122232425262728
  1. $PBExportHeader$f_rst_grade_len.srf
  2. global type f_rst_grade_len from function_object
  3. end type
  4. forward prototypes
  5. global function long f_rst_grade_len (long arg_grage)
  6. end prototypes
  7. global function long f_rst_grade_len (long arg_grage);long rst_grade_len
  8. if arg_grage=1 then
  9. rst_grade_len=s_sys_accset.step1
  10. elseif arg_grage=2 then
  11. rst_grade_len=s_sys_accset.step1 + s_sys_accset.step2
  12. elseif arg_grage=3 then
  13. rst_grade_len=s_sys_accset.step1 + s_sys_accset.step2 + s_sys_accset.step3
  14. elseif arg_grage=4 then
  15. rst_grade_len=s_sys_accset.step1 + s_sys_accset.step2 + s_sys_accset.step3 + s_sys_accset.step4
  16. elseif arg_grage=5 then
  17. rst_grade_len=s_sys_accset.step1 + s_sys_accset.step2 + s_sys_accset.step3 + s_sys_accset.step4 + s_sys_accset.step5
  18. elseif arg_grage>=6 then
  19. rst_grade_len=s_sys_accset.step1 + s_sys_accset.step2 + s_sys_accset.step3 + s_sys_accset.step4 + s_sys_accset.step5 + s_sys_accset.step6
  20. end if
  21. return rst_grade_len
  22. end function