Fortran type conversion error in block data
I'm trying to compile a Fortran program, but am having trouble converting from int to char. I looked into the ICHAR procedure offered with the GNU compiler, but I haven't figured out how to use it since my code is within a block data section. Does anyone have an idea how to change these lines so that I don't get the error? (or is there a compiler option?)
Code:
gfortran -c -I./included_dir -Werror -Wtabs -fall-intrinsics myfortranfile.f Jameson |
The ichar function returns the ASCII code of the characters. To convert from int to char and vice versa you have to use internal file I/O, that is:
Code:
READ(STRING, '(I5)') IVAR ! converts a numeric string to integer Code:
DATA LEVEL/'+ ','/ ',' ','* ','0 ','B '/ |
All times are GMT -5. The time now is 05:24 AM. |