number
and it will be returned, @
is the address operator. Now compile the code result will be as follows.
[c]Number is: 245
iptr points to a value: 245
Number is: 300
iptr points to a value: 300[/c]
The following is an example to declare NIL pointers, some times it's better to use nil pointer in case do not know the exact size as follows.
[c]var
number: integer;
iptr: ^integer;
x: ^word;
begin
iptr := nil;
x := addr(iptr);
writeln('the vaule of iptr is ', x^);
end.[/c]
Output: Now the result will be zero.
[c]the vaule of iptr is 0[/c]