什么是对象? [英] What is an object?

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

问题描述

什么是对象?

这个词的来源是什么?

它与&b中的对象有任何关系

面向对象编程"?

What is an object?
Where did this term come from?
Does it have any relation
to the objects in "object oriented programming"?

推荐答案

E. Robert Tisdale schrieb:
E. Robert Tisdale schrieb:
什么是对象?


对象是执行环境中的数据存储区域,

的内容可以表示值。一个对象有一个类型。

这个术语来自哪里?


ISO / IEC 9899:1999 - 3.14

与面向对象编程中的对象有任何关系吗?
What is an object?
An object is a region of data storage in the execution environment, the
contents of which can represent values. An object has a type.
Where did this term come from?
ISO/IEC 9899:1999 - 3.14
Does it have any relation
to the objects in "object oriented programming"?




No.


cc



No.

cc


E. Robert Tisdale写道:
E. Robert Tisdale wrote:
什么是对象?


这取决于具体情况。 C标准定义了

(用于* *目的)一个对象作为执行环境中的数据区域/ b $ b存储,内容
$ b其中$ b可以表示值。


请注意,值也可以表示为与任何特定数据存储相关联的
,如快速

注册。另请注意,将对象的内容解释为某个值取决于用于访问该对象的

*类型*,并且有点

模式可能不是特定类型的任何

值的有效表示。最后,请注意函数

不是对象,它们的指令序列可能

甚至位于完全独立的地址空间中。

这是在哪里术语来自哪里?


英语。对象是具体的东西。

它与面向对象编程中的对象有任何关系吗?
What is an object?
That depends on the context. The C standard defines
(for *its* purposes) an object as a "region of data
storage in the execution environment, the contents
of which can represent values".

Note that values can also be represented in ways not
associated with any specific data storage, as in fast
registers. Note also that the interpretation of the
contents of an object as some value depends on the
*type* used to access the object, and that some bit
patterns might not be valid representations for any
vale of a specific type. Finally, note that functions
are not objects, and their instruction sequences might
even reside in a totally separate address space.
Where did this term come from?
English language. An object is a concrete "thing".
Does it have any relation
to the objects in "object oriented programming"?




有一种关系,但不是一种强关系。

OOP" objects" 方法与方法相关联。但是C

对象不是。



There is a relationship, but not a strong one.
OOP "objects" are associated with "methods" but C
objects are not.


2004年8月16日星期一23:18:28 -0400,E。Robert Tisdale写道:
On Mon, 16 Aug 2004 23:18:28 -0400, E. Robert Tisdale wrote:
什么是对象?


这是一件有形的事情。

这个词来自何处?


中古英语,来自Medieval Latin / objectum /。

它与面向对象编程中的对象有任何关系吗?
What is an object?
It''s a tangible thing.
Where did this term come from?
Middle English, from Medieval Latin /objectum/.
Does it have any relation
to the objects in "object oriented programming"?




不一定。在编程对象时几乎可以指任何东西

(虽然可能仅限于占用记忆的东西)。所以一个结构

甚至是像int这样的主要类型。使用这个定义对象在

面向对象编程中。与C没什么不同,OOP只关联对象操作该对象的函数。所以你做了
letter.Write(stream)vs letter_write(letter,stream)。当然OOP

添加了许多其他有用的东西。


Mike



Not necessarily. In programing an "object" can refer to virtually anything
(although probably limited to things that occupy memory). So a struct
or even an primative type like an int. With this definition objects in
"object oriented programming" are no different from C, OOP just associates
the functions that operate on that object with the object. So you do
letter.Write(stream) vs. letter_write(letter, stream). Of course OOP
adds a lot of other fancy stuff that can be useful.

Mike


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

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