uf_bitxor.srf 478 B

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