Variables

<< Click to Display Table of Contents >>

Navigation:  Script Language >

Variables

Variables can be declared inside function body, before begin.

All variables declared inside function, function parameters and Result variable is treated as local and does not affect script global variables.

For example:

 

procedure Test();
var a: integer;
begin
  a := 100;
end;
 
a := 200;
Test();
// a is still 200

 

variable declaration can contain initial value:

 

var a: integer = 0;

 

Variables used as for statement iterator in local functions are treated as local variables.

 

Variables ordinal types:

array

ansistring

boolean

byte

cardinal

char

currency

double

extended

integer

int64

pchar

pointer

string

single

set

smallint

TDatetime

variant

widestring

word