MigrantFirmWorker
Programmer
I wish to query the user for input, but use a default value if the user enters a carriage return without text. Unfortunately the program will not proceed until the user enters text.
write(6,'(a,$)') 'Enter file (default: dummy.inp): '
read(5,*) inputFile
if(trim(inputFile) == '') inputFile='dummy.inp'
Is there a way to work around this limitation?
write(6,'(a,$)') 'Enter file (default: dummy.inp): '
read(5,*) inputFile
if(trim(inputFile) == '') inputFile='dummy.inp'
Is there a way to work around this limitation?