Var

From Lazarus wiki
Revision as of 14:22, 10 March 2015 by Eny (talk | contribs) (Fix errors and simplify (invalid doc references still need fixing))
Jump to navigationJump to search

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

Var is a keyword used to mark the section where variables and their data types are declared. When used for a parameter of a procedure or function then var indicates the use of a variable parameter.

Variables are typically declared at the beginning of a program, procedure, function or unit.

var
  age: integer;

If you are planning to use various variables of the same type, they can be grouped so they share the same type definition. The variables must be separated by a comma.

var
  FirstName, LastName, address: string;

See also