(* Collection of code snippets by Arne Vajhøj *)
(* (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) *)
[inherit('sys$library:pascal$lib_routines', 'sys$library:pascal$cli_routines')]
program pars1(input, output);

var
   pars2def : [external] integer;

var
   args : varying[255] of char;

begin
   lib$get_foreign(args.body, 'Arguments: ', args.length);
   if odd( cli$dcl_parse('pars ' + args, pars2def)) then begin
      if odd(cli$present('A1')) then writeln('A1') else writeln('not A1');
      if odd(cli$present('A2')) then writeln('A2') else writeln('not A2');
   end;
end.
