Re: Stopping C program after user input
From: David Schwartz (davids_at_webmaster.com)
Date: 10/13/05
- Next message: David Schwartz: "Re: Stopping C program after user input"
- Previous message: Paul Rubin: "Re: Jargons of Info Tech industry"
- In reply to: ern: "Stopping C program after user input"
- Next in thread: Martin: "Re: Stopping C program after user input"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 13 Oct 2005 14:02:58 -0700
"ern" <erniedude@gmail.com> wrote in message
news:1129232937.125808.294680@g44g2000cwa.googlegroups.com...
>I have a program that runs scripts. If the user types "script
> myScript.dat" the program will grab commands from the text file, verify
> correctness, and begin executing the script UNTIL...
>
> I need a way to stop the execution with user input. I was thinking
> something like this:
>
> while(user hasn't pressed 'any key'){
> keepExecutingScript();
>
> }
>
> How can I do the "user hasn't pressed 'any key' " of this logic?
> Running Linux Red Hat V3. (The 'C' forum sent me here.)
>
> Thanks,
Google for 'unix kbhit'. (The 'kbhit' function was the old DOS way to do
this and most people ask the question as "Where's 'kbhit' on unix?")
DS
- Next message: David Schwartz: "Re: Stopping C program after user input"
- Previous message: Paul Rubin: "Re: Jargons of Info Tech industry"
- In reply to: ern: "Stopping C program after user input"
- Next in thread: Martin: "Re: Stopping C program after user input"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|