[scilab-Users] Variables scope in functions

Ruben Bibas ruben.bibas at gmail.com
Fri Mar 25 12:20:10 CET 2011


Ok, thanks for the answer.
Ruben

On Fri, Mar 25, 2011 at 11:30 AM, Sylvestre Ledru
<sylvestre.ledru at scilab.org> wrote:
> 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 :
>> 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 <stephane.mottelet at utc.fr>:
>> > Le 25/03/2011 08:59, Ruben Bibas a écrit :
>> >>
>> >> 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
>> >
>> > Hi,
>> >
>> > this is the normal Scilab behavior :
>> >
>> > http://wiki.scilab.org/howto/global_and_local_variables
>> >
>> > S.
>> >
>
>
>



More information about the users mailing list