uf_bitor.srf 477 B

123456789101112131415161718192021222324
  1. $PBExportHeader$uf_bitor.srf
  2. global type uf_bitor from function_object
  3. end type
  4. forward prototypes
  5. global function ulong uf_bitor (unsignedlong al_val1, unsignedlong al_val2)
  6. end prototypes
  7. global function ulong uf_bitor (unsignedlong al_val1, unsignedlong al_val2);ulong ll_ret
  8. integer li_i
  9. for li_i = 0 to 31
  10. if mod(long(al_val1 / 2 ^ li_i), 2) + mod(long(al_val2 / 2 ^ li_i), 2) > 0 then
  11. ll_ret += 2 ^ li_i
  12. end if
  13. next
  14. return ll_ret
  15. end function