Find the size of variables in Fortran
- From: "new_to_fortran" <kansakar@xxxxxx>
- Date: 29 Apr 2005 23:11:27 -0700
Hello All,
Is there any library function call similar to C sizeof or strlen to
find the size of the values assigned to variables in Fortran 77.
For example,
CHARACTER*20 greetings
greetings = 'Hello World'
How do I find the size of the value assigned to character string
variable greetings? By declaration, it allocates 20 bytes, but the
size(length) of the value assigned to greetings is less than 20 bytes.
I'm needing to pass on the size of the variable and the variable itself
as arguments to a C function that I'd like to use from Fortran program.
Thanks.
.
- Follow-Ups:
- Re: Find the size of variables in Fortran
- From: David Flower
- Re: Find the size of variables in Fortran
- From: Tom Micevski
- Re: Find the size of variables in Fortran
- Prev by Date: Re: uniqueness of {if,do,case}-construct-name
- Next by Date: Re: Find the size of variables in Fortran
- Previous by thread: uniqueness of {if,do,case}-construct-name
- Next by thread: Re: Find the size of variables in Fortran
- Index(es):
Relevant Pages
|