int tsmGetArgInt ( int argc, char **argv, char *arg, int *value )

Get the integer after an option on the command line

Documentation

Get the integer after an option on the command line.

This function will take the argc and argv variables that were passed to an application's main() function and will then test to see if a specific option string was supplied in the command line. If it is found, then the string directly after that option is converted to an integer value and returned.

The string comparison is case sensitive.

Returns:
TRUE if the option was found and it's value placed in the value variable, FALSE otherwise.
Parameters:
argc - the number of arguments passed to main()
argv - the array of command line strings passed to main()
arg - an argument to test for in the argv array
value - a pointer to an integer to be filled with the option's value
Author:
Martin Reddy
Version:
10 March 1998
See Also:
tsmGetArg, tsmGetArgFloat, tsmGetArgString


TSMAPI_RELEASE 2.1 - Release Date: 2001/01/10 19:01:12

Back to tsmApi Home Page