Home > Archive > Fortran > September 2004 > call sync_memory vs call sync_memory()
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
call sync_memory vs call sync_memory()
|
|
| Gene Wagenbreth 2004-09-28, 4:12 pm |
| Using CAF on a CRAY.
call sync_memory - gets undefined external
call sync_memory() - works
if a subroutine has no args, what diference does the empty set of parens
make.
| |
| Richard E Maine 2004-09-28, 4:12 pm |
| Gene Wagenbreth <genew_nospam@isi.edu> writes:
> Using CAF on a CRAY.
>
> call sync_memory - gets undefined external
>
> call sync_memory() - works
>
> if a subroutine has no args, what diference does the empty set of
> parens make.
Absolutely none. The 2 forms are 100% equivalent in the standard (at
least as of f77. I don't recall and didn't bother to check for f66,
but I doubt your compiler is an f66 one). I'd be at least somewhat
suspicious that something else is going on. Otherwise, any difference
between these 2 forms would be a compiler bug.
Note that functions are different - they require the parens.
--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain | experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
| |
| Dick Hendrickson 2004-09-28, 9:28 pm |
|
Gene Wagenbreth wrote:
> Using CAF on a CRAY.
>
> call sync_memory - gets undefined external
>
> call sync_memory() - works
>
> if a subroutine has no args, what diference does the empty set of parens
> make.
Is it possible that sync_memory is one of those swell things
that can be invoked as either a function or a subroutine?
Then, since the function requires the (), the compiler could
be . If sync_memory can be invoked either way,
then using it is probably non-standrad and all bets are off.
Dick Hendrickson
>
|
|
|
|
|