<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2008 - INRIA
 *
 * Copyright (C) 2012 - 2016 - Scilab Enterprises
 *
 * This file is hereby licensed under the terms of the GNU GPL v2.0,
 * pursuant to article 5.3.4 of the CeCILL v.2.1.
 * This file was originally licensed under the terms of the CeCILL v2.1,
 * and continues to be available under such terms.
 * For more information, see the COPYING file which you should have received
 * along with this program.
 *
 -->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="demo_file_choice">
    <refnamediv>
        <refname>demo_file_choice</refname>
        <refpurpose>choose and executes an item within a list </refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>demo_file_choice(path,ch)</synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Description</title>
        <para>
            The function demo_file_choice choose and executes an item chosen in the
            'demolist' variable, that shall be written above. The variable 'demolist' is a
            text matrix whose first column contains names of items displayed in an options
            window and whose second column contains the names of the files that will be
            executed. The title of the options window is 'Choose a demo'.
            The 'path' variable is the access to the files called in the second column.
            The 'ch' variable allows to avoid the special cases 'root' and 'anim' that are
            used in peculiar demonstrations of Scilab. Then you have to enter another word
            than 'root' or 'ch', 'no' for example.
            If you choose to cancel the options window, the console is put back to its
            previous width.
        </para>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[
demolist=['n-pendulum','npend/npend_gateway.sce';
	  'Wheel simulation','wheel2/wheel_gateway.sce';
	  'Bike Simulation','bike/bike_gateway.sce';
	  'ODE''S','ode/ode.dem';
	  'DAE''S','dae/dae.dem']

demo_file_choice('SCI/demos/simulation/','no');
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>See also</title>
        <simplelist type="inline">
            <member>
                <link linkend="demo_function_choice">demo_function_choice</link>
            </member>
        </simplelist>
    </refsection>
</refentry>
