Assert directives (Object Pascal)

From Appmethod Topics
Jump to: navigation, search

Go Up to Object Pascal Compiler Directives (List) Index


Type

Switch

Syntax

{$C+} or {$C-} {$ASSERTIONS ON} or {$ASSERTIONS OFF}

Default

{$C+} {$ASSERTIONS ON}

Scope

Local



Remarks

The $C directive enables or disables the generation of code for assertions in a Object Pascal source file. {$C+} is the default.

Since assertions are not usually used at run time in shipping versions of a product, compiler directives that disable the generation of code for assertions are provided. {$C-} will disable assertions.

See Also