<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE> {The S-lang C Library Reference}: SLang_pop_string</TITLE>
<LINK HREF="cref-71.html" REL=next>
<LINK HREF="cref-69.html" REL=previous>
<LINK HREF="cref.html#toc70" REL=contents>
</HEAD>
<BODY>
<A HREF="cref-71.html">Next</A>
<A HREF="cref-69.html">Previous</A>
<A HREF="cref.html#toc70">Contents</A>
<HR>
<H2><A NAME="SLang_pop_string"></A> <A NAME="s70">70. <B>SLang_pop_string</B></A></H2>

<P>
<DL>
<DT><B> Synopsis </B><DD><P>Pop a string from the stack
<DT><B> Usage </B><DD><P><CODE>int SLang_pop_string(char **strptr, int *do_free)</CODE>
<DT><B> Description </B><DD><P>The <CODE>SLpop_string</CODE> function pops a string from the stack and
returns it as a malloced pointer via <CODE>strptr</CODE>.  After the
function returns, the integer pointed to by the second parameter
will be set to a non-zero value if <CODE>*strptr</CODE> should be freed via 
<CODE>free</CODE> or <CODE>SLfree</CODE>.  If successful, <CODE>SLpop_string</CODE>
returns zero.  However, if the top stack item is not of type
<CODE>SLANG_STRING_TYPE</CODE>, or the stack is empty, the function will
return <CODE>-1</CODE> and set <CODE>SLang_Error</CODE> accordingly.
<DT><B> Notes </B><DD><P>This function is considered obsolete and should not be used by
applications.  If one requires a malloced string for modification,
<CODE>SLpop_string</CODE> should be used.  If one requires a constant
string that will not be modifed by the application,
<CODE>SLang_pop_slstring</CODE> should be used.
<DT><B> See Also </B><DD><P><CODE>SLang_pop_slstring, SLpop_string</CODE>
</DL>
<P>
<P>
<P>
<HR>
<A HREF="cref-71.html">Next</A>
<A HREF="cref-69.html">Previous</A>
<A HREF="cref.html#toc70">Contents</A>
</BODY>
</HTML>
