Var/zh CN

From Free Pascal wiki
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Deutsch (de) English (en) español (es) suomi (fi) français (fr) русский (ru) 中文(中国大陆)‎ (zh_CN)

Var是用于标明变量及其数据类型声明部分的关键字。当其在过程或函数的参数列表中使用时Var表示使用可变参数(即按引用传递参数)。

变量通常声明在以下关键字之前 program, procedure, function 或者 unit.

var
  age: integer;

如果您打算使用相同数据类型的多个变量,这些变量可以被归组以表明它们具有共同的类型定义。这些变量必须使用,comma分隔。

var
  FirstName, LastName, address: string;

参见