Next Previous Up Top Contents Index

2.6 The COMMON-EXTENSIONS module

assert

Statement macro

Summary

Signals an error if the expression passed to it evaluates to false.

Macro call (1)

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

Macro call (2)

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 #f.

An assertion or "assert" is a simple tool for testing that conditions hold in program code.

The format-string is a format string as defined on page 112 of the DRM. If format-string is supplied, the error is formatted accordingly, along with any instances of format-arg.

If expression is not #f, assert does not evaluate format-string or any instances of format-arg.

See also

debug-assert, page 22


Common Dylan and Functional Extensions - 31 Mar 00

Next Previous Up Top Contents Index