这是什么意思??? [英] What does this mean???

查看:66
本文介绍了这是什么意思???的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网上有一个小程序...但是我看到了不同的初始化

...


如下:


for(i =〜0; i; i>> = 1);


右移是好的..但是什么是meaned通过 i = ~0" ...

I got a small programm on net...but there was different initialisation
that I saw...

It was as follows:

for ( i = ~0 ; i ; i>>=1);

right shift is ok..But what is meaned by " i = ~0 "...

推荐答案

Shraddha写道:
Shraddha wrote:

我在网上有一个小程序......但是我看到了不同的初始化

...


如下:


for(i =〜0; i; i>> = 1);


右移是好的..但是什么是meaned通过 i = ~0" ...
I got a small programm on net...but there was different initialisation
that I saw...

It was as follows:

for ( i = ~0 ; i ; i>>=1);

right shift is ok..But what is meaned by " i = ~0 "...



与i = -1;相同我想。


-

Joe Wright

所有东西都应尽可能简单,但并不简单。

---阿尔伯特爱因斯坦---

Same as "i = -1;" I suppose.

--
Joe Wright
"Everything should be made as simple as possible, but not simpler."
--- Albert Einstein ---


" Shraddha"写道:
"Shraddha" writes:

>我在网上有一个小程序...但是我看到了不同的初始化

...... br />

如下:


for(i =〜0; i; i>> = 1);


右移是好的..但是什么是 i = ~0" ...
>I got a small programm on net...but there was different initialisation
that I saw...

It was as follows:

for ( i = ~0 ; i ; i>>=1);

right shift is ok..But what is meaned by " i = ~0 "...



Tilde是一个补码运算符。我不认为这是一个防弹代码,结果可能与一个人的补充价格不同,而不是两个补码。机。结果是

负零在一个人的补充机器上。

Tilde is the one''s complement operator. I would not think of that as
bulletproof code, the results might well be different on a one''s complement
machine than they are on a two''s complement machine. The result is
"negative zero" on a one''s complement machine.


2007年6月18日星期一20:28:36 -0400,Joe Wright

< jo********@comcast.netwrote:
On Mon, 18 Jun 2007 20:28:36 -0400, Joe Wright
<jo********@comcast.netwrote:

> Shraddha写道:
>Shraddha wrote:

>我在网上有一个小程序...但是我看到了不同的初始化

它如下:

(i =〜0; i; i>> = 1);

右移是正确的。但是什么是 i = ~0" ...
>I got a small programm on net...but there was different initialisation
that I saw...

It was as follows:

for ( i = ~0 ; i ; i>>=1);

right shift is ok..But what is meaned by " i = ~0 "...


与i = -1;相同我想。

Same as "i = -1;" I suppose.



不在1'的补码或签名的机器上。

删除电子邮件的del

Not on a 1''s complement or a signed magnitude machine.
Remove del for email


这篇关于这是什么意思???的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆