Hello,
Recently interested in XPL, and nicely done. If you are still updating any of this Daniel... this is a feature request.
I'm demoing some ways of integrating your XPL with GnuCOBOL, which also compiles to C. It would be nice to have the argc, argv predefined XPL variable descriptors filled in via function call and not just when main is emiited (the normal no -m option adds the argc argv init with access to field names which gets hidden in the XPL -> C, GnuCOBOL -> C, C->ELF tool chain. GnuCOBOL CALL only exposes link symbols to functions, and the emitted code has uneasy acces to C variable names.
Not that modular xpl0006 code is meant to know about the CLI, but XPL code that compiles fine can abend with report at runtime. Nice, by the way, but if the XPL code happens to access argc or argv() xpl builtins the script has no presets. Either a function wrapper to init the descriptors or assume just the program name?
Not a biggy in terms of priority or need (but also not completely useless). Whims of trying out a 1972 COBOL based library with a CALL interface into XPL domain specific command interpreters.
Hercules MVS3.8 Tk4-, with ANS COBOL 1972 and XPL from SHARE sources compile fine in 2020 GnuCOBOL and thanks to your port, xpl0006, with nice interopt on the modern side.
Sample of some of the efforts at https://sourceforge.net/p/open-cobol/discussion/contrib/thread/dca517cdd9
Have good, make well,
Blue, btiffin@gnu.org
:-)
Yes and no. As I was about to try and write up a minimal. I can't quite get the incantations that left the descriptors unset. All works as advertised.
I was early exploring, and using sed to rename function entries generated, and when trying to reproduce, it all just works, Daniel, no traceback.
args.xpl as
You can close this, I think. I can't find screen history for a transcript, It was a nice traceback from the XPL runtime. I was changing generated sources of both xpl0006 and cobc to experiment, and will take blame for mixing something up. It might have been a top level sans procedure label. :-)
Turns out there is no need to tweak code gen, and everything just works with -m.
I'll continue to explore where XPL might meld with COBOL. Nice work.
Cheers,
Blue
Last edit: Brian Tiffin 2020-07-04