Older Newer
Wed, 20 Nov 2019 04:43:35 . . . . SyneRyder


Changes by last author:

Added:
= getArrayString =

== Syntax ==

int getArrayString(int nr, int index)

== Arguments ==

:nr

::The number of the array you want to retrieve a string

:itemnum

::The index number of the item in the array you want to retrieve

== Return ==

Returns a pointer to the string if it exists, or a pointer to the string "Not Available" otherwise.

== Description ==

Retrieves a string stored in the built-in Arrays.

== Comment ==

Note that you must allocate space for the array first using the allocArray function, otherwise these functions will fail.

== Example ==

<code>

%ffp

ctl(0): combobox, "Harry\nJim\nSally",val=0,action=preview,size=(*,200)

OnFilterStart:{

// Allocate Array for storing 3 strings of max. 256 bytes length

allocArray(0,3,256,0,1);

// Store the Strings

putArrayString (0,0, "Hello, Harry!");

putArrayString (0,1, "Hello, Jimmy.");

putArrayString (0,2, "Hello, Sally, old girl!");

// Display

Info ("%s", getArrayString(0,ctl(0)) );

freeArray(0);

return false;

}

</code>

== See Also ==

allocArray, putArrayString, freeArray