i am writing a fortran code,which displays current value of variable.If user wants to retain the current then he simply press enter,else he will enter new string.
my question is,while reading a new string,I want to display >< and cursor should come in between these characters,so that if he enters even space, it would be visible to him
EG:
WRITE(*,*)'Current value is 'curVal
in next line statement to read new character.
As i am new to fortran,I think in read statement we can enter only variales,not formatting.
EG:
READ(*,*)curVal
but not Read(,)’>’,curval,'<‘
i want to display like second statemnt.Could you tell me how to deal with read in this case??
I think that this is a level of terminal IO control not provided / guaranteed by the Fortran language. You can do something like the following to provide convenient input that can retain the current value by simply hitting the Return/Enter key: