<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
<MAN>
	<LANGUAGE>eng</LANGUAGE>
	<TITLE>predef</TITLE>
	<TYPE>Scilab Function</TYPE>
	<DATE>November 2006</DATE>
	<SHORT_DESCRIPTION name="predef"> variable protection</SHORT_DESCRIPTION>
	<CALLING_SEQUENCE>
		<CALLING_SEQUENCE_ITEM>n=predef()  </CALLING_SEQUENCE_ITEM>
		<CALLING_SEQUENCE_ITEM>oldnew=predef(n)</CALLING_SEQUENCE_ITEM>
		<CALLING_SEQUENCE_ITEM>oldnew=predef('all')</CALLING_SEQUENCE_ITEM>
		<CALLING_SEQUENCE_ITEM>oldnew=predef('clear')</CALLING_SEQUENCE_ITEM>
	</CALLING_SEQUENCE>
	
	<DESCRIPTION>
		<P>
			Utility function used for defining &quot;oldest&quot; variables as &quot;protected&quot;.
			Protected variables  cannot be killed. They are not saved 
			by the <VERB>'save'</VERB> command. The &quot;oldest&quot; are those appearing last in
			the <VERB>who('get')</VERB>.</P>
			<P><VERB>predef()</VERB> gets the number of protected variables</P>
			<P><VERB>predef('a[ll]')</VERB> sets all the  variables protected, it also return
			the old and new value of protected variables number.</P>
			<P><VERB>predef('c[lear]')</VERB> unprotect all but the last 7 variables, it also return
			the old and new value of protected variables number.</P>
			<P><VERB>predef(n)</VERB> sets the <VERB>max(n,7)</VERB> last defined variables as protected, it also return
			the old and new value of protected variables number.
		</P>
	</DESCRIPTION>
	
	<SECTION label="Remark">
		<P>
			A number of protected variables are set in the start-up file <VERB>SCI/scilab.star</VERB>.
			User may in particular set its own predefined variables in user's startup files 
			<VERB>SCIHOME/.scilab</VERB> and <VERB>SCIHOME/scilab.ini</VERB>
		</P>
		<P>
			SCIHOME definition : 
			On Windows : C:/Documents and Settings/&lt;User&gt;/Scilab/&lt;Scilab-Version&gt;
			On Linux/Unix : /home/&lt;User&gt;/.Scilab/&lt;Scilab-Version&gt;
		</P>
	</SECTION>
	
	<SEE_ALSO>
		<SEE_ALSO_ITEM>
			<LINK>clear</LINK>
		</SEE_ALSO_ITEM>
		<SEE_ALSO_ITEM>
			<LINK>save</LINK>
		</SEE_ALSO_ITEM>
	</SEE_ALSO>
	
</MAN>
