[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: question: DLD write and debug

From: Paul Kienzle
Subject: Re: question: DLD write and debug
Date: Sat, 17 Apr 2004 00:02:51 -0400

On Apr 16, 2004, at 2:35 PM, Eric Chassande-Mottin wrote:

2) what happens if I declare C++ (not Octave) global variables in a DLD?

i.e., if I declare a variable _before_ starting any function, like:

static double x=0.0;

DEFUN_DLD (foo, args, ,

can I realibly use x in all functions declared in the file?


or should I avoid that? (if yes, why?)

Yes.  It makes it more difficult for functions to be reentrant,
and it will make multithreading even harder to do.

I ran into reentrancy problems today with fsolve, but I
don't see multithreading being an issue for the foreseeable

does that interfere with Octave's workspace ?

No, but you can add symbols to octave's workspace if you
need to.

Paul Kienzle

Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]