Menu

Commit [r13047]  Maximize  Restore  History

.NET: 4GL builtin functions

LENGTH, CLIPPED, UPSHIFT, DOWNSHIFT, ORD, ASCII, the substring operator,
MDY, DAY, MONTH, YEAR, WEEKDAY and DBDATE-aware date formatting - all
checked against the C runtime through the probe, which now compares 27
values rather than 13.

Two details worth having pinned down: the substring operator is 1-based
and inclusive at both ends, so s[1,5] is five characters and not four;
and WEEKDAY counts Sunday as 0, which the C confirms by giving 4 for
29 February 2024. The probe also agrees on day number 45350 for that
date, which independently checks the epoch.

Substrings step in characters, so a subscript cannot cut a surrogate
pair in half.

The divergence note in the probe was stale and has been corrected: the C
no longer leaves a partial character behind when a CHAR is truncated,
but the width is still counted in bytes there and in characters here.

mikeaubury 2026-09-02

changed /aubit4glsrc/trunk/dotnet/fidelity/cs/Program.cs
changed /aubit4glsrc/trunk/dotnet/fidelity/fid.4gl
added /aubit4glsrc/trunk/dotnet/src/Aubit4GL.Runtime/Types/FglBuiltins.cs
added /aubit4glsrc/trunk/dotnet/tests/Aubit4GL.Runtime.Tests/BuiltinTests.cs
/aubit4glsrc/trunk/dotnet/fidelity/cs/Program.cs Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/dotnet/fidelity/fid.4gl 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/tests/Aubit4GL.Runtime.Tests/BuiltinTests.cs Diff Switch to side-by-side view
Loading...