6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri May 10, 2024 8:45 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: help needed
PostPosted: Sun Sep 14, 2003 10:22 am 
Offline

Joined: Sun Sep 14, 2003 10:17 am
Posts: 1
I have been having difficulty with my code recently.
The problem is the I can't get the code to accept the users info and do nothing until they press enter. Can someone help please.
Or at least point me in the right direction.
NT


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Sep 14, 2003 7:18 pm 
Offline

Joined: Fri Jun 27, 2003 8:12 am
Posts: 618
Location: Meadowbrook
in general terms, try making an input parser. A small event loop thagt does nothing except take inpout characters and act upon them. A small text string buffer for the input usage, a variable to point to the end of the buffer. Have the conditions that gfollow:

any valid letter or punctuation character: add to buffer, bufptr+1
backspace: clear last buffer character, bufptr-1
return: end loop, string in buffer is their name.

This way, you can also filter out any wierd inputs they may try for crashing your program....

_________________
"My biggest dream in life? Building black plywood Habitrails"


Top
 Profile  
Reply with quote  
 Post subject: Re: help needed
PostPosted: Tue Sep 16, 2003 12:04 am 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
NT wrote:
I have been having difficulty with my code recently.
The problem is the I can't get the code to accept the users info and do nothing until they press enter. Can someone help please.
Or at least point me in the right direction.
NT


You do not provide enough information for anyone to really offer any assistance outside of a guess.

What platform are you coding for? What operating system, if any? Is this through an RS-232 or similar connection, or is the keyboard/mouse hooked up to the box directly?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


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 post attachments in this forum

Search for:
Jump to: