remobjects / pascalscript

pascalscript
Other
447 stars 178 forks source link

Missing Data type NativeUInt or UInt64 #229

Open KaterMusch opened 4 years ago

KaterMusch commented 4 years ago

I'm missing the data types NativeUInt or UInt64. Is there a reason why Int64 exists but UInt64 not? Can anyone help me with this?

Thank you

pult commented 4 years ago

maybe so

uPSCompiler.pas

procedure TPSPascalCompiler.DefineStandardTypes;

{$IFNDEF PS_NOINT64}
  AddType('NativeInt', {$IFDEF CPU64}btS64{$ELSE}btS32{$ENDIF});
  AddType('NativeUInt', {$IFDEF CPU64}btS64{$ELSE}btU32{$ENDIF});
  AddType('UInt64', btS64);
{$ENDIF}
KaterMusch commented 4 years ago

Unfortunately the data type "btS64" is not compatible with an Unsigned Int64. I could already test this. I think I will try to introduce a new datatype btU64. At first sight it just looks like a lot of writing...hopefully without hidden traps.