replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - ACCEPTING A CARRIAGE RETURN AS INPUT
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ACCEPTING A CARRIAGE RETURN AS INPUT

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
dangerboy1



Joined: 18 Feb 2005
Posts: 1

PostPosted: Fri Feb 18, 2005 3:57 pm    Post subject: ACCEPTING A CARRIAGE RETURN AS INPUT Reply with quote

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
Back to top
View user's profile Send private message
silverfrost
Site Admin


Joined: 29 Nov 2006
Posts: 191
Location: Manchester

PostPosted: Sat Feb 19, 2005 8:37 am    Post subject: ACCEPTING A CARRIAGE RETURN AS INPUT Reply with quote

Have you had a look at the library function:

SUBROUTINE GET_KEY@(K)
INTEGER (KIND=2) K

FTN77 ... was Salford FTN77 (I think Prime's was F77).

------------
Administrator
Silverfrost Forums
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group