dangerboy1
Joined: 18 Feb 2005 Posts: 1
|
Posted: Fri Feb 18, 2005 3:57 pm Post subject: ACCEPTING A CARRIAGE RETURN AS INPUT |
|
|
HEY GUYS,
I'VE WRITTEN A FTN95 PROGRAM TO SIMULATE A PROCESS THAT REQUIRES USER
INPUT. I CURRENTLY HAVE THE USER ENTER A '0' TO PICK ONE OPTION , OR
ENTER A '1' FOR ANOTHER OPTION. ALTHOUGHT THESE ARE INTEGER TYPES IN MY
CODE, THEY COULD BE ANY TYPE.
I'D LIKE TO HAVE THE USER JUST BE ABLE TO HIT A CARRIAGE RETURN (ENTER)
TO CONTINUE RUNNING THE SIMULATION WITHOUT PICKING A FRESH OPTION.
I'VE TRIED:
CHARACTER(7):: NOTHING
READ (*,'(A)')NOTHING
AND ALSO:
CHARACTER(0):: NOTHING
READ(*,*) NOTHING
AND:
CHARACTER(0):: NOTHING
READ(*,ERR=12)
12 CONTINUE
PLUS A FEW OTHER LESS INSPIRED THINGS. THEY ALL COMPILE FINE, BUT THE
RESULT IS JUST THE SAME, THE PROGRAM JUST DOES NOTHING UNTIL THE USER
PUTS IN A REAL INPUT OF SOME SORT, FOLLWED BY A CR. I REMEMBER BEING
ABLE TO DO THIS IN FTN77 (PRIME'S COMPILER, PROBABLY BEFORE SOME OF YOU
WERE BORN...) BUT CAN'T GET IT TO WORK IN SALFORDS FTN95.
ANY HELP WOULD BE NICE. THANKS MUCH,
R.C. SANDERS
|
|