- 3.2.24. -
 Table of Contents>
 
 
 
 3. Compiler Directives
 
 
 
 
 3.2. Switch and Parameter Directives
 
 
 
 
 
 3.2.24. $TPO: Typed Inc/Dec Operations Switch
 
 
 
 3.2.24. $TPO: Typed Inc/Dec Operations Switch
 
Targets: MS-DOS, OS/2, Win32
Compiler directives
Enables/disables typed Inc/Dec operations on pointers.
Syntax:
  {$TPO+} or {$TPO-}
Default:
  {$TPO+}
Example:
var
  a: ^DWORD;
begin
  a := Pointer(0);
  inc(a);
  Writeln(Longint(a));
end.
The sample above prints 1 if typed operations are disabled ($TPO-}.
If typed operations are enabled ($TPO+}, the application prints 4.
- 3.2.24. -