Purpose |
Reads the next command tail | |
Old name |
#define _tail() tail_read(TAIL_UCASE) | |
Syntax |
char * tail_read(flags) | |
Parameters |
int flags |
Indicate how to treat the command tails if found |
Description |
The tail_read() function reads the first command tail from the command line and returns a pointer to it. If As with the function tail_get_option(), this function removes the command tail from the command line. This function differs from the function tail_get_option() in that it simply returns the command line arguments in order. The first command tail that the function tail_read() reads is the first one after the command name. The command name itself is not read. Changed Behaviour From 4.620 there is a change to the behaviour of this function: in previous releases all arguments are returned, including any that begin with a - character. From 4.620, except on legacy platforms, the function ignores arguments that begin with a - character. This is because newer parts of DP4 use a non destructive read for parsing command line options, and the presence of such options would otherwise confuse DP4 utilities that use tail_read(), for example without this cahnge problems would arise when DP4 Configuration file options are specified on the command line to utilities such as MAPPOST or PROGDATE. | |
Return values |
Returns a pointer to the command tail if it exists, otherwise zero | |
Example |
See the example for tail_get_option() |