FunctionPackage: exclToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version


Arguments: fspec &optional stream

Starting in Allegro CL release 6.0, the new fwrapper facility, described in fwrappers-and-advice.htm, replaces the advice facility, and continued use of the advice facility is deprecated.

This function prints a description of the advice on fspec and then returns nil. fspec must be a function name (it is typically a symbol) identifying a function or macro. stream specifies the stream where the description will be written. The default value for stream is t, indicating the stream which is the value of *standard-output*.

Advice is described by name and listed in the order in which it runs. The following (rather simple-minded) example shows how the output looks.

See also fwrappers-and-advice.htm for general information on the new fwrapper facility and the older, now deprecated, advice facility in Allegro CL.

;; Define the function and the advice:
(defun foo nil nil)
(excl:advise foo :before jack nil (format t "jack~%"))
(excl:advise foo :before nil nil (format t "nil 1~%"))
(excl:advise foo :before nil 100 (format t "nil 2~%"))
(excl:advise foo :after jill nil (format t "jill~%"))
(excl:advise foo :after nil nil (format t "nil 3~%"))

;; Now when foo is run, the following is printed:

USR(12): (foo)
nil 1
nil 2
nil 3

USER(13): (excl:describe-advice 'foo)
Before advice:
(nil (format t "nil 1~%"))
(jack (format t "jack~%"))
(nil (format t "nil 2~%"))
After advice:
(jill (format t "jill~%"))
(nil (format t "nil 3~%"))


Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version