Next Previous Up Top Contents Index

2.6 The COMMON-EXTENSIONS module

debug-assert

Statement macro

Summary

Signals an error if the expression passed to it evaluates to false -- but only when the code is compiled in interactive development mode.

Macro call (1)

debug-assert expression format-string [ format-arg ]* => false 

Macro call (2)

debug-assert expression => false 

Arguments

expression
A Dylan expressionbnf.

format-string
A Dylan expressionbnf.

format-arg
A Dylan expressionbnf.

Values

false
#f.

Library

common-extensions

Module

common-extensions

Description

Signals an error if expression evaluates to false -- but only when the code is compiled in debugging mode.

An assertion or "assert" is a simple and popular development tool for testing conditions in program code.

This macro is identical to assert, except that the assert is defined to take place only while debugging.

The Functional Developer compiler removes debug-assertions when it compiles code in "production" mode as opposed to "debugging" mode.

The format-string is a format string as defined on page 112 of the DRM.


Common Dylan and Functional Extensions - 31 Mar 00

Next Previous Up Top Contents Index