Reading external variables from a library BIND
  Home FAQ Contact Sign in
 
Advanced search
MATCHING GROUPS



more...
POPULAR GROUPS

more...

found 25 articles for 0.069 sec
Re: Reading external variables from a library (BIND)     

Group: comp.lang.fortran · Group Profile · Search for Reading external variables from a library BIND in comp.lang.fortran
Author: nospam
Date: Sep 16, 2008 09:04

....edu> wrote: Raúl wrote: integer(c_int), bind(c,name='errno') :: errno It is probably best to call a C routine that returns errno. I believe that it is commonly an ordinary external variable, but there are other possibilities. As an aside (since I think the problem and ... much of anything to do with being in a library as the OP thought. Instead, it is specific to...
Show full article (0.70Kb) · Show article thread
Re: Reading external variables from a library (BIND)     

Group: comp.lang.fortran · Group Profile · Search for Reading external variables from a library BIND in comp.lang.fortran
Author: Steven G. Kargl
Date: Sep 16, 2008 07:07

....edu> writes: Raúl wrote: integer(c_int), bind(c,name='errno') :: errno It is probably best to ... a C routine that returns errno. I believe that it is commonly an ordinary external variable, but there are other possibilities. From FreeBSD /usr/include/errno.h, #ifndef ... errno is not required to be an int variable. It is required to be a modifable lvalue....
Show full article (0.63Kb) · Show article thread
Re: Reading external variables from a library (BIND)     

Group: comp.lang.fortran · Group Profile · Search for Reading external variables from a library BIND in comp.lang.fortran
Author: glen herrmannsfeldt
Date: Sep 16, 2008 03:06

Raúl wrote: integer(c_int), bind(c,name='errno') :: errno It is probably best to call a C routine that returns errno. I believe that it is commonly an ordinary external variable, but there are other possibilities. -- glen
Show full article (0.24Kb) · Show article thread
Re: Reading external variables from a library (BIND)     

Group: comp.lang.fortran · Group Profile · Search for Reading external variables from a library BIND in comp.lang.fortran
Author: Arjen Markus
Date: Sep 16, 2008 02:31

... to read an external variable which is declared in an external library, in... status in the well known errno variable of libc. Checking Fortran forums I ... module test   use iso_c_binding   integer(c_int), bind(c,name='errno') :: errno   ...   ... end module ... It may be that this particular variable is not visible (exported) outside the library. I am not sure of that...
Show full article (1.37Kb) · Show article thread
Reading external variables from a library (BIND)     

Group: comp.lang.fortran · Group Profile · Search for Reading external variables from a library BIND in comp.lang.fortran
Author: Raúl
Date: Sep 16, 2008 02:08

...to read an external variable which is declared in an external library, ... in the well known errno variable of libc. Checking Fortran forums I...such thing I have to use bind modifier in my declaration of the variable. The code is as follows ... test use iso_c_binding integer(c_int), bind(c,name='errno') :: errno ... ... end ... be because is a dynamic library and not a static one....
Show full article (0.77Kb)
Re: Reading external variables from a library (BIND)     

Group: comp.lang.fortran · Group Profile · Search for Reading external variables from a library BIND in comp.lang.fortran
Author: nospam
Date: Sep 17, 2008 09:38

... PL/I functions without arguments also did not have the (). Later they were added because of the complications due to adding new functions to the language. (Conflicting with variable names in older programs.) It always seemed right for random number generators, which I suppose are pretty unmathematical as functions. Random number generators are already the one case where...
Show full article (1.40Kb) · Show article thread
Re: Reading external variables from a library (BIND)     

Group: comp.lang.fortran · Group Profile · Search for Reading external variables from a library BIND in comp.lang.fortran
Author: Gary Scott
Date: Sep 17, 2008 05:40

...> And furthermore, a function without arguments is so, well, unmathematical :). or "win32ish" Regards, Arjen -- Gary Scott mailto:garylscott@sbcglobal dot net Fortran Library: http://www.fortranlib.com Support the Original G95 Project: http://www.g95.org -OR- Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html If you want to do ...
Show full article (1.32Kb) · Show article thread
Re: Reading external variables from a library (BIND)     

Group: comp.lang.fortran · Group Profile · Search for Reading external variables from a library BIND in comp.lang.fortran
Author: Raúl
Date: Sep 17, 2008 02:39

... do this in C. In fortran at least according to MR&C volatile can only be applied to variables Ian Thanks to everybody for your suggestions. I suppose that is not a problem of external library. It should be a problem of using a bad symbol name. I tried your two solution and they work fine. But finally I ...
Show full article (1.34Kb) · Show article thread
Re: Reading external variables from a library (BIND)     

Group: comp.lang.fortran · Group Profile · Search for Reading external variables from a library BIND in comp.lang.fortran
Author: glen herrmannsfeldt
Date: Sep 17, 2008 02:36

... is so, well, unmathematical :). In the original PL/I functions without arguments also did not have the (). Later they were added because of the complications due to adding new functions to the language. (Conflicting with variable names in older programs.) It always seemed right for random number generators, which I suppose are pretty unmathematical as functions. -- glen
Show full article (0.46Kb) · Show article thread
Re: Reading external variables from a library (BIND)     

Group: comp.lang.fortran · Group Profile · Search for Reading external variables from a library BIND in comp.lang.fortran
Author: glen herrmannsfeldt
Date: Sep 17, 2008 02:30

.... Maybe volatile int get_errno() { return errno; ? No idea if you can do this in C. In fortran at least according to MR&C volatile can only be applied to variables As far as I know, C never optimizes away such calls. Note that C only has functions, no subroutines. There are no ELEMENTAL or PURE functions in C. One of the more common argumentless functions (...
Show full article (0.64Kb) · Show article thread
1 · 2 · 3 · next