Scilab handles errors by putting up a dialog box. It's annoying and I
want it to stop.
The "string" command is supposed to output the text of a function. It
doesn't. I'd like to fix that if possible.
Anyone know if it's possible to gain access to standard scilab
functions? I imagine many of them would be written in C which is just
fine, as long as I could see/modify them. Thanks
those not written in scilab code are written in C or fortran, and
found somewhere in the sources. You can do what you want with them,
provided that you find them and that you comply with the licence
(which essentially, IIRC, just says that you're not authorized to
redistribute modified code for commercial purposes).
> However, I've encountered
> a number of functions which either do not work, or don't work the way
> I want them to. Examples:
>
> Scilab handles errors by putting up a dialog box. It's annoying and I
> want it to stop.
I can't recall of any. Which one?
> The "string" command is supposed to output the text of a function. It
> doesn't. I'd like to fix that if possible.
perhaps http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1370
?
> Anyone know if it's possible to gain access to standard scilab
> functions? I imagine many of them would be written in C which is just
> fine, as long as I could see/modify them.
search the codebase, or better ask specifically, somebody might know
and could help you
through the mess.
hth, Enrico
Hi
In Scilab we have two kinds of functions. The first one e.g. sinh is
of type 'function' , you will see it by calling typeof(sinh).
The source of this functions you can get with the help of the editor
SciPad. (File, Open source of ...). Then you can edit and rename such
functions.
(You never should use the name of a Scilab function for your own one.)
The second kind e.g. exp is of type 'fptr', you will see it by calling
typeof(exp). Such functions are sometimes called 'hard coded', but I
can't find any explanation
of the meaning of 'fptr'. (In fortran 90 as I remember there are
function pointers = fptr ?). The source code of such functions are
hidden for the normal user.
(Also in this case you may also call a own function exp, but please
never do that.)
Rainer
> I can't recall of any. Which one?
Any error you can think of. Incorrect argument type, invalid index,
etc. I'm using the windows version, maybe the unix version doesn't do
that. Using advice from Rainer, I have discovered that the "error"
function is of type "fptr", meaning the source isn't easily found.
This function makes a dialog box automatically.
>> The "string" command is supposed to output the text of a function. It
>> doesn't. I'd like to fix that if possible.
>perhaps http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1370
>?
That link explains the existence of the problem, but doesn't provide
for a solution unless one can edit the "string" function, which seems
like it isn't possible unless one goes back to the source code. I
guess that's what I'll do.
The next obvious question is if I've written something in Fortran/C/C+
+, is there an easy way to include it into the scilab library?
Thanks
I have never seen dialog boxes like that, except for scilab scripts
loaded via scipad.
I'm using scilab since version 3.1 under Windows XP.
Matthias
You're right, they only happen when running scilab scripts loaded via
scipad. However, that's how I do all of my work. Is there a way to
get rid of them?
Not without tampering with the Scipad source code.
But if changing Scipad's source doesn't frighten you, here's one way of
doing it in the Scipad version that comes with Scilab 4.1 (or 4.1.1),
that is Scipad 6.0.fix2:
- Locate proc scilaberror starting line 238 of
SCI/scipadsources/db_debugsession.tcl
- In this proc, suppress or comment the line that starts by
tk_messageBox -title...
- Save the file (overwrite) and start Scilab again. No compiler needed.
Note that you'll then never see an error message box again, not when
runnning your scripts from Scipad, nor when using the Scipad debugger.
If this is not what you want, just tell.
--
Francois Vogel
1-888-MY-ETHER ext. 01907199
<http://www.ether.com/CallButton/Francois-Vogel/6887475.aspx>
<http://www.ether.com>
It's not exactly what I want, but it's definitely good enough.
Ideally I could do something with the set command in Scilab so I could
easily control whether or not
the dialog box was created, but this is fine. Thanks.
In the bleeding edge Scipad I have now implemented a new saved
preference setting that can be toggled on and off from the options menu
of Scipad. You have now control on the popping up of the message box
from Scipad.
This is available in Scipad from version 6.127.
Wonderful, I'll keep an eye out for it (I run windows, the latest
version I can find for it is 6.98). Thanks.
Jacob
6.129 is out here:
http://www.scilab.org/contrib/displayContribution.php?fileID=1032
enjoy (hopefully), Enrico