MBFerguson
Programmer
I have the following 8-byte integer defined as follows:
integer*8 :: strINT = 0
And an allocatable string defined using
character), allocatable :: str
str = "9876543210"
I'm trying to set the strINT variable using the read function
read(str,*) strINT
However, this gives the following error
Fortran runtime error: Bad integer for item 1 in list input
The read function seems like it does not work with my 8-byte integer. How can I get the strINT variable to be set with the value represented by str?
integer*8 :: strINT = 0
And an allocatable string defined using
character), allocatable :: str
str = "9876543210"
I'm trying to set the strINT variable using the read function
read(str,*) strINT
However, this gives the following error
Fortran runtime error: Bad integer for item 1 in list input
The read function seems like it does not work with my 8-byte integer. How can I get the strINT variable to be set with the value represented by str?