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

Samuel Gougeon sgougeon at free.fr
Fri Jan 4 15:12:20 CET 2013


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

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


More information about the users mailing list