<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
<MAN>
  <LANGUAGE>eng</LANGUAGE>

  <TITLE>TCL_ExistVar</TITLE>

  <TYPE>Scilab Function</TYPE>

  <DATE>22 October 2005</DATE>

  <SHORT_DESCRIPTION name="TCL_ExistVar">Return %T if a tcl variable
  exists</SHORT_DESCRIPTION>

  <CALLING_SEQUENCE>
    <CALLING_SEQUENCE_ITEM>OK=TCL_ExistVar(varname
    [,interp])</CALLING_SEQUENCE_ITEM>
  </CALLING_SEQUENCE>

  <PARAM>
    <PARAM_INDENT>
      <PARAM_ITEM>
        <PARAM_NAME>varname</PARAM_NAME>

        <PARAM_DESCRIPTION>
          <SP>: character string. Contains the name of the tcl/tk
          variable.</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>

      <PARAM_ITEM>
        <PARAM_NAME>interp</PARAM_NAME>

        <PARAM_DESCRIPTION>
          <SP>: optional character string parameter. Name of the slave tcl
          interpreter in which the operation has to be performed. If not
          provided, it defaults to the main tcl interpreter created by
          Scilab.</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>

      <PARAM_ITEM>
        <PARAM_NAME>ok</PARAM_NAME>

        <PARAM_DESCRIPTION>
          <SP>: boolean. %T if varname exists.</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
    </PARAM_INDENT>
  </PARAM>

  <DESCRIPTION>
    <P>This routine allows to test if a tcl variable exists.</P>
  </DESCRIPTION>

  <EXAMPLE><![CDATA[
TCL_SetVar("Scilab","OK")
TCL_GetVar("Scilab")
TCL_UnsetVar("Scilab")
TCL_ExistVar("Scilab")
                             
TCL_SetVar("aa",1)
TCL_CreateSlave('SlaveInterp');
TCL_SetVar("aa",2,'SlaveInterp')
TCL_ExistVar("aa")
TCL_GetVar("aa")
TCL_UnsetVar("aa")
TCL_GetVar("aa",'SlaveInterp')
TCL_UnsetVar("aa",'SlaveInterp')
TCL_ExistVar("aa",'SlaveInterp')
TCL_DeleteInterp('SlaveInterp')]]></EXAMPLE>

  <SEE_ALSO>
    <SEE_ALSO_ITEM>
      <LINK>ScilabEval</LINK>
    </SEE_ALSO_ITEM>

    <SEE_ALSO_ITEM>
      <LINK>TCL_EvalFile</LINK>
    </SEE_ALSO_ITEM>

    <SEE_ALSO_ITEM>
      <LINK>TCL_EvalStr</LINK>
    </SEE_ALSO_ITEM>

    <SEE_ALSO_ITEM>
      <LINK>TCL_GetVar</LINK>
    </SEE_ALSO_ITEM>

    <SEE_ALSO_ITEM>
      <LINK>TCL_SetVar</LINK>
    </SEE_ALSO_ITEM>

    <SEE_ALSO_ITEM>
      <LINK>TCL_UnsetVar</LINK>
    </SEE_ALSO_ITEM>

    <SEE_ALSO_ITEM>
      <LINK>TCL_UpVar</LINK>
    </SEE_ALSO_ITEM>

    <SEE_ALSO_ITEM>
      <LINK>TCL_CreateSlave</LINK>
    </SEE_ALSO_ITEM>
  </SEE_ALSO>

  <AUTHOR>Allan CORNET</AUTHOR>
</MAN>