- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good Afternoon all,
I have an old FORTRAN program which compiled just fine, but it does not make sense to me. Hope somebody out there can explain it to me. Thanks in advance.
The program declares three variables as
real*8 L, Bo, B0
and later there is the following line of code:
Bo = B0( L)
I am expecting a compiler error message, because B0 is not an array. But it compiled just fine. Can anyone explain to me how Intel compiler interpret the code? Thanks.
Tom Lin
I have an old FORTRAN program which compiled just fine, but it does not make sense to me. Hope somebody out there can explain it to me. Thanks in advance.
The program declares three variables as
real*8 L, Bo, B0
and later there is the following line of code:
Bo = B0( L)
I am expecting a compiler error message, because B0 is not an array. But it compiled just fine. Can anyone explain to me how Intel compiler interpret the code? Thanks.
Tom Lin
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The meaning and effect of parentheses vary significantly with context.
In the code fragment that you showed, B0(L) is taken as a reference to a function of type REAL*8 with integer argument L.
If there is no such function provided elsewhere, you will get a linker error.
In the code fragment that you showed, B0(L) is taken as a reference to a function of type REAL*8 with integer argument L.
If there is no such function provided elsewhere, you will get a linker error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. That's my fault. Idofinea small function called B0 insde the program.
Tom Lin
Tom Lin

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page