Re: Find the size of variables in Fortran
- From: Tom Micevski <none@xxxxxxx>
- Date: Sat, 30 Apr 2005 16:21:04 +1000
new_to_fortran wrote:
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.
len(greetings) = 20 len_trim(greetings) = 11
but these might be f90 features? .
- Follow-Ups:
- Re: Find the size of variables in Fortran
- From: beliavsky
- Re: Find the size of variables in Fortran
- References:
- Find the size of variables in Fortran
- From: new_to_fortran
- Find the size of variables in Fortran
- Prev by Date: Find the size of variables in Fortran
- Next by Date: Re: uniqueness of {if,do,case}-construct-name
- Previous by thread: Find the size of variables in Fortran
- Next by thread: Re: Find the size of variables in Fortran
- Index(es):
Relevant Pages
|
|