scilab: display loading errors in examples

This commit is contained in:
Simon Marchetto 2014-09-11 08:56:04 +02:00
commit 2bcd768909
14 changed files with 71 additions and 14 deletions

View file

@ -1,6 +1,10 @@
lines(0);
ilib_verbose(0);
exec loader.sce;
ierr = exec('loader.sce', 'errcatch');
if ierr <> 0 then
disp(lasterror());
exit(ierr);
end
// ----- Object creation -----

View file

@ -1,6 +1,10 @@
lines(0);
ilib_verbose(0);
exec loader.sce;
ierr = exec('loader.sce', 'errcatch');
if ierr <> 0 then
disp(lasterror());
exit(ierr);
end
example_Init();
printf("\nTest constants\n");

View file

@ -1,6 +1,11 @@
lines(0);
ilib_verbose(0);
exec loader.sce;
ierr = exec('loader.sce', 'errcatch');
if ierr <> 0 then
disp(lasterror());
exit(ierr);
end
// Call our gcd() function
x = 42;

View file

@ -1,6 +1,10 @@
lines(0);
ilib_verbose(0);
exec loader.sce;
ierr = exec('loader.sce', 'errcatch');
if ierr <> 0 then
disp(lasterror());
exit(ierr);
end
example_Init();
printf("\nTest enums\n");

View file

@ -1,6 +1,10 @@
lines(0);
ilib_verbose(0);
exec loader.sce;
ierr = exec('loader.sce', 'errcatch');
if ierr <> 0 then
disp(lasterror());
exit(ierr);
end
a = 37
b = 42

View file

@ -1,6 +1,10 @@
lines(0);
ilib_verbose(0);
exec loader.sce;
ierr = exec('loader.sce', 'errcatch');
if ierr <> 0 then
disp(lasterror());
exit(ierr);
end
// create a new matrix
x = new_matrix();

View file

@ -1,6 +1,10 @@
lines(0);
ilib_verbose(0);
exec loader.sce;
ierr = exec('loader.sce', 'errcatch');
if ierr <> 0 then
disp(lasterror());
exit(ierr);
end
// Test lib double matrix functions
disp("Call lib function getDoubleMatrix()");

View file

@ -1,6 +1,10 @@
lines(0);
ilib_verbose(0);
exec loader.sce;
ierr = exec('loader.sce', 'errcatch');
if ierr <> 0 then
disp(lasterror());
exit(ierr);
end
// First create some objects using the pointer library.
printf("Testing the pointer library\n")

View file

@ -1,6 +1,10 @@
lines(0);
ilib_verbose(0);
exec loader.sce;
ierr = exec('loader.sce', 'errcatch');
if ierr <> 0 then
disp(lasterror());
exit(ierr);
end
// Call our gcd() function

View file

@ -1,6 +1,10 @@
lines(0);
ilib_verbose(0);
exec loader.sce;
ierr = exec('loader.sce', 'errcatch');
if ierr <> 0 then
disp(lasterror());
exit(ierr);
end
example_Init();
// This example shows how to use C++ fonctions with STL lists arguments

View file

@ -1,6 +1,10 @@
lines(0);
ilib_verbose(0);
exec loader.sce;
ierr = exec('loader.sce', 'errcatch');
if ierr <> 0 then
disp(lasterror());
exit(ierr);
end
example_Init();

View file

@ -1,6 +1,10 @@
lines(0);
ilib_verbose(0);
exec loader.sce;
ierr = exec('loader.sce', 'errcatch');
if ierr <> 0 then
disp(lasterror());
exit(ierr);
end
// Test use of a struct (Bar)

View file

@ -1,6 +1,10 @@
lines(0);
ilib_verbose(0);
exec loader.sce;
ierr = exec('loader.sce', 'errcatch');
if ierr <> 0 then
disp(lasterror());
exit(ierr);
end
example_Init();
// Call some templated functions

View file

@ -1,6 +1,10 @@
lines(0);
ilib_verbose(0);
exec loader.sce;
ierr = exec('loader.sce', 'errcatch');
if ierr <> 0 then
disp(lasterror());
exit(ierr);
end
// Try to set the values of some global variables
ivar_set(42);