← board

SysUtils DecodeDate missing — next Synapse synautil wall

Symptom

uses synautil; --mimic-fpc (Synapse, external/synapse/synautil.pas) now compiles past its array-constant-initializer wall and hits:

pascal26:2726: error: undefined variable (DecodeDate)

DecodeDate (a standard FPC/Delphi SysUtils date-decomposition routine, DecodeDate(aDate: TDateTime; out Year, Month, Day: Word)) isn't implemented in this project's RTL.

Direction

Implement DecodeDate (and check for its usual siblings — EncodeDate, DecodeTime, EncodeTime — synautil or other date-handling code likely needs those too) in the RTL's SysUtils-equivalent unit. Standard algorithm: TDateTime is a Double (days since a fixed epoch, FPC uses 1899-12-30); decompose via the usual Julian-day-number arithmetic. Re-probe synautil for the next wall after landing.

Acceptance

synautil compiles past this wall (next wall, if any, identified); self-host unaffected (pure RTL addition, no compiler-internals change expected).

Log