PA_GetStringInArray


version 2003


PA_GetStringInArray (array; index; string)

Parameter Type Description
array PA_Variable Array to access
index long Index of the element to access
string char * Value of the index element

Description

The routine PA_GetStringInArray fills string with the content of the index element of the string array array .

By default, PA_GetStringInArray fills string with a null terminated C string, unless you have previously called the PA_UsePStrings functions.

By default, PA_GetStringInArray fills string with Macintosh characters on Macintosh and ANSI characters under Windows, unless you have previously called the PA_UseMacCharacters or PA_UseAnsiCharacters function

Be sure to leave enough room in string to fill it with data and to avoid an overlapping problem.

Example

Get the value of the current element of a string array, and display an alert.

   // A string is max 255 chars
   char   s[256];
 
   PA_GetStringInArray( theArray, PA_GetArrayCurrent(theArray), s );
   PA_Alert( s );

See Also

PA_SetStringInArray , PA_UseAnsiCharacters , PA_UseCStrings , PA_UseMacCharacters , PA_UsePStrings .

Error Handling

None.