Changeset 51 for branches/ByteArray/BigInt.pas
- Timestamp:
- Nov 3, 2023, 11:15:31 AM (7 months ago)
- Location:
- branches/ByteArray
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ByteArray
- Property svn:ignore
-
old new 6 6 ByteArray.res 7 7 ByteArray.dbg 8 Storage.dat
-
- Property svn:ignore
-
branches/ByteArray/BigInt.pas
r47 r51 184 184 class operator TBigInt.Implicit(A: TBigInt): UInt64; 185 185 begin 186 if A.Size = 8 then Result := PUInt64(@A.FData[0])^ 187 else raise Exception.Create(SUnsupportedByteSize); 186 if A.Size = 1 then Result := PUInt8(@A.FData[0])^ 187 else if A.Size = 2 then Result := PUInt16(@A.FData[0])^ 188 else if A.Size = 4 then Result := PUInt32(@A.FData[0])^ 189 else if A.Size = 8 then Result := PUInt64(@A.FData[0])^ 190 else raise Exception.Create(SUnsupportedByteSize); 188 191 end; 189 192 190 193 class operator TBigInt.Implicit(A: TBigInt): Int64; 191 194 begin 192 if A.Size = 8 then Result := PInt64(@A.FData[0])^ 193 else raise Exception.Create(SUnsupportedByteSize); 195 if A.Size = 1 then Result := PInt8(@A.FData[0])^ 196 else if A.Size = 2 then Result := PInt16(@A.FData[0])^ 197 else if A.Size = 4 then Result := PInt32(@A.FData[0])^ 198 else if A.Size = 8 then Result := PInt64(@A.FData[0])^ 199 else raise Exception.Create(SUnsupportedByteSize); 194 200 end; 195 201
Note:
See TracChangeset
for help on using the changeset viewer.