Quick start manual

Data types, variables, and constants
5-47
Given these declarations, you can use the procedural constant MyFunction in a
function call:
I := MyFunction(5, 7)
You can also assign the value nil to a procedural constant.
Pointer constants
When you declare a pointer constant, you must initialize it to a value that can be
resolved—at least as a relative address—at compile time. There are three ways to do
this: with the @ operator, with nil, and (if the constant is of type PChar or PWideChar)
with a string literal. For example, if I is a global variable of type Integer, you can
declare a constant like
const PI: ^Integer = @I;
The compiler can resolve this because global variables are part of the code segment.
So are functions and global constants:
const PF: Pointer = @MyFunction;
Because string literals are allocated as global constants, you can initialize a PChar
constant with a string literal:
const WarningStr: PChar = 'Warning!';