Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| Path | csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail |
|---|---|
| NNTP-Posting-Date | Thu, 22 Mar 2012 20:29:05 -0500 |
| Message-ID | <4F6BDFED.504D@mindspring.com> (permalink) |
| Date | Thu, 22 Mar 2012 21:29:01 -0500 |
| From | pete <pfiland@mindspring.com> |
| Reply-To | pfiland@mindspring.com |
| Organization | PF |
| X-Mailer | Mozilla 3.04Gold (WinNT; I) |
| MIME-Version | 1.0 |
| Newsgroups | comp.lang.c |
| Subject | Re: bitwise ORing |
| References | <4f6bca1d$0$32222$bbae4d71@news.suddenlink.net> |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | 7bit |
| Lines | 35 |
| X-Usenet-Provider | http://www.giganews.com |
| NNTP-Posting-Host | 4.154.220.96 |
| X-Trace | sv3-cQIRmNP+SjAN8dCJAoiWknSohTtCROxxsbStluy3NKbHRqRf/ke1e27pO0FrlM2e9SiG10eLaAT0v98!LCKVtFAFwyjTlOKAjwlU79B0BBemPwCcVOL7IQlfwJg+OGhm5N8bB4rZY458cLVXoL8TbgS3uyTk!sketK5CLMQ== |
| X-Abuse-and-DMCA-Info | Please be sure to forward a copy of ALL headers |
| X-Abuse-and-DMCA-Info | Otherwise we will be unable to process your complaint properly |
| X-Postfilter | 1.3.40 |
| X-Original-Bytes | 1563 |
| Xref | csiph.com comp.lang.c:18949 |
Show key headers only | View raw
Bill Cunningham wrote:
>
> What would a function prototype
> look like that takes one parameter but
> several options can be OR'd together in that parameter? For example:
>
> function(LEFT|RIGHT);
>
> What would the parameter source code look like?
/* BEGIN new.c */
#include <stdio.h>
#define LEFT 0xdead0000
#define RIGHT 0x0000beef
void
function(long unsigned X)
{
printf("\n%lx\n", X);
}
int
main(void)
{
function(LEFT|RIGHT);
return 0;
}
/* END new.c */
--
pete
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
bitwise ORing "Bill Cunningham" <nospam@nspam.invalid> - 2012-03-22 20:56 -0500
Re: bitwise ORing pete <pfiland@mindspring.com> - 2012-03-22 21:29 -0500
Re: bitwise ORing Lew Pitcher <lpitcher@teksavvy.com> - 2012-03-23 11:19 -0400
Re: bitwise ORing James Kuyper <jameskuyper@verizon.net> - 2012-03-23 11:43 -0400
Re: bitwise ORing "Bill Cunningham" <nospam@nspam.invalid> - 2012-03-23 16:23 -0500
Re: bitwise ORing "Bill Cunningham" <nospam@nspam.invalid> - 2012-03-25 13:02 -0500
Re: bitwise ORing Lew Pitcher <lpitcher@teksavvy.com> - 2012-03-25 16:26 -0400
Re: bitwise ORing jgk@panix.com (Joe keane) - 2012-03-23 20:31 +0000
Re: bitwise ORing Don Y <this@isnotme.com> - 2012-03-23 13:41 -0700
Re: bitwise ORing "Joachim Schmitz" <nospam.jojo@schmitz-digital.de> - 2012-03-24 11:29 +0100
Re: bitwise ORing Geoff <geoff@invalid.invalid> - 2012-03-24 19:06 -0700
csiph-web