Hi, I have the following code:
READ(5,*) StartNumberInput
IF(StartNumberInput == 'X' .OR. StartNumberInput == 'x') THEN
RootNumber = 4
ELSE
READ(StartNumberInput,*) Initialx0(2)
x0 = Initialx0(2)
END IF
(StartNumberInput is a character/string, Initialx0 and x0 are Real Numbers)
When I break after the first line, it seems that when I've typed in a negative number such as "-1", StartNumberInput just becomes "-". This in turn makes x0 "-0.00" which is not what I entered.
I have very limited Fortran experience, could anyone help please?
READ(5,*) StartNumberInput
IF(StartNumberInput == 'X' .OR. StartNumberInput == 'x') THEN
RootNumber = 4
ELSE
READ(StartNumberInput,*) Initialx0(2)
x0 = Initialx0(2)
END IF
(StartNumberInput is a character/string, Initialx0 and x0 are Real Numbers)
When I break after the first line, it seems that when I've typed in a negative number such as "-1", StartNumberInput just becomes "-". This in turn makes x0 "-0.00" which is not what I entered.
I have very limited Fortran experience, could anyone help please?