* what is the char ~ mean @ 2005-11-08 2:54 jywang 2005-11-08 5:42 ` Steve Graegert 2005-11-08 15:37 ` linuxdevelop linux 0 siblings, 2 replies; 3+ messages in thread From: jywang @ 2005-11-08 2:54 UTC (permalink / raw) To: linux-c-programming in linux source code, i find this line, ~tcp_v4_check(...). what is the character ~ mean. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: what is the char ~ mean 2005-11-08 2:54 what is the char ~ mean jywang @ 2005-11-08 5:42 ` Steve Graegert 2005-11-08 15:37 ` linuxdevelop linux 1 sibling, 0 replies; 3+ messages in thread From: Steve Graegert @ 2005-11-08 5:42 UTC (permalink / raw) To: jywang; +Cc: linux-c-programming On 11/8/05, jywang <jywang@cnic.cn> wrote: > in linux source code, i find this line, > ~tcp_v4_check(...). > > what is the character ~ mean. It means 'one's complement of'. Look at the example to understand its usage: int main(void) { /* 4 = 0000 0000 0000 0100 */ unsigned int value = 4; /* 4294967291 = 1111 1111 1111 1011 */ value = ~value; } In your case, this would mean: "create the one's complement of the return value of tcp_v4_check". \Steve ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: what is the char ~ mean 2005-11-08 2:54 what is the char ~ mean jywang 2005-11-08 5:42 ` Steve Graegert @ 2005-11-08 15:37 ` linuxdevelop linux 1 sibling, 0 replies; 3+ messages in thread From: linuxdevelop linux @ 2005-11-08 15:37 UTC (permalink / raw) To: jywang; +Cc: linux-c-programming It is a one's complement. So if you have ~010= 101 ./thanks ilaiy On 11/7/05, jywang <jywang@cnic.cn> wrote: > in linux source code, i find this line, > ~tcp_v4_check(...). > > what is the character ~ mean. > > > > - > To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-11-08 15:37 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-11-08 2:54 what is the char ~ mean jywang 2005-11-08 5:42 ` Steve Graegert 2005-11-08 15:37 ` linuxdevelop linux
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).