direktor05 2 Posted Tuesday at 04:12 PM Hello, can someone explain what is wrong here and why this doesn't fit together and why I can't typecast Int64(Integer): Operator not applicable to this operand type error below: How to fix this? function TDIUnicodeWriter.WriteDecimalNumber(ValueNumber: Int64): Boolean; label 1; var StartDiv: Int64; i: Cardinal; begin if ValueNumber < 0 then -> HERE begin Result := WriteCharW(WC_HYPHEN_MINUS); if not Result then Exit; ValueNumber := -ValueNumber; -> HERE end; StartDiv := 1000000000000000000; -> HERE (Incompatible types) repeat i := ValueNumber div StartDiv; -> HERE if i > 0 then Break; StartDiv := StartDiv div 10; -> HERE if StartDiv < 10 then goto 1; -> HERE until False; repeat Result := WriteCharW(WA_NUM_TO_HEX[Cardinal(i)]); if not Result then Exit; Dec(ValueNumber, i * StartDiv); StartDiv := StartDiv div 10; -> HERE if StartDiv < 10 then Break; -> HERE i := ValueNumber div StartDiv; -> HERE until False; 1: Result := WriteCharW(WA_NUM_TO_HEX[ValueNumber]); -> (Incompatible types) end; Share this post Link to post
direktor05 2 Posted Tuesday at 04:24 PM I fixed it using ChatGPT but I can't understand it properly Share this post Link to post