Re: Type casting of integer to character in fortran
- From: "David Frank" <dave_frank@xxxxxxxxxxx>
- Date: Fri, 29 Apr 2005 08:38:46 -0400
<munishwar.ahuja@xxxxxx> wrote in message
news:1114764604.602378.86180@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi
>
> How to typecast an integer to fortran
>
> e.g.
>
> IMPLICIT NONE
> INTEGER :: ID
> CHARACTER*30 :: AA
> ID=2
> AA='output_'//CHAR(ID)//'.dat'
> PRINT *, AA
> END
>
> This outputs equivalent ASCII Character in place of 2.
>
> Whats the way to typecast integer to character?
> So that I get output_2.dat as an output.
>
> Munish
>
AA = 'output_'//CHAR(ID+ICHAR('0'))//'.dat'
.
- References:
- Type casting of integer to character in fortran
- From: munishwar . ahuja
- Type casting of integer to character in fortran
- Prev by Date: Re: compilation problem with module function interface definition
- Next by Date: Writing output files to memory
- Previous by thread: Re: Type casting of integer to character in fortran
- Next by thread: Writing output files to memory
- Index(es):
Relevant Pages
|
|