54 lines
2 KiB
HTML
54 lines
2 KiB
HTML
<html>
|
|
<head>
|
|
<title>STAB_Append</title>
|
|
<meta name="Author" content="Joey">
|
|
<link rel="stylesheet" type="text/css" href="../webdocs.css">
|
|
</head>
|
|
<body>
|
|
<h1><a name="ape_stab_append"></a>STAB_Append</h3>
|
|
<p>The <b>STAB_Append</b> function adds a string to a STAB (string table) object.
|
|
The string is added to the end of the list.
|
|
</p>
|
|
|
|
<PRE class="syntax"><b>extern STAB_Append</b>
|
|
<b> float</b><i> handle</i> // handle to STAB object
|
|
<b> string</b><i> strval$</i> // string to store
|
|
<b> float</b><i> fval</i> // (optional) float value to associate with string
|
|
<b> floatvar</b><i> index</i> // (optional) float variable to receive the string index
|
|
</PRE>
|
|
|
|
<h4>Parameters</h4>
|
|
|
|
<dl>
|
|
<dt><i>handle</i></dt>
|
|
<dd>[in] Handle to a STAB object previously returned from
|
|
<a href="stab_create.html"><b>STAB_Create</b></a>.</dd>
|
|
<dt><i>strval</i></dt>
|
|
<dd>[in] The string that is to be added to the string table.</dd>
|
|
<dt><i>fval</i></dt>
|
|
<dd>[in] The optional float value to be associated with this entry in the table.
|
|
If unspecified, defaults to zero.</dd>
|
|
<dt><i>index</i></dt>
|
|
<dd>[out] The index of the added string will be returned in this variable.</dd>
|
|
</dl>
|
|
|
|
<h4>Remarks</h4>
|
|
<p>STAB objects use zero-based indices, so the first string in the list will have
|
|
an index of zero.</p>
|
|
<p>If <i>handle</i> is not a valid STAB handle, an error message will be printed
|
|
to the console. No checking is done for out-of-memory conditions.</p>
|
|
<p>Also note that if the value of <i>index</i> may no longer refer to the
|
|
same data after a subsequent call to one of the STAB sorting functions.</p>
|
|
|
|
<h4>Example</h4>
|
|
<pre>extern STAB_Create handle
|
|
extern STAB_Append handle "Hello, world!" 5
|
|
extern STAB_Append handle "Goodbye, world!" 10
|
|
extern STAB_Append handle "Append your mom." 92934
|
|
.
|
|
// Now your STAB object contains three strings,
|
|
// and you can do something useful with it...
|
|
.
|
|
extern STAB_Destroy handle</pre>
|
|
</body>
|
|
</html>
|