[scilab-Users] What's my name?

Mike Page Mike at Page-One.Waitrose.com
Fri Mar 23 11:24:36 CET 2012


It's probably not what you're looking for, but the function
[linenum,mac]=where() returns a pair of vectors with the calling tree of the
current location.  Unfortunately it only gives the function name, not the
containing filename.  But you may be able to use it somehow...

Mike.


-----Original Message-----
From: Dean S. Messing [mailto:deanm at sharplabs.com]
Sent: 22 March 2012 21:41
To: users at lists.scilab.org
Subject: [scilab-Users] What's my name?


Is there a scilab command that will allow a script (say "foo.sci")
called by exec() to return its own file name?

In other words is there something that will cause "magic_command()" to
return a string containing "foo.sci" in the following:

=== from bah.sci (or commandline) ===
exec("foo.sci");


=== foo.sci ===
s = magic_command();
mprintf("My name is: %s\n", s);

--
To unsubscribe from this mailing-list, please send an empty mail to
users-unsubscribe at lists.scilab.org
To check the archives of this mailing list, see
http://mailinglists.scilab.org/




More information about the users mailing list