聲明 (編程)

维基百科,自由的百科全书

计算机编程中,声明是一种指定标识符属性的语言结构[1]声明最常用于子程序变量常量,但也可用于其他实体,例如枚举[1]声明通常還能指定資料類型(对于变量和常量)以及类型签名(对于函数)[2][1]

参考文献[编辑]

  1. ^ 1.0 1.1 1.2 "A declaration specifies the interpretation and attributes of a set of identifiers. A definition of an identifier is a declaration for that identifier that:
  2. ^ Mike Banahan. 2.5. Declaration of variables. GBdirect. [2011-06-08]. (原始内容存档于2022-04-12). [A] declaration [...] introduces just the name and type of something but allocates no storage[...].