🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.ibm.pc.programmer
2 messages
2 total messages Started by Kok-Hsien SIEW Sat, 13 Apr 1991 07:54
help need in C
#1164
Author: Kok-Hsien SIEW
Date: Sat, 13 Apr 1991 07:54
16 lines
688 bytes
 
 On Turbo Pascal 5.5 I could write the following code:
 
  repeat
    do_calculations;
  until keypressed;
  inchar:=readkey;
  writeln('The key you pressed is ',inchar);
 
 
  But how do I do this in Turbo C and Unix C?
 
  Help needed for this stupid pascal programmer.
 
  thanks in advance.......
Re: help need in C
#1171
Author: Rick Hung
Date: Thu, 18 Apr 1991 04:11
36 lines
1103 bytes
ksiew@ecr.mu.oz.au (Kok-Hsien SIEW) writes:

> 
>  
>  On Turbo Pascal 5.5 I could write the following code:
>  
>   repeat
>     do_calculations;
>   until keypressed;
>   inchar:=readkey;
>   writeln('The key you pressed is ',inchar);
>  
>  
>   But how do I do this in Turbo C and Unix C?
>  
To do that, you would do:
 
while (!operation())
  {
    do_functions();
  }
printf("Whatever... %s\n",whatever());
 
or you could do it like:
 
do {
  do_functions();
} while (!operation());
printf("Whatever... %s\n",whatever());

/l

--
                             pain!hung@demott.com
              Public Access Information Network  (818/776-1447)
                            ++ Waffle BBS v1.64 ++
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads