#include <nitro/os.h>
cosnt char* OS_GetArgv( int n );
n | The index number of the argument string to be retrieved. |
The pointer to the current argument string.
This function retrieves the argument string that has the specified index from the argument data embedded in the ROM file.
Arguments can be embedded in the ROM file as argument data using the buryarg
tool. The specified ROM file name is used as the data for index 0 when buryarg
is executed.
If a value is specified for n
that is equal to or greater than the value retrieved by OS_GetArgc()
, NULL is returned. If you specify a negative number, operations are undefined.
This function always returns NULL when FINALROM builds regardless of the value specified for n.
Example:
The following example shows the results whenburyarg main.srl test 1 2 3
are specified.
OS_GetArgc() ・4
OS_GetArgv( 0 ) ・main.srl
OS_GetArgv( 1 ) ・test
OS_GetArgv( 2 ) ・1
OS_GetArgv( 3 ) ・2
OS_GetArgv( 4 ) ・3
OS_GetArgv( 5 ) ・NULL
OS_GetArgc, OS_GetOpt, buryarg tool
07/21/2005 Initial version.