[scilab-Users] path

Ricardo Fabbri rfabbri at gmail.com
Wed Oct 12 22:12:26 CEST 2011


@Samuel:

Thanks, that aliasing through assignment is awesome!

What would one do in cases where the original function is actually a
built in which returns something and doesn't need to be called with '(
)' :

pw=pwd


This does not make pw an alias to pwd. The only way I got this to work
was through the funptr/newfun combination I mentioned:
 newfun("pw",funptr("pwd"));


@Samuel + @Serge:

I opened a feature request in scilab regarding the PATH idea:
bug #10094

It would be cool to have Serge's implementation, although I'd like
non-functions as well as this is very handy for really quick
development of ideas.

Best,
Ricardo
--
Linux registered user #175401
www.lems.brown.edu/~rfabbri



On Wed, Oct 12, 2011 at 3:30 PM, Samuel Gougeon <sgougeon at free.fr> wrote:
> Hello Ricardo,
>
> Le 12/10/2011 20:09, Ricardo Fabbri a écrit :
>>
>> Hello, all,
>>
>> I have some simple questions, I knew their answer, but I wonder if
>> things in recent scilab versions:
>>
>> - Is there anything like a search PATH setting? For instance, I would
>> like to execute myscript.sce, but without specifying its full path. I
>> would also like to load a function automatically if it is in the path,
>> more or less matlab style.
>>
>
> As far as i know, it is presently not possible. Surprisingly, no wish has
> yet been posted about such a feature!
> Yours is welcome! :-)
> http://bugzilla.scilab.org/enter_bug.cgi?product=Scilab%20software
>
>> - Aliases: is there a way to define an alias to a function? for example,
>>     alias ("doc", help)
>>
>
> doc = help
> doc isnan // opens the doc for isnan()
> // This works for primitive (like help) as well as for macros (as isnan:
> Try)
> isNAN = isnan
> isNAN(%pi)
> isNAN(%nan)
>
> HTH
> Samuel
>



More information about the users mailing list