Menu

Commit [r13058]  Maximize  Restore  History

lex_cs: emit the report driver margins as valid C#

print_output_rep_normal() emitted the five REPORT margin assignments as a
bare 'Driver.topMargin=' followed by real_print_expr(), with no
terminator - and printc() puts each fragment on its own indented line
unless newlines are suppressed, so the generated source came out as

Driver.topMargin=
1
Driver.bottomMargin=
1

Driver.rightMargin was also missing its '=' entirely. Every REPORT with
an OUTPUT section therefore failed to compile: 36 errors in the one
demo program that has one, and it was the only thing still stopping it.

Factored the repetition into print_margin_assign(), which wraps the
expression in set_nonewlines()/clr_nonewlines() so each assignment is
one statement on one line. Also dropped a duplicated Driver.outputLoc
emission - it was written twice, the second copy without the stdout
else-branch.

d4_orders.4gl now generates and compiles clean. Fidelity probes still
agree with the C runtime (27 semantics, 8 UI, 30 USING, 66-line report,
4 end-to-end programs) and the 203 runtime tests pass.

mikeaubury 2026-09-02

changed /aubit4glsrc/trunk/lib/liblex/lex_cs/dump_report.c
/aubit4glsrc/trunk/lib/liblex/lex_cs/dump_report.c Diff Switch to side-by-side view
Loading...