Re: Can Fortran Use This C Variable Directly Via "external" Decl?
- From: glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx>
- Date: Wed, 28 Sep 2005 22:59:16 -0700
clusardi2k@xxxxxxx wrote:
I'm pretty sure this is impossible, but someone
> suggested it to me.
Can I do this with the f77 compiler:
/** main.C **/
int try_it;
int test_ ()
{
}
CCC test.F CCC
program main
external try_it
try_it = 100
stop
end
I am not sure what you are trying to do.
test_() doesn't ever get called. I don't know what happens when you have a variable the same name as as external statement.
It is usual for C static external variables, declared outside any
functions with or without the extern keyword and without the static
keyword, to be allocated in the same way as Fortran COMMON.
A COMMON with more than one variable should agree with a C static external struct, except for alignment issues.
-- glen
.
- Follow-Ups:
- Re: Can Fortran Use This C Variable Directly Via "external" Decl?
- From: Richard E Maine
- Re: Can Fortran Use This C Variable Directly Via "external" Decl?
- References:
- Can Fortran Use This C Variable Directly Via "external" Decl?
- From: clusardi2k
- Can Fortran Use This C Variable Directly Via "external" Decl?
- Prev by Date: Re: DAY Number in an Year
- Next by Date: Re: Does this string processing work for you?
- Previous by thread: Re: Can Fortran Use This C Variable Directly Via "external" Decl?
- Next by thread: Re: Can Fortran Use This C Variable Directly Via "external" Decl?
- Index(es):
Relevant Pages
|
|