什么定义了“C”语言? [英] What Defins the "C" Language?

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

问题描述

在Harbison和Steele的文本中(第四版,第111页)

声明,


C语言没有指定

整数类型将表示的整数范围,除非说int类型可能不是
小于short而long可能不小于int。


他们继续说,


许多实现代表8位字符,类型为
16位短,以及类型为int,使用16或

32位,具体取决于实现。 ISO C要求

实现至少使用这些宽度。


如果C语言没有被ISO C定义,那么它定义了什么?

-

Randy Yates

索尼爱立信移动通信

美国北卡罗来纳州三角研究园
ra ********* @ sonyericsson.com ,919-472-1124

In Harbison and Steele''s text (fourth edition, p.111)
it is stated,

The C language does not specify the range of integers that the
integral types will represent, except ot say that type int may not
be smaller than short and long may not be smaller than int.

They go on to say,

Many implementations represent characters in 8 bits, type short in
16 bits, and type long in 32 bits, with type int using either 16 or
32 bits depending on the implementation. ISO C requires
implementations to use at least these widths.

If the C language is not defined by ISO C, then what defines it?
--
Randy Yates
Sony Ericsson Mobile Communications
Research Triangle Park, NC, USA
ra*********@sonyericsson.com, 919-472-1124

推荐答案

" Randy Yates" < RA ********* @ sonyericsson.com>在消息中写道

新闻:xx ************* @ usrts005.corpusers.net ...
"Randy Yates" <ra*********@sonyericsson.com> wrote in message
news:xx*************@usrts005.corpusers.net...
在哈比森和斯蒂尔'' s文本(第四版,第111页)
声明,

C语言没有指定
整数类型将表示的整数范围,除了说int类型可能不会小于short而long可能不会小于int。

他们继续说,

许多实现代表8中的字符位,16位短路,32位长类型,int使用16位或32位,具体取决于实现方式。 ISO C要求
实现至少使用这些宽度。

如果C语言没有被ISO C定义,那么它定义了什么?
In Harbison and Steele''s text (fourth edition, p.111)
it is stated,

The C language does not specify the range of integers that the
integral types will represent, except ot say that type int may not
be smaller than short and long may not be smaller than int.

They go on to say,

Many implementations represent characters in 8 bits, type short in
16 bits, and type long in 32 bits, with type int using either 16 or
32 bits depending on the implementation. ISO C requires
implementations to use at least these widths.

If the C language is not defined by ISO C, then what defines it?



ISO

标准文件中规定的符合实施的要求,例如您在上面引用的那些。如上所述,这些要求有一定的余地,可能是为了在为某些特定的方式创建实施时允许选择适当的


平台。


引号中的哪些内容让您认为它不是由ISO C定义的?


Alex



There are requirements for conforming implementations, specified in ISO
standard documents, such as those you quote above. There is some leeway in
these requirements, as illustrated above, presumably to allow appropriate
choices to be made when creating an implementation for some specific
platform.

What is in the quotes that makes you think it is not defined by ISO C?

Alex


Alex Fraser写道:
Alex Fraser wrote:
" Randy Yates" < RA ********* @ sonyericsson.com>在消息中写道
新闻:xx ************* @usrts005.corpusers.net ...
"Randy Yates" <ra*********@sonyericsson.com> wrote in message
news:xx*************@usrts005.corpusers.net...
在哈比森和斯蒂尔'' s文本(第四版,第111页)
声明,

C语言没有指定
整数类型将表示的整数范围,除了说int类型可能不会小于short而long可能不会小于int。

他们继续说,

许多实现代表8中的字符位,16位短路,32位长类型,int使用16位或32位,具体取决于实现方式。 ISO C要求
实现至少使用这些宽度。

如果C语言没有被ISO C定义,那么它定义了什么?
In Harbison and Steele''s text (fourth edition, p.111)
it is stated,

The C language does not specify the range of integers that the
integral types will represent, except ot say that type int may not
be smaller than short and long may not be smaller than int.

They go on to say,

Many implementations represent characters in 8 bits, type short in
16 bits, and type long in 32 bits, with type int using either 16 or
32 bits depending on the implementation. ISO C requires
implementations to use at least these widths.

If the C language is not defined by ISO C, then what defines it?



ISO
标准文件中规定了符合要求的实施要求,例如上面引用的那些要求。如上所述,这些要求有一定的余地,大概是为了在为某个特定的平台创建实现时允许做出适当的选择。

什么在引号中,你认为它不是由ISO C定义的吗?


There are requirements for conforming implementations, specified in ISO
standard documents, such as those you quote above. There is some leeway in
these requirements, as illustrated above, presumably to allow appropriate
choices to be made when creating an implementation for some specific
platform.

What is in the quotes that makes you think it is not defined by ISO C?



在我看来,他在问ISO是否没有定义这个''n'' (整数

尺寸等)谁为给定的拱门/编译器做了什么?


-

Nils O. Sel ?sdal
www.utelsystems.com


" Nils O. Sel?sdal" < NO*@Utel.no>写道:
"Nils O. Sel?sdal" <NO*@Utel.no> writes:
Alex Fraser写道:
Alex Fraser wrote:
" Randy Yates" < RA ********* @ sonyericsson.com>在消息中写道
新闻:xx ************* @usrts005.corpusers.net ...
"Randy Yates" <ra*********@sonyericsson.com> wrote in message
news:xx*************@usrts005.corpusers.net...


在Harbison和Steele的文本中(第四版,第111页)
声明,

C语言没有指定整数的范围
积分类型将表示,除了说int类型可能不小于short而long可能不小于int。

他们继续说,实现至少使用这些宽度。
如果C语言没有被ISO C定义,那么它定义了什么?
In Harbison and Steele''s text (fourth edition, p.111)
it is stated,

The C language does not specify the range of integers that the
integral types will represent, except ot say that type int may not
be smaller than short and long may not be smaller than int.

They go on to say,

Many implementations represent characters in 8 bits, type short in
16 bits, and type long in 32 bits, with type int using either 16 or
32 bits depending on the implementation. ISO C requires
implementations to use at least these widths.

If the C language is not defined by ISO C, then what defines it?


有要求用于符合实现,在ISO


There are requirements for conforming implementations, specified in
ISO


标准文档中指定,例如您在上面引用的那些文档。如上所述,这些要求有一定的余地,可能是为了在为某些特定的平台创建实现时允许做出适当的选择。
引号中有什么这让你认为它不是由ISO定义的吗?
standard documents, such as those you quote above. There is some leeway in
these requirements, as illustrated above, presumably to allow appropriate
choices to be made when creating an implementation for some specific
platform.
What is in the quotes that makes you think it is not defined by ISO
C?



在我看来他在问ISO是否没有定义这个''n'' (整数
大小等)谁为给定的arch /编译器做了什么?



Looks to me like he''s asking if ISO doesn''t define this''n''that(integer
sizes etc.) Who does for a given arch/compiler ?




Prexactly。 :)


我似乎回忆起过去几年中旧机器的对话,即
有奇怪的整数大小(9位?),C会支持。我是b $
妄想?

-

Randy Yates

索尼爱立信移动通信

美国北卡罗来纳州三角研究园
ra*********@sonyericsson.com ,919-472-1124



Prexactly. :)

I seem to recall conversations in years past of old machines that
had strange integer sizes (9 bits?) which C would support. Am I
delusional?
--
Randy Yates
Sony Ericsson Mobile Communications
Research Triangle Park, NC, USA
ra*********@sonyericsson.com, 919-472-1124


这篇关于什么定义了“C”语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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