Menu

Commit [r13050]  Maximize  Restore  History

Retarget the C# generator onto the .NET runtime

The CSNEW generator already built and worked - it was simply never wired
into the top-level build. Retargeting it turned out to be a handful of
edits rather than a rewrite:

namespace and using -> Aubit4GL / Aubit4GL.Generated
base class -> FglModule, which carries the session
DATE -> DateOnly, an exact match
DECIMAL and MONEY -> decimal (this is where unknown_8 dies)
DATETIME, INTERVAL -> FglDateTime, FglInterval
BYTE and TEXT -> byte[]
SMALLINT -> short, not int
CLIPPED, LENGTH,
UPSHIFT and friends -> Fgl.*

DISPLAY now emits its expressions as separate arguments rather than
concatenating them, because 4GL renders each value at its type's own
width - an INTEGER in 11 columns, a SMALLINT in 6 - and joining them
into one string first threw that away. SMALLINT mapping to int? had the
same effect and is fixed.

A new end-to-end probe compiles ONE 4GL program through BOTH toolchains
and diffs what they print. It is the only check that exercises the
generator and the runtime together; every other probe tests a
hand-written .NET side. It passes.

Known gap, recorded at the head of the probe: CHAR(n) maps to a bare
string, so its declared width is lost and an unclipped CHAR prints
without its padding. Fixing that means carrying the width into the
declaration and routing assignment through Assign(), which touches the
declaration, LET and parameter paths.

mikeaubury 2026-09-02

added /aubit4glsrc/trunk/dotnet/fidelity/endtoend
added /aubit4glsrc/trunk/dotnet/fidelity/endtoend/prog.4gl
added /aubit4glsrc/trunk/dotnet/fidelity/endtoend/run.sh
changed /aubit4glsrc/trunk/dotnet/src/Aubit4GL.Runtime/FglSession.cs
/aubit4glsrc/trunk/dotnet/fidelity/endtoend/prog.4gl Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/dotnet/fidelity/endtoend/run.sh Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/dotnet/src/Aubit4GL.Runtime/FglSession.cs Diff Switch to side-by-side view
Loading...