On Fri, 5 Dec 2008, Stephen Montgomery-Smith wrote:
Nate Eldredge wrote:
int bangbang(int x) { return !!x; }
int ternary(int x) { return x ? 1 : 0; }
Stylewise, I prefer
int notzero(int x) { return x!=0; }
icc -O0 compiles notzero the same as bangbang (better than ternary). tcc
produces
Nate Eldredge wrote:
int bangbang(int x) { return !!x; }
int ternary(int x) { return x ? 1 : 0; }
Stylewise, I prefer
int notzero(int x) { return x!=0; }
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-
On Fri, 5 Dec 2008, Garrett Cooper wrote:
On Fri, Dec 5, 2008 at 1:11 AM, Christoph Mallon
<[EMAIL PROTECTED]> wrote:
Garrett Cooper schrieb:
(I feel like I'm getting off on a bikeshed topic, but...)
1. What dialect of C was it defined in? Is it still used in the
standard dialect (honestly,
Garret,
Fri, Dec 05, 2008 at 12:50:38AM -0800, Garrett Cooper wrote:
> 1. What dialect of C was it defined in? Is it still used in the
> standard dialect (honestly, this is the first time I've ever seen it
> before, but then again I am a younger generation user)?
It is the standard negation opera
on 05/12/2008 10:50 Garrett Cooper said the following:
> On Fri, Dec 5, 2008 at 12:44 AM, Erik Trulsson <[EMAIL PROTECTED]> wrote:
>> On Fri, Dec 05, 2008 at 12:35:31AM -0800, Garrett Cooper wrote:
>>> On Thu, Dec 4, 2008 at 11:22 PM, Ed Schouten <[EMAIL PROTECTED]> wrote:
* Maksim Yevmenkin <
Christoph Mallon <[EMAIL PROTECTED]> writes:
> Don't try to argue about style(9). IMO it's horribly outdated, but
> there are conservative forces, which would prefer to cling to K&R. At
> least we got function prototypes!
If there's something specific in style(9) you don't like, you are
welcome to
"Garrett Cooper" <[EMAIL PROTECTED]> writes:
> If you really want to split hairs, ! only negates the logic value,
> whereas ~ actually negates the bits. So technically, you're not
> flipping 0 to make 1 and vice versa, but instead flipping 0 to make
> non-zero, etc. There is a clear distinction in
Garrett Cooper schrieb:
On Fri, Dec 5, 2008 at 1:11 AM, Christoph Mallon
<[EMAIL PROTECTED]> wrote:
Garrett Cooper schrieb:
(I feel like I'm getting off on a bikeshed topic, but...)
1. What dialect of C was it defined in? Is it still used in the
standard dialect (honestly, this is the first ti
On Fri, Dec 5, 2008 at 1:11 AM, Christoph Mallon
<[EMAIL PROTECTED]> wrote:
> Garrett Cooper schrieb:
>>
>> (I feel like I'm getting off on a bikeshed topic, but...)
>>
>> 1. What dialect of C was it defined in? Is it still used in the
>> standard dialect (honestly, this is the first time I've ever
On Fri, Dec 05, 2008 at 12:50:38AM -0800, Garrett Cooper wrote:
> On Fri, Dec 5, 2008 at 12:44 AM, Erik Trulsson <[EMAIL PROTECTED]> wrote:
> > On Fri, Dec 05, 2008 at 12:35:31AM -0800, Garrett Cooper wrote:
> >> On Thu, Dec 4, 2008 at 11:22 PM, Ed Schouten <[EMAIL PROTECTED]> wrote:
> >> > * Maksi
Garrett Cooper schrieb:
(I feel like I'm getting off on a bikeshed topic, but...)
1. What dialect of C was it defined in? Is it still used in the
standard dialect (honestly, this is the first time I've ever seen it
before, but then again I am a younger generation user)?
Dialect? The ! operator
On Fri, Dec 5, 2008 at 12:44 AM, Erik Trulsson <[EMAIL PROTECTED]> wrote:
> On Fri, Dec 05, 2008 at 12:35:31AM -0800, Garrett Cooper wrote:
>> On Thu, Dec 4, 2008 at 11:22 PM, Ed Schouten <[EMAIL PROTECTED]> wrote:
>> > * Maksim Yevmenkin <[EMAIL PROTECTED]> wrote:
>> >> the idea was to ensure that
On Fri, Dec 05, 2008 at 12:35:31AM -0800, Garrett Cooper wrote:
> On Thu, Dec 4, 2008 at 11:22 PM, Ed Schouten <[EMAIL PROTECTED]> wrote:
> > * Maksim Yevmenkin <[EMAIL PROTECTED]> wrote:
> >> the idea was to ensure that kbd->kb_locked variable only takes values
> >> 0 (zero) and 1 (one).
> >
> > I
13 matches
Mail list logo