[ansi 89]内联 [英] [ansi 89] inline

查看:112
本文介绍了[ansi 89]内联的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

原谅无知,我现在没有k& r w / me:


有没有办法在ansi 89中进行内联? 99?

-

Harrison Caudill | 。^ www.hypersphere.org

计算机科学&物理双专业| |我*我= 1

佐治亚理工学院| v''我只是一个普通人

Forgive the ignorance, I don''t have k&r w/ me at the moment:

is there a way to do inline in ansi 89? 99?

--
Harrison Caudill | .^ www.hypersphere.org
Computer Science & Physics Double Major | | Me*Me=1
Georgia Institute of Technology | v'' I''m just a normal guy

推荐答案




" Charles Harrison考迪尔" <ク***** @ myrna.cc.gatech.edu>一个écritdansle

message de news:c0 ********* @solaria.cc.gatech.edu ...
Hi,

"Charles Harrison Caudill" <ku*****@myrna.cc.gatech.edu> a écrit dans le
message de news: c0*********@solaria.cc.gatech.edu...
原谅无知,我目前没有k& rw / me:

有没有办法在ansi 89中进行内联? 99?


C99中有内联关键字,C89中没有。


问候,瑞吉斯。

-
哈里森Caudill | 。^ www.hypersphere.org
计算机科学&物理双专业| |我*我= 1
佐治亚理工学院| v''我只是一个普通人
Forgive the ignorance, I don''t have k&r w/ me at the moment:

is there a way to do inline in ansi 89? 99?
Yes in C99 with the inline keyword, no in C89.

Regards, Regis.
--
Harrison Caudill | .^ www.hypersphere.org
Computer Science & Physics Double Major | | Me*Me=1
Georgia Institute of Technology | v'' I''m just a normal guy



Charles Harrison Caudill写道:
Charles Harrison Caudill wrote:
原谅无知,我不知道目前没有k& rw / me:

有没有办法在ansi 89中进行内联? 99?
Forgive the ignorance, I don''t have k&r w/ me at the moment:

is there a way to do inline in ansi 89? 99?



C99有'内联''。 C89 / 90没有。


你最接近C89的内联是通过使用(一些

经常非常难看)的宏,你应该*绝对*尽可能避免。


HTH,

-ag


[BTW - 一些C89编译器提供内联作为扩展。]


-

Artie Gold - 德克萨斯州奥斯汀


是的。这是一个都市传奇。但它是一个非常棒的城市传奇!


C99 has `inline''. C89/90 does not.

The closest you can come to inlining in C89 is through the use of (some
often pretty ugly) macros, which you should *definitely* avoid if possible.

HTH,
--ag

[BTW - some C89 compilers offer `inline'' as an extension.]

--
Artie Gold -- Austin, Texas

"Yeah. It''s an urban legend. But it''s a *great* urban legend!"


Charles Harrison Caudill< ku ***** @ myrna.cc.gatech.edu>写道:
Charles Harrison Caudill <ku*****@myrna.cc.gatech.edu> wrote:
原谅无知,我现在没有k& r w / me:
有没有办法在ansi 89中进行内联? 99?
Forgive the ignorance, I don''t have k&r w/ me at the moment: is there a way to do inline in ansi 89? 99?




我正在阅读GNU编码标准,并且我遇到了一个很好的

建议这个问题:


#ifdef STD_C99_OR_WHATEVER

#define INLINE inline

#else

#define INLINE

#endif


-

Harrison Caudill | 。^ www.hypersphere.org

计算机科学&物理双专业| |我*我= 1

佐治亚理工学院| v''我只是一个普通人



I was reading throught the GNU coding standards and I came across a good
suggestion for this problem:

#ifdef STD_C99_OR_WHATEVER
#define INLINE inline
#else
#define INLINE
#endif

--
Harrison Caudill | .^ www.hypersphere.org
Computer Science & Physics Double Major | | Me*Me=1
Georgia Institute of Technology | v'' I''m just a normal guy


这篇关于[ansi 89]内联的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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