Skip to content

v0.9.46

Choose a tag to compare

@github-actions github-actions released this 06 Oct 18:48
· 78 commits to main since this release
Twelve features RPG developers asked IBM for and IBM declined, from the
IBM Ideas portal's most-voted RPG requests, plus fixes for #26 to #29.
Every change is checked on a real IBM i (PUB400): the fixes run the
same there, and the new features are OpenRPG extensions that IBM i's
compiler rejects.

- INT(20) and UNS(20) are 64-bit, and every integer size is range
  checked (#26).
- A date plus or minus months or years keeps to the end of a shorter
  month: D'2024-01-31' + %MONTHS(1) is 2024-02-29, not 2024-03-02.
- EXEC and SQL must be on the same line, as on IBM i (the statement
  itself can still start on the next line).
- The SQLCA has no SQLERML; use SQLERRML or SQLERL, as on IBM i.

- Block comments: /* ... */, in free-form and fixed-form source (93 votes).
- Display files defined in JSON: `dspfc screen.json`, in the shape of
  the .dspfd descriptor (90 votes).
- %FKEY: the function key that ended the last EXFMT or READ (40 votes).
- Several names in one DCL-S: DCL-S i j k INT(10); (39 votes).
- Interpolated strings: f'I have {apples} apples' (37 votes).
- Procedures inside procedures, seeing the outer one's variables
  (30 votes).
- NOT IN (30 votes).
- Regular expressions: %MATCHES, %FIND, %COUNTMATCHES (28 votes).
- CTL-OPT OPTION(*NOLENCHK): a %SUBST length past the end gives the
  rest of the data (27 votes).
- %CHAR(number : *NOZEROSUPPRESS) keeps leading zeros (25 votes).
- AND, OR, NOT and parentheses in /IF and /ELSEIF (15 votes).
- *TRUE and *FALSE (13 votes).

Each is described in docs/GUIDE.md. Source that uses them compiles only
with OpenRPG.

- INZ(*ON) on an indicator starts it on (#27).
- Adding or subtracting a duration moves a timestamp, in every unit;
  subtracting a duration from a date or time compiles (#28).
- An indicator is character data, '1' or '0': 'flag=' + flag, c1 = flag
  and flag = '1' all compile (#29).
- x IN array compiles, for fixed and varying arrays.
- A procedure can return IND.
- In free-form source, an /ELSEIF after an /IF that was not taken is
  tested; its /ELSE used to run instead.

Found while working on this release, and not yet fixed:
- A name declared twice with DCL-S, and a call to a procedure that does
  not exist, are reported by the C++ compiler rather than by rpgc.
- %SUBST as the target of an assignment is a syntax error.
- Fixed-form source whose first line is a directive such as /IF is read
  as free-form.

383 OpenRPG tests, 45 dspfc tests and 31 interactive display-file tests
pass.