问题描述
海拉专家可以了解远方和远方的使用情况。在c lang附近的关键字
在ISO标准中没有被称为远近的关键字。
它们是特定于实现的扩展。
< OT>
IIRC他们是Turbo C中的扩展,可以在DOS的分段下使用
内存模型,特别是指针。所谓的''near''
指针是16位并且仅包含一个偏移地址,而
''far''指针是32位且包含一个完整的段:偏移地址。
有关详细信息,请发布到Turbo C或DOS新闻组。
< / OT>
在ISO标准中没有被称为远近的关键字。
它们是特定于实现的扩展。
< OT>
IIRC他们是Turbo C的扩展,可以在DOS的分段内存模型下使用,尤其是指针。所谓的''near''指针是16位,只包含一个偏移地址,而
''far''指针是32位,包含一个完整的段:偏移地址。
有关详细信息,请发布到Turbo C或DOS新闻组。
< / OT>
[OT] FAR / NEAR关键字实际上是由Microsoft引入的,而不是
Borland,它们很快传播到每个C编译器
8086 /英特尔/ DOS世界。
Roberto Waltman
[请回复小组,
返回地址无效]
在ISO标准中没有被称为远近的关键字。
它们是特定于实现的扩展。
< santosh>解释远/近的解释
< OT>
好吧,''远'',''近''和亲戚(主要是''巨大'''并且''tiny'')仍然是许多用于微控制器的交叉编译器所使用的
。有些编译器使用
__near或__far来符合ISO标准。有些人不会。
< / OT>
祝你有愉快的一天,
Pradeep
-
所有意见都是我的,并不代表我的雇主的意见或
政策。
R Pradeep Chandran rpc AT pobox DOT com
hai experts can know about the use of far & near keywords in c lang
There are no keywords called far and near in C as standardised by ISO.
They''re implementation specific extensions.
<OT>
IIRC they''re extensions in Turbo C for use under DOS''s segmented
memory model, particularly with pointers. The so called ''near''
pointers are 16 bit and contain an offset address alone while the
''far'' pointer is 32 bit and contains a full segment:offset address.
For more details, post to a Turbo C or DOS newsgroup.
</OT>
There are no keywords called far and near in C as standardised by ISO.
They''re implementation specific extensions.
<OT>
IIRC they''re extensions in Turbo C for use under DOS''s segmented
memory model, particularly with pointers. The so called ''near''
pointers are 16 bit and contain an offset address alone while the
''far'' pointer is 32 bit and contains a full segment:offset address.
For more details, post to a Turbo C or DOS newsgroup.
</OT>
[OT] The FAR/NEAR keywords were actually introduced by Microsoft, not
Borland, and they quickly spread to every C compiler for the
8086/Intel/DOS world.
Roberto Waltman
[ Please reply to the group,
return address is invalid ]
There are no keywords called far and near in C as standardised by ISO.
They''re implementation specific extensions.
<snip explanation of far/near by santosh>
<OT>
Well, ''far'', ''near'' and relatives (mainly ''huge'' and ''tiny'') are still
used by many cross compilers for microcontrollers. Some compilers use
__near or __far to comply with the ISO standard. Some don''t.
</OT>
Have a nice day,
Pradeep
--
All opinions are mine and do not represent the views or
policies of my employer.
R Pradeep Chandran rpc AT pobox DOT com
这篇关于关于远远&在c附近的关键字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!