<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#330000">
    Hi<br>
    <br>
    workarounds use argn(2) inside functions, and use exotic names for
    variables inside functions.<br>
    <br>
    eg:<br>
    <br>
    function y=MyPrettyFunction(mpf_a,mpf_x)<br>
    <br>
    y = mpf_x^mpf_a<br>
    <br>
    <br>
    endfunction<br>
    <br>
    Le 25/03/2011 12:20, Ruben Bibas a écrit :
    <blockquote
      cite="mid:BANLkTikD=ki_8RraHE6j1ZgmDOUpO=cgPQ@mail.gmail.com"
      type="cite">
      <pre wrap="">Ok, thanks for the answer.
Ruben

On Fri, Mar 25, 2011 at 11:30 AM, Sylvestre Ledru
<a class="moz-txt-link-rfc2396E" href="mailto:sylvestre.ledru@scilab.org"><sylvestre.ledru@scilab.org></a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">We might introduce in a future release of the 6 family a strict mode for
such things... but it won't happen soon...

S

Le vendredi 25 mars 2011 à 10:02 +0100, Ruben Bibas a écrit :
</pre>
        <blockquote type="cite">
          <pre wrap="">Hi,
Thanks for the anser.
Yes, I know it is the normal behaviour. I am just asking if there is a
way for telling Scilab to behave differently ?
Thanks

2011/3/25 Stéphane Mottelet <a class="moz-txt-link-rfc2396E" href="mailto:stephane.mottelet@utc.fr"><stephane.mottelet@utc.fr></a>:
</pre>
          <blockquote type="cite">
            <pre wrap="">Le 25/03/2011 08:59, Ruben Bibas a écrit :
</pre>
            <blockquote type="cite">
              <pre wrap="">
Hello,
I used to use Matlab and now I am using Scilab a lot.
Is it possible to use functions in Scilab and have a variable scope
handling the same way Matlab is: it does not know of any variables
except the arguments of the functions ?
I find it very disturbing that function can know external variables
which are not global.
Besides, sometimes if you do use this functionality with matrices, and
try to redefine part of the matrix, it gets truncated.
(If t is defined outside of a function as a 10x12 matrix, and you say
inside the function t(3,8)=0, it gets truncated to 3x8.)

Anyhow, if there is a scopeMode = 0 switch, I would be very happy to
hear about it and if not, I would like to suggest it.

Thank you for your help!

Ruben
</pre>
            </blockquote>
            <pre wrap="">
Hi,

this is the normal Scilab behavior :

<a class="moz-txt-link-freetext" href="http://wiki.scilab.org/howto/global_and_local_variables">http://wiki.scilab.org/howto/global_and_local_variables</a>

S.

</pre>
          </blockquote>
        </blockquote>
        <pre wrap="">


</pre>
      </blockquote>
    </blockquote>
    <br>
    <br>
    <div class="moz-signature">-- <br>
      <style>
<!--
  p
        {margin:0pt;
           color:teal;
           font-family:"Cambria Math"
        font-size:12.0pt;
        }
-->
</style>
      <p><b>Adrien Vogt-Schilb</b></p>
      <p>Research Fellow</p>
      <p><a a="" href="mailto:vogt@centre-cired.fr"
          style="text-decoration: none; color: teal;">vogt@centre-cired.fr</a></p>
      <p>Tel: (+33) 1 43 94 73 96</p>
      <p>Fax: (+33) 1 43 94 73 70</p>
      <table style="border: medium none; margin-left: 1pt; margin-top:
        4pt;" cellspacing="0">
        <tbody>
          <tr>
            <td style="padding: 0pt;">
              <p><img src="cid:part1.01050904.00060806@centre-cired.fr"
                  alt="CIRED" width="54"></p>
            </td>
            <td style="padding: 0pt 7pt;" valign="middle">
              <p style="font-size: 10pt;">45 bis, Av de la Belle
                Gabrielle</p>
              <p style="font-size: 10pt;">F-94736 Nogent-sur-Marne</p>
              <p style="font-size: 10pt;"><a
                  href="http://www.centre-cired.fr/" style="color:
                  teal;">http://www.centre-cired.fr/</a></p>
            </td>
          </tr>
        </tbody>
      </table>
      <p> </p>
    </div>
  </body>
</html>