Re: variable length of integer
- From: Clive Page <junk@xxxxxxxxxxxx>
- Date: Mon, 28 Apr 2008 09:56:44 +0100
In message <05af24d9-6fdd-4529-b360-299944ea98c5@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, rudra <bnrj.rudra@xxxxxxxxx> writes
Dear friends,
in a output format specification is given like ,say "format (i5)"
which means, upto 99999 will be written and if the integer is less
then 5 digit, it will be trailed by blanck, like "**999".
Is there any way to write format specification so that it will
automatically adjust the length? so even if the integer is of 3 digit,
it will not be trailed by the blanks?
i0 - which uses a field width chosen to match the number's size
But you need to be using a Fortran-90 compiler or above to use this, such as g95 or gfortran. (That may seem a superfluous remark, but a surprising number of people posting here seem not to know that Fortran has advanced since 1977).
--
Clive Page
.
- Follow-Ups:
- Re: variable length of integer
- From: Richard Maine
- Re: variable length of integer
- References:
- variable length of integer
- From: rudra
- variable length of integer
- Prev by Date: Re: Syntax check for IMPLICIT statement
- Next by Date: Re: Parallel processing on graohics chips
- Previous by thread: Re: variable length of integer
- Next by thread: Re: variable length of integer
- Index(es):