Changeset 197 for branches/virtcpu varint/UVarInt.pas
- Timestamp:
- Sep 22, 2019, 9:31:49 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/virtcpu varint/UVarInt.pas
r196 r197 39 39 class operator Multiply(A: TVarInt; B: TVarInt): TVarInt; 40 40 class operator IntDivide(A: TVarInt; B: TVarInt): TVarInt; 41 class operator Modulus(A: TVarInt; B: TVarInt): TVarInt; 41 42 class operator Subtract(A: TVarInt; B: TVarInt): TVarInt; 42 43 class operator Equal(A: TVarInt; B: TVarInt): Boolean; … … 67 68 class operator Implicit(A: TVarUInt): Byte; 68 69 class operator Implicit(A: TVarUInt): Char; 70 class operator Implicit(A: TVarUInt): TVarInt; 69 71 class operator Implicit(A: Byte): TVarUInt; 70 72 class operator Implicit(A: Integer): TVarUInt; 71 73 class operator Implicit(A: Int64): TVarUInt; 72 74 class operator Implicit(A: QWord): TVarUInt; 75 class operator Implicit(A: TVarInt): TVarUInt; 73 76 class operator Explicit(A: Byte): TVarUInt; 74 77 class operator Explicit(A: Integer): TVarUInt; … … 83 86 class operator Multiply(A: TVarUInt; B: TVarUInt): TVarUInt; 84 87 class operator IntDivide(A: TVarUInt; B: TVarUInt): TVarUInt; 88 class operator Modulus(A: TVarUInt; B: TVarUInt): TVarUInt; 85 89 class operator Subtract(A: TVarUInt; B: TVarUInt): TVarUInt; 86 90 class operator Equal(A: TVarUInt; B: TVarUInt): Boolean; … … 148 152 end; 149 153 154 class operator TVarUInt.Implicit(A: TVarUInt): TVarInt; 155 begin 156 Result.Value := A.Value; 157 end; 158 150 159 class operator TVarUInt.Implicit(A: Byte): TVarUInt; 151 160 begin … … 168 177 end; 169 178 179 class operator TVarUInt.Implicit(A: TVarInt): TVarUInt; 180 begin 181 Result.Value := A.Value; 182 end; 183 170 184 class operator TVarUInt.Explicit(A: Byte): TVarUInt; 171 185 begin … … 226 240 begin 227 241 Result.Value := A.Value div B.Value; 242 end; 243 244 class operator TVarUInt.Modulus(A: TVarUInt; B: TVarUInt): TVarUInt; 245 begin 246 Result.Value := A.Value mod B.Value; 228 247 end; 229 248 … … 466 485 end; 467 486 487 class operator TVarInt.Modulus(A: TVarInt; B: TVarInt): TVarInt; 488 begin 489 Result.Value := A.Value mod B.Value; 490 end; 491 468 492 class operator TVarInt.Subtract(A: TVarInt; B: TVarInt): TVarInt; 469 493 begin 470 Result.Value := A.Value - B.Value 494 Result.Value := A.Value - B.Value; 471 495 end; 472 496
Note:
See TracChangeset
for help on using the changeset viewer.