PGM_$GET_ARG Domain/OS PGM_$GET_ARG
NAME
pgm_$get_arg - get a program argument
SYNOPSIS (C)
#include <apollo/base.h>
#include <apollo/pgm.h>
short pgm_$get_arg(
short &arg_number,
char *arg_buffer,
status_$t *status,
short &buffer_length)
SYNOPSIS (Pascal)
%include '/sys/ins/base.ins.pas';
%include '/sys/ins/pgm.ins.pas';
function pgm_$get_arg(
in arg_number: integer;
out arg_buffer: univ pgm_$name;
out status: status_$t;
in buffer_length: integer): integer;
SYNOPSIS (FORTRAN)
%include '/sys/ins/base.ins.ftn'
%include '/sys/ins/pgm.ins.ftn'
integer*4 status
integer*2 arg_length, arg_number, buffer_length
character arg_buffer*128
arg_length = pgm_$get_arg(arg_number, arg_buffer, status, buffer_length)
DESCRIPTION
Pgm_$get_arg writes an argument from the caller's argument vector into
the buffer at arg_buffer and returns its length.
arg_number
The number of the argument to get.
arg_buffer
A buffer allocated to receive the argument.
status
The completion status. If status is pgm_$arg_too_big, the argument
was more than buffer_length bytes long and was truncated to fit.
buffer_length
The number of bytes allocated to receive the argument. Pgm_$get_arg
will not write more than buffer_length bytes into arg_buffer. If
the value of buffer_length is less than the returned argument
length, the argument was truncated to fit in arg_buffer.