C99 stdint.h [英] C99 stdint.h
问题描述
这里是Dinkumware图书馆参考的摘录:
__________
| uint8_t,uint16_t,uint32_t,uint64_t
|
|每种类型都指定一个无符号整数类型
|其代表正好是8,16,32,
|或者64位。
__________
如果我们有一个36位系统如下,怎么可能呢?
字符:9位
短:18位
int:36位
长:36-位
-
Frederick Gotham
Frederick Gotham说:
这里是Dinkumware图书馆参考的摘录:
__________
| uint8_t,uint16_t,uint32_t,uint64_t
|
|每种类型都指定一个无符号整数类型
|其代表正好是8,16,32,
|或者64位。
__________
如果我们有一个36位系统,如
$ b $,怎么可能呢? b跟随?
字符:9位
短:18位
int:36位
长:36位
嗯,显然不可能。即使它可以,重要吗?
-
Richard Heathfield
Usenet是一个奇怪的地方 - dmr 29/7/1999
http://www.cpax.org.uk
电子邮件:rjh在上面的域名(但显然放弃了www)
Richard Heathfield发布:
< blockquote class =post_quotes>
Frederick Gotham说:
>这里是Dinkumware图书馆参考的摘录:
__________
| uint8_t,uint16_t,uint32_t,uint64_t
|
|每种类型都指定一个无符号整数类型
|其代表正好是8,16,32,
|或者64位。
__________
如果我们有一个36位系统,如
以下怎么可能呢?
char :9位
短:18位
int:36位
长:36位
嗯,它显然不可能。即使可能,重要吗?
我会理解如果它是:
如果可能,类型为uint8_t,uint16_t,uint32_t,uint64_t
表示无符号整数类型,其表示形式正好...
但它并没有说在可能的情况下。 - 它明确表示这些类型
可用...?
-
Frederick Gotham
Frederick Gotham写道:
| uint8_t,uint16_t,uint32_t,uint64_t
[...]
如果可能的话我们有一个36位系统,如
跟随?
char:9-bit
短:18位
int:36-bit
long:36-bit
IIRC,条款说明那些typedef存在_if_系统上有适合类型的
。在9位字节的情况下,它们只是
不会在那里。
你会得到的是int_least8_t等,但我认为。
Uli
Here''s an excerpt from the Dinkumware library reference:
__________
| uint8_t, uint16_t, uint32_t, uint64_t
|
| The types each specify an unsigned integer type
| whose representation has exactly eight, 16, 32,
| or 64 bits, respectively.
__________
How could that be possible if we had a 36-Bit system such as the following?
char: 9-Bit
short: 18-Bit
int: 36-Bit
long: 36-Bit
--
Frederick Gotham
Frederick Gotham said:
Here''s an excerpt from the Dinkumware library reference:
__________
| uint8_t, uint16_t, uint32_t, uint64_t
|
| The types each specify an unsigned integer type
| whose representation has exactly eight, 16, 32,
| or 64 bits, respectively.
__________
How could that be possible if we had a 36-Bit system such as the
following?
char: 9-Bit
short: 18-Bit
int: 36-Bit
long: 36-BitWell, it couldn''t, obviously. And even if it could, would it matter?
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Richard Heathfield posted:
Frederick Gotham said:
>Here''s an excerpt from the Dinkumware library reference:
__________
| uint8_t, uint16_t, uint32_t, uint64_t
|
| The types each specify an unsigned integer type
| whose representation has exactly eight, 16, 32,
| or 64 bits, respectively.
__________
How could that be possible if we had a 36-Bit system such as the
following?
char: 9-Bit
short: 18-Bit
int: 36-Bit
long: 36-Bit
Well, it couldn''t, obviously. And even if it could, would it matter?
I would understand if it read:
Where possible, the types "uint8_t, uint16_t, uint32_t, uint64_t"
denote an unsigned integer type whose representation has exactly...
But it doesn''t say "where possible" -- it plainly states that these types
are available... ?
--
Frederick Gotham
Frederick Gotham wrote:| uint8_t, uint16_t, uint32_t, uint64_t[...]
How could that be possible if we had a 36-Bit system such as the
following?
char: 9-Bit
short: 18-Bit
int: 36-Bit
long: 36-BitIIRC, the terms state that those typedefs are present _if_ there are
suitable types on the system. In the case of a 9 bit byte, they just
wouldn''t be there.
What you would get would be int_least8_t etc though, I think.
Uli
这篇关于C99 stdint.h的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!