Function | Package: excl | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version

## format-arg-count-stats

Arguments: &optional action path tag

This function uses the value of `*format-arg-count-stats*` to report on format string compilations. The value of that variable should be a list of six fixnums and this function returns a list based on those values (and returns `nil` if `*format-arg-count-stats*` is not a list of six fixnums).

The exact behavior depends on the value of action:

- action is omitteed or any value other than `:report` or `:reset`: return the list of six fixnums that is the value of `*format-arg-count-stats*` (return `nil` if `*format-arg-count-stats*` is not a list of six fixnums).
- action is `:report`: return a list of the form

      (:format-arg-stats :all N1 :missing N2 :equal N3 :extra N4 :complex N5 :error N6)

  where the Ni are the six fixnums in the list that is the value of `*format-arg-count-stats*`. (Return `nil` if `*format-arg-count-stats*` is not a list of six fixnums.) See below for an interpretation of the values.

- action is `:reset`: behavior is the same as for `:report` but additionally the value of `*format-arg-count-stats*` is set to (list 0 0 0 0 0 0). Again return `nil` if `*format-arg-count-stats*` is not a list of six fixnums but reset the value of `*format-arg-count-stats*` in that case as well.

The six value are:

1. (`:all`): the number of format forms examined (should equal the sum of remaining values).
2. (`:missing`): the number of format forms with insufficient arguments (N needed, fewer than N supplied).
3. (`:equal`): the number of format forms with just as many arguments supplied as needed.
4. (`:extra`): the number of format forms with more arguments supplied than needed.
5. (`:complex`): the number of format forms that are too complex to analyse.
6. (`:error`): the number of format forms that contain a syntax error.

Statistics about compilation of format forms are collected when compilation is done so that the `comp:verify-format-argument-count-switch` compiler switch has the value `t`, 1, 2, 3, or 4. If that switch has the value `nil` or 0 when the compilation is done, no statistics are kept.

### The path and tag arguments

If the path argument names an existing file, one or two line will be appended to the files. If `*compile-file-pathname*` is non-`nil`, its value and the value of tag will be written to the first line and the list with labels will be written as the second line. If `*compile-file-pathname*` is `nil`, just one line will be written, the list with labels.

path can also be a stream suitable for writing to.

See Checking format forms during compilation in miscellaneous.htm for more information.

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.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version