Menu

#472 New option to list of Internal Registers

GC 3.x
accepted
nobody
5 - default
2024-07-23
2024-06-30
No

for cobc we have the following options:
--list-reserved display reserved words
--list-intrinsics display intrinsic functions
--list-mnemonics display mnemonic names
--list-exceptions display exception names
--list-system display system routines

-list-reserved however also lists the internal registers.
See attached file.
Perhaps it would be clearer if there was another option:
-list-registers

1 Attachments

Discussion

  • Eugenio Di Lorenzo

    or at least change the cobc -help result and PG documentation
    from " --list-reserved display reserved words"
    to "--list-reserved display reserved words and internal registers".

     
  • Simon Sobisch

    Simon Sobisch - 2024-07-23
    • labels: --> cobc, help, docs
    • status: open --> accepted
     
  • Simon Sobisch

    Simon Sobisch - 2024-07-23

    I agree that a split is reasonable and can also help to catch some configuration issues.
    .... but I've did so back in 2017 with the last part that fixes that with [r2279], --list-reserved was distributed with GnuCOBOL 3.1, much before --list-exceptions was added. I've missed to note both in NEWS and want to fix that under this FR.

    Because of compatibility concerns (back then there were programs using the output of --list-reserved interactively, maybe TP debugger?) I left an internal call to the new --list-registers in --list-reserved (as an extra section, but still). What I did forget was the entry in the help, so that should be fixed as well.

    So:
    * the separate option does exists since long
    * the internal call in reserved.c should be dropped (very likely this means that the generation for the texincludes under "doc" directory needs to be changed as well)
    * the documentation for that is lacking (old NEWS entries and now help.c, which was extracted from cobc.c in the meantime; when we drop the internal call we need a current NEWS entry as well)
    * "random people on the internet speak up if the internal call should be kept until 4.x" (I don't think so, so if no one speaks up that will be dropped)

     

Log in to post a comment.