Tag v3-programargs-iochan. Suite 126/126; fixpoint OK
(bootstrap/fixpoint.sh, image 2,071,330 bytes).
ProgramArgsArgCount() : CARDINAL — the number of arguments after the
program name.GetArg(n : CARDINAL; VAR s : ARRAY OF CHAR) : BOOLEAN —
1-based (1 = first argument); FALSE when absent.SysShim.argc/SysShim.arg → shim m2argc/m2arg, which
read /proc/self/cmdline (Linux).IOChanTYPE ChanId; — opaque; completed as ADDRESS (a C FILE *).StdInChan/StdOutChan/StdErrChan.ReadChar, WriteChar, WriteString, WriteLn, WriteInt.SysShim (stdin/stdout/stderr,
fgetc/fputc/fputs/fwriteln/fwriteint); a NIL handle
degrades to a safe no-op / 0C, as in Files.runtime/syslib/SysShim.def/.mod: argc, stdin, fgetc,
fwriteint.runtime/syslib/shim.c: m2stdin.progargs_prog.mod (exit 7, run with no arguments): ArgCount = 0,
GetArg(1) and GetArg(999) return FALSE.iochan_prog.mod: writes hello 42 on StdOutChan, reads one
character from StdInChan, echoes got Z; first stdout line
hello 42, exit 0.ProgramArgs.ArgCount excludes argv[0]; GetArg is 1-based.IOChan is a pragmatic subset: ReadString, ReadResult,
seek/position and channels over files are not included; ChanId
wraps only the standard streams for now.stdlib/programargs.def/.mod, stdlib/iochan.def/.mod,
runtime/syslib/SysShim.def/.mod, runtime/syslib/shim.c,
compiler/tests/{progargs_prog,iochan_prog}.mod,
compiler/run_tests.sh, docs/{features,plan}.md.