Menu

Commit [r13063]  Maximize  Restore  History

dotnet: 30 of the 32 demo programs now compile, plus the d4 application

Standalone demo programs compiling clean went 6 -> 30 of 33. The 33rd,
mkstore4, fails the C toolchain too, so it is a broken demo rather than
a gap here. d4, the eight-module application, stays at zero.

The 2009 C# backend's names were still being emitted throughout -
IfxExecute, IfxResult, IfxBinding, IfxCursorType, BuildIfxCursor,
IfxException, IfxSetError, IfxPrepare, IfxToday, IfxAscii, the
IfxDateTimeQual and IfxIntervalQual enums, and a dozen more. 120 lines
of the generator now name the runtime that exists.

Generator fixes:

- assign_wrapper handled CHAR and DECIMAL and fell through for
everything else, so a SMALLINT target took whatever int-typed
expression was assigned to it. 4GL narrows without comment; C#
refuses to. That alone was 58 of the errors.
- A 4GL literal with a decimal point is a DECIMAL, not a float, and
it was emitted bare - which C# reads as a double, so lv_price *
1.15 would not compile against a DECIMAL. It now carries the m
suffix.
- CONSTRUCT emitted "new UI.Construct(this, ...)", treating UI as a
type; it is a property, and Construct is a factory on it.
- FIELD_TOUCHED and NOT FIELD_TOUCHED are expressions, emitted inside
an if condition, but each wrote a trailing semicolon - a syntax
error that stopped the file parsing and hid every other error in
it.
- The thisApp prefix rule from r13062 was too broad in one direction
and too narrow in the other. Inside a report, Fgl.Length must not
be prefixed - it is a static - but SQL.ASqlExecute must be, because
SQL is a property on the module. Asking whether the name carries a
qualifier cannot tell those apart, so the runtime's static classes
are now named explicitly.

Runtime: MATCHES and NOT MATCHES (Informix's pattern language, not a
regular expression), CURRENT, EXIT PROGRAM, STARTLOG and ERRORLOG,
SHOWHELP, SHOW/HIDE OPTION ALL, OPTIONS with a text value, the full
window attribute set, INPUT ARRAY and DISPLAY ARRAY with their screen
and program arrays, BEFORE/AFTER FIELD over several fields at once,
FIELD_TOUCHED, PRINT of a non-text value, and FormField accepting a
nullable subscript - ARR_CURR lands in a SMALLINT and 4GL widens it
freely.

AsBool now returns bool rather than bool?, but only the cast on
FglModule: it is what the generator emits for IF lv_int THEN, and 4GL
treats NULL as false in a condition. Fgl.AsBool stays nullable, because
a NULL column read out of a row really is null and the difference
matters there.

Still open: ORDER BY reports (report4 and report6, 21 errors each).
That path builds a temp table and re-reads it through a second cursor,
and its generated code refers to a startReportOrdered that is never
emitted, to cursors that are never declared, and reaches the session
from a static context. It is one coherent piece of work rather than a
scatter of small gaps.

Fidelity: 27 semantics, 9 UI messages, 30 USING, the 66-line report and
5 end-to-end programs all agree with C. 203 runtime tests pass.

mikeaubury 2026-09-02

changed /aubit4glsrc/trunk/dotnet/src/Aubit4GL.Runtime/FglSession.cs
changed /aubit4glsrc/trunk/dotnet/src/Aubit4GL.Runtime/FglStatus.cs
changed /aubit4glsrc/trunk/dotnet/src/Aubit4GL.Runtime/Report/BaseFGLReport.cs
changed /aubit4glsrc/trunk/dotnet/src/Aubit4GL.Runtime/Sql/ASql.cs
changed /aubit4glsrc/trunk/dotnet/src/Aubit4GL.Runtime/Types/FglBuiltins.cs
changed /aubit4glsrc/trunk/dotnet/src/Aubit4GL.Runtime/Ui/UiApi.cs
changed /aubit4glsrc/trunk/dotnet/src/Aubit4GL.Runtime/Ui/UiLibConstruct.cs
changed /aubit4glsrc/trunk/dotnet/src/Aubit4GL.Runtime/Ui/UiLibInput.cs
changed /aubit4glsrc/trunk/dotnet/src/Aubit4GL.Runtime/Ui/UiLibMenu.cs
changed /aubit4glsrc/trunk/dotnet/src/Aubit4GL.Runtime/Ui/UiTypes.cs
changed /aubit4glsrc/trunk/lib/liblex/lex_cs/compile_cs.c
changed /aubit4glsrc/trunk/lib/liblex/lex_cs/compile_cs_sql.c
/aubit4glsrc/trunk/dotnet/src/Aubit4GL.Runtime/FglSession.cs Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/dotnet/src/Aubit4GL.Runtime/FglStatus.cs Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/dotnet/src/Aubit4GL.Runtime/Report/BaseFGLReport.cs Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/dotnet/src/Aubit4GL.Runtime/Sql/ASql.cs Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/dotnet/src/Aubit4GL.Runtime/Types/FglBuiltins.cs Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/dotnet/src/Aubit4GL.Runtime/Ui/UiApi.cs Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/dotnet/src/Aubit4GL.Runtime/Ui/UiLibConstruct.cs Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/dotnet/src/Aubit4GL.Runtime/Ui/UiLibInput.cs Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/dotnet/src/Aubit4GL.Runtime/Ui/UiLibMenu.cs Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/dotnet/src/Aubit4GL.Runtime/Ui/UiTypes.cs Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/lib/liblex/lex_cs/compile_cs.c Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/lib/liblex/lex_cs/compile_cs_sql.c Diff Switch to side-by-side view
Loading...