help-octave
[Top][All Lists]
Advanced

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

Re: loadlibrary... again


From: marcimatz
Subject: Re: loadlibrary... again
Date: Thu, 21 Nov 2013 08:44:31 -0800 (PST)

Thank you for your reply Michael,

Maybe my question was formulated in a too complicated way:

Between individual calls to a shared library function, will variables and
reserved resources be maintained?

If one of my shared library API function is: 

xxx_incrementAndPrint()
{ // this is a C function inside of my shared library
    static int variable1=0;
    variable1++;
    printf("variable1=%i\n",variable1);
}

and I call that function via an oct file, within Octave:

oct_incrementAndPrint()
oct_incrementAndPrint() 
oct_incrementAndPrint()

will the result be:

variable1=1
variable1=1
variable1=1

or

variable1=1
variable1=2
variable1=3

?



--
View this message in context: 
http://octave.1599824.n4.nabble.com/loadlibrary-again-tp4659377p4659381.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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