Extract a token from a configuration prompt.
Extract a token from a configuration prompt.Retrieves and parses the requested prompt, trying to match it against a user-supplied list of tokens. This function is used to extract multiple-choice configuration options from prompt.
The list of tokens is represented by one or more string arguments to the function. As this is perhaps the most complex of the parsing functions, here is an example that includes error recovery:
int value=tokopt(COLOUR,"DARKBLUE","DARKGREEN","DARKCYAN","DARKRED", "DARKMAGENTA","BROWN","GREY","DARKGREY","BLUE","GREEN", "CYAN","RED","MAGENTA","YELLOW","WHITE"); if(value<1) error_fatal("Option COLOUR has unacceptable value.");