[Scilab-users] return current line in the current file

Adrien Vogt-Schilb vogt at centre-cired.fr
Fri Jan 4 16:31:46 CET 2013


On 04/01/2013 15:12, Samuel Gougeon wrote:
> Hello Adrien,
>
> Le 04/01/2013 14:16, Adrien Vogt-Schilb a écrit :
>>
>>
>> i'd like to call a function inside myscript.sce which would return 
>> the line in the file myscript.sce where the function is called.
>> Does that exist?
> Yes, you might use where() inside the function which calls must be 
> located:
>
> // script testy_foo.sce
>
> function  Ln  =foo()
>      b  =  2
>      [Ln,F]  =  where()
>      Ln  =  Ln($)
> endfunction
>
> a  =  1;
> disp(foo())
>
> Best wishes for 2013!
> Samuel

Thank you Samuel, that is what I was looking for
Happy new year



>
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20130104/ea8a14be/attachment.htm>


More information about the users mailing list