NAME

getch - grab a parameter from command line


SYNOPSIS

int getch(name, format, value)


INPUT PARAMETERS

name- char*
      parameter name
format -char*
      format of variable (d,f,s)


OUTPUT PARAMETERS

value - void*
       variable value of variable


RETURN VALUE

x = number of matches found


DESCRIPTION

This function is the seplib equivalent of the older getpar() for extracting values from command line expressions of the form `name=value'.


COMMENTS

More than one name may be searched by separating the alternatives by blanks or commas. Possible format conversions are ``d'' (or ``i''), ``f'' (or ``r''), ``g'' and ``s'' for integer, floating point, double precision, and strings respectively. If no match is found, the variable is not altered.

When a keyword `par=filename' is encountered on the command line, that file (and any that it might in turn point to) is scanned as well. Getch returns a count of the number of matches it found.


DIAGNOSTICS

Program execution is terminated with extreme prejudice if a par file cannot be opened or the command argument list cannot be found. It is also an error for parfiles to be nested more then 10 deep.


BUGS

It should be possible to limit the length of retrieved strings and to extract individual characters. It is also not presently possible to redirect search to an internal argument list.


KEYWORDS

parameter command line argument


SEE ALSO

the fetch manpage, the hetch manpage, the putch manpage, the auxpar manpage, the getch_add_string manpage


LIBRARY

sep