home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!portal!dfuller
- From: dfuller@portal.hq.videocart.com (Dave Fuller)
- Subject: last of TRUE & FALSE
- Message-ID: <BxL7oF.DJE@portal.hq.videocart.com>
- Organization: VideOcart Inc.
- X-Newsreader: Tin 1.1 PL3
- Date: Thu, 12 Nov 1992 05:09:51 GMT
- Lines: 20
-
- This will be the end of my mail on TRUE & FALSE -> C_SUCCESS & C_FAILURE
-
- I noted that i didn't use them for logical tests that c handled on its own.
- what i would use it for though is a routine that was getting a defined
- valid key constantly (say get_key() tested for presses of A,C,D,E or T)
- and i wanted to continue fetching until the user hit a key that didn't
- fall into the group I would do.
-
- while (get_key() == C_SUCCESS)
- {
- total_key_presses ++;
- }
- printf("Hit A,C,D,E, or T %d times\n", total_key_presses);
-
- in this manner all of my functions dont use a hardcoded value to test
- against.
-
- Dave Fuller
- dfuller@portal.hq.videocart.com
-
-