# OS_GetArgv

## Syntax

      #include <nitro/os.h>

      cosnt char* OS_GetArgv( int n );

## Arguments

`n` | Index number of the argument string to be retrieved

## Return Values

The pointer to the current argument string.

## Description

Retrieves the argument string that has the specified index from the argument data embedded in the ROM file.

For NITRO ROMs, arguments are embedded as argument data in the ROM file using the `buryarg` tool. For TWL ROMs, arguments are embedded as argument data in the ROM file using the `buryarg.TWL` tool. This function is used to get a pointer to the string having the specified index within these arguments. The program name (the name of the ROM file specified when either `buryarg` or `buryarg.TWL` was run) will correspond to index 0; the first argument will be the data in index 1, the second argument will be the data in index 2, and so on.

If you specify a value for `n` that is greater than any value that the `OS_GetArgc` function can get, this function returns `NULL`. If you specify a negative number, operations are undefined.

This function always returns `NULL` for FINALROM builds, regardless of the value specified for `n`.

Example:

> If `buryarg main.srl test 1 2 3` is specified, the result will be as follows:
> `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`
> ( The same is true with `buryarg.TWL`.)

## See Also

`OS_GetArgc`
`OS_GetOpt`
`buryarg` Tool
`buryarg.TWL` Tool

## Revision History

2008/06/23 Split into separate cases for NITRO and TWL.
2005/07/21 Initial version.

CONFIDENTIAL