Re: !!, what is it?
- From: DevarajA <no@xxxxxxxx>
- Date: Sun, 11 Sep 2005 15:09:04 GMT
bjk of course ha scritto:
hello,
I've stumbled upon this in some code:
n = !!x;
I've ran it and 'n' is always either 0 or 1. Is '!!' an operator (what's it called?) and is it standard/portable?
It means 'not not x', evaluating to 0 if x is 0 or to 1 if x is not 0.
-- Devaraja (Xdevaraja87^gmail^c0mX) Linux Registerd User #338167 http://counter.li.org .
- References:
- !!, what is it?
- From: bjk of course
- !!, what is it?
- Prev by Date: Re: !!, what is it?
- Next by Date: Re: (corr) !!, what is it?
- Previous by thread: Re: !!, what is it?
- Next by thread: [ANN] SMC - State Machine Compiler v. 4.2.0 for C
- Index(es):