Article View: comp.sys.ibm.pc.programmer
Article #1171Re: help need in C
From: Rick Hung
Date: Thu, 18 Apr 1991 04:11
Date: Thu, 18 Apr 1991 04:11
36 lines
1103 bytes
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 ++
Technical Details
Message-ID:
<q6Zk14w164w@pain.demott.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!srhqla!demott!pain.UUCP!hungReferences:
<7339@munnari.oz.au>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!srhqla!demott!pain.UUCP!hung From: hung@pain.UUCP (Rick Hung) Newsgroups: comp.sys.ibm.pc.programmer Subject: Re: help need in C Message-ID: <q6Zk14w164w@pain.demott.com> Date: 18 Apr 91 04:11:25 GMT References: <7339@munnari.oz.au> Organization: Public Access Info Network (818/776-1447) Lines: 36