_和__意义 [英] _ and __ significance

查看:106
本文介绍了_和__意义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到许多变量或结构被声明为_或__前缀。

任何人都可以解释_或__的重要性。我的意思是,

我想知道使用_和__的约定。

I have seen many variables or structures declared as _ or __ prefixed .
Can anyone explain the significance of _ or __ particularly . I mean ,
I wanted to know the convention for using _ and __ .

推荐答案


g.*******@gmail.com 写道:

我看到许多变量或结构被声明为_或__前缀。

任何人都可以解释_或__的重要性。我的意思是,

我想知道使用_和__的约定。
I have seen many variables or structures declared as _ or __ prefixed .
Can anyone explain the significance of _ or __ particularly . I mean ,
I wanted to know the convention for using _ and __ .



使用_或__除了

一般约定用于识别系统变量/函数之外没有任何特殊含义/>
单个下划线和由双重强调标识的元数据。


-kondal

There is no particulat meaning in using _ or __ except that of a
general convention used to identify system variables/functions by
single underscore and metadata identified by double underscored.

-kondal




kondal写道:

kondal wrote:
g。***** **@gmail.com 写道:

我看到很多变量或结构被声明为_或__前缀。

任何人都可以解释_或__的重要性。我的意思是,

我想知道使用_和__的约定。
I have seen many variables or structures declared as _ or __ prefixed .
Can anyone explain the significance of _ or __ particularly . I mean ,
I wanted to know the convention for using _ and __ .



使用_或__除了

一般约定用于识别系统变量/函数之外没有特别的含义/>
单个下划线和元数据由双下划线标识。


-kondal


There is no particulat meaning in using _ or __ except that of a
general convention used to identify system variables/functions by
single underscore and metadata identified by double underscored.

-kondal



感谢您的回复。但是请你详细解释元数据

详细信息。


Ankush

Thanks for your reply. But ould you please explain metadata in a bit
detail.

Ankush


g.*******@gmail.com 写道:

我看到许多变量或结构被声明为_或__前缀。

任何人都可以解释_或__的重要性。我的意思是,

我想知道使用_和__的约定。
I have seen many variables or structures declared as _ or __ prefixed .
Can anyone explain the significance of _ or __ particularly . I mean ,
I wanted to know the convention for using _ and __ .



其他人可能会引用确切的法律术语,但一般来说,

你不应该使用以下划线开头的名字,因为这些名称

可以保留用于编译器/实现的各种用途。

名称中的下划线通常用于使标识符更多

可读 - 例如NUM_ITEMS而不是NUMITEMS。


问候,

Bart。

Someone else will probably quote the exact legalese, but in general,
you shouldn''t use names that begin with underscores because these names
can be reserved for various uses by your compiler/implementation.
Underscores inside names are often used to make identifiers more
readable - e.g. NUM_ITEMS instead of NUMITEMS.

Regards,
Bart.


这篇关于_和__意义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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