XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next

break


Type:   -   function (subr)
Source:   -   xlbfun.c, xldbug.c

Syntax

(break [err-msg [arg]])
err-msg - a string expression for the error message
arg - an optional argument expression
returns - NIL when continued from the break loop

Description

The 'break' function allows the entry into the break loop with a continuable error. The continuable error generated by 'break' does not require any corrective action. The form of the message generated is:

break: err-msg - arg
if continued: return from BREAK

The default for 'err-msg' is:

**BREAK**

From within the break loop , if a continue form is evaluated then a NIL is returned from 'break'. If desired, the clean-up and top-level functions may be evaluated to abort out of the break loop.

Examples

(break)             ; break: **BREAK**
(break "out")       ; break: out
(break "it" "up")   ; break: it - "up"

Common Lisp: Common LISP and XLISP have the same basic form and style for 'break'. However, the 'err-msg' string in Common Lisp is sent to the format function. Although, XLISP does have the format function, it is not used for error messages. Porting from XLISP to Common LISP will work fine. When porting from Common Lisp to XLISP, you will need to check for this embedded control information in the messages.

See the break function in the XLISP 2.0 manual.

  Back to Top


XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next