Name

$StackFrames Compiler Directive

Syntax

{$W-}              // default
{$StackFrames Off} // default
{$W+}
{$StackFrames On}

Scope

Local

Description

The $StackFrames directive causes the compiler to generate a stack frame for every subroutine call (except for subroutines you write in assembly language). The default is that stack frames are created only when they are needed for local variables.

Some debugging tools require stack frames. If you are not using such a tool, you can leave the default setting, which results in slightly more efficient code.

Get Delphi in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.