Fandom

武装突袭 Wiki

Identifier

简体 | 繁體

4,827个页面创建
于此维基上
添加新页面
评论0 分享

您使用了广告屏蔽软件!


Wikia通过广告运营为用户提供免费的服务。我们对用户通过嵌入广告屏蔽软件访问网站进行了使用调整。

如果您使用了广告屏蔽软件,将无法使用我们的服务。请您移除广告屏蔽软件,以确保页面正常加载。

An identifier is a name given to a variable that the scripter can choose: It is the name that identifies the variable.

Rules 编辑

Binding rules for identifiers:

  • Identifiers may consist of any ASCII text characters (a-z, A-Z), numbers (0-9) and underscores (_)
  • Identifiers must not start with a number (f.i. "9myVariable")
  • Identifiers of local variables must start with an underscore

Examples of valid identifiers:

myVariable1
_localVariable95
_23Variable

Examples of invalid identifiers:

123Variable
9_vA#riable
_this&variable

Recommendations 编辑

It is recommended to write identifiers in camel-case-syntax. That means that all sub-words in the identifier are started with an upper-case character. This makes identifiers better readable.

Example:

myCamelCaseIdentifier

Another but longer method is to split all sub-words with underscores.

Example:

my_splitted_identifier

See also 编辑

更多维基

随机维基