Storage of Global variables

Mike Page Mike at Page-One.Waitrose.com
Thu Jul 1 14:54:55 CEST 2010


Hi,

I have written a DLL in C that I am calling from Scilab.  Everything works
fine unless I have any Scilab global variables.  Then it looks like these
variables get corrupted by my DLL, even though I do not pass them to the DLL
function.

I have checked by using:

whos ();
MyDllFunction ();
whos ();

The first call shows my globals as type *constant.  The second shows them
all as *deleted.  This looks just like I have called clearglobal (), but
obviously I haven't done that deliberately!

To make it easier to track down the problem in my DLL, can anyone tell me
how globals are stored in Scilab, and how this is different from ordinary
variables?

Is there any way I can find out the memory address of a global in Scilab so
I can check for it being overwritten in my DLL?

Is there any single thing I might have done that would result in deleting
all the globals in one go?

Many thanks for anyone who can shed some light on this.

Regards,
Mike.




More information about the users mailing list