lispdoc - results for case |
(case keyform &body cases) | Function: CASE Keyform {({(Key*) | Key} Form*)}* Evaluates the Forms in the first clause with a Key EQL to the value of Keyform. If a singleton key is T then the clause is a default clause.
|
Example:(defun reverse-label (label) "Account for the fact that one vertex's right is another's left." (case label (l 'r) (r 'l) (otherwise label))) | Mentioned in: CLtL2 - 24.3. Special Forms for Exhaustive Case Analysis CLtL2 - 29.4.3. Exhaustive Case Analysis CLtL2 - 29.4.7. Establishing Restarts CLtL2 - 7. Control Structure CLtL2 - 7.10.2. Rules Governing the Passing of Multiple Values CLtL2 - 7.6. Conditionals CLtL2 - 7.8.5. The ``Program Feature'' HyperSpec - 1.4.1.4.1 Case in Symbols HyperSpec - 13.1.4.3 Characters With Case HyperSpec - 13.1.4.3.3 Corresponding Characters in the Other Case HyperSpec - 13.1.4.3.4 Case of Implementation-Defined Characters HyperSpec - 19.2.2.1.2 Case in Pathname Components HyperSpec - 19.2.2.1.2.1 Local Case in Pathname Components HyperSpec - 19.2.2.1.2.2 Common Case in Pathname Components HyperSpec - 22.1.3.3.2 Effect of Readtable Case on the Lisp Printer HyperSpec - 22.1.3.3.2.1 Examples of Effect of Readtable Case on the Lisp Printer HyperSpec - 22.3.8.1 Tilde Left-Paren: Case Conversion HyperSpec - 22.3.8.2 Tilde Right-Paren: End of Case Conversion HyperSpec - 23.1.2 Effect of Readtable Case on the Lisp Reader HyperSpec - 23.1.2.1 Examples of Effect of Readtable Case on the Lisp Reader HyperSpec - Macro CASE, CCASE, ECASE On Lisp - A Sample ATN On Lisp - An Interpreter On Lisp - Anaphoric Macros (Macro-Defining Macros) On Lisp - Chapter _27 On Lisp - Classes and Instances On Lisp - Common Lisp Implementation On Lisp - Functions as Properties On Lisp - Functions as Representation On Lisp - How Macros Work On Lisp - Macro Style On Lisp - New Implementation On Lisp - Objects in Plain Lisp On Lisp - The with- Macro PCL - training the filter PCL - whats next |
(ccase keyform &body cases) | Function: CCASE Keyform {({(Key*) | Key} Form*)}* Evaluates the Forms in the first clause with a Key EQL to the value of Keyform. If none of the keys matches then a correctable error is signalled.
|
| Mentioned in: CLtL2 - 24.3. Special Forms for Exhaustive Case Analysis CLtL2 - 29.4.3. Exhaustive Case Analysis CLtL2 - 7.10.2. Rules Governing the Passing of Multiple Values CLtL2 - 7.2. Generalized Variables CLtL2 - 7.6. Conditionals HyperSpec - Macro CASE, CCASE, ECASE | |
(ecase keyform &body cases) | Function: ECASE Keyform {({(Key*) | Key} Form*)}* Evaluates the Forms in the first clause with a Key EQL to the value of Keyform. If none of the keys matches then an error is signalled.
|
Example:(defun get-float-type (num) (ecase num (0 1.0) (1 1.0d0))) | Mentioned in: CLtL2 - 24.3. Special Forms for Exhaustive Case Analysis CLtL2 - 29.4.3. Exhaustive Case Analysis CLtL2 - 7.10.2. Rules Governing the Passing of Multiple Values CLtL2 - 7.6. Conditionals HyperSpec - Macro CASE, CCASE, ECASE PCL - analyzing the results PCL - primitive binary types PCL - training the filter PCL - whats next Successful Lisp - chapter15 |
*print-case | |
| Mentioned in: HyperSpec - Variable *PRINT-CASE | |
(handler-case form &rest cases) | Function: (HANDLER-CASE form { (type ([var]) body) }* ) Execute FORM in a context with handlers established for the condition types. A peculiar property allows type to be :NO-ERROR. If such a clause occurs, and form returns normally, all its values are passed to this clause as if by MULTIPLE-VALUE-CALL. The :NO-ERROR clause accepts more than one var specification.
|
Example:(defun read-frame (frame-type in) (handler-case (read-value frame-type in) (in-padding nil nil))) | Mentioned in: CLtL2 - 29.3.10. Generalized Restarts CLtL2 - 29.3.12. Serious Conditions CLtL2 - 29.3.2. Trapping Errors CLtL2 - 29.3.3. Handling Conditions CLtL2 - 29.4.4. Handling Conditions HyperSpec - Macro HANDLER-CASE PCL - condition handlers PCL - detecting tag padding PCL - implementing shoutcast PCL - other uses for conditions PCL - restarts |
(restart-case expression &body clauses &environment env) | Function: (RESTART-CASE form {(case-name arg-list {keyword value}* body)}*) The form is evaluated in a dynamic context where the clauses have special meanings as points to which control may be transferred (see INVOKE-RESTART). When clauses contain the same case-name, FIND-RESTART will find the first such clause. If Expression is a call to SIGNAL, ERROR, CERROR or WARN (or macroexpands into such) then the signalled condition will be associated with the new restarts.
|
| Mentioned in: CLtL2 - 29.3.10. Generalized Restarts CLtL2 - 29.3.6. Anonymous Restarts CLtL2 - 29.3.9. Comparison of Restarts and Catch/Throw CLtL2 - 29.4.7. Establishing Restarts CLtL2 - 29.4.8. Finding and Manipulating Restarts HyperSpec - Macro RESTART-CASE PCL - restarts | |
*print-case* | Variable: What case should the printer should use default?
|
Example:(defun current-case-mode () (or *print-case*)) | Mentioned in: CLtL2 - 1.2.7. Overview of Syntax CLtL2 - 22.1.5. The Readtable CLtL2 - 22.1.6. What the Print Function Produces CLtL2 - 22.3.1. Output to Character Streams CLtL2 - 28.2. Functions in the Programmer Interface |
(readtable-case readtable) | Undocumented
|
| Mentioned in: CLtL2 - 1.2.7. Overview of Syntax CLtL2 - 2.3. Symbols CLtL2 - 22.1.1. What the Read Function Accepts CLtL2 - 22.1.5. The Readtable CLtL2 - 22.1.6. What the Print Function Produces HyperSpec - Accessor READTABLE-CASE | |
(both-case-p char) | Function: The argument must be a character object. BOTH-CASE-P returns T if the argument is an alphabetic character and if the character exists in both upper and lower case. For ASCII, this is the same as ALPHA-CHAR-P.
|
| Mentioned in: CLtL2 - 13. Characters CLtL2 - 13.2. Predicates on Characters HyperSpec - Function UPPER-CASE-P, LOWER-CASE-P, BOTH-CASE-P | |
(upper-case-p char) | Function: The argument must be a character object; UPPER-CASE-P returns T if the argument is an upper-case character, NIL otherwise.
|
| Mentioned in: CLtL2 - 13. Characters CLtL2 - 13.2. Predicates on Characters CLtL2 - 13.4. Character Conversions HyperSpec - Function UPPER-CASE-P, LOWER-CASE-P, BOTH-CASE-P | |
(lower-case-p char) | Function: The argument must be a character object; LOWER-CASE-P returns T if the argument is a lower-case character, NIL otherwise.
|
| Mentioned in: CLtL2 - 13. Characters CLtL2 - 13.2. Predicates on Characters CLtL2 - 13.4. Character Conversions CLtL2 - 22.1.5. The Readtable HyperSpec - Function UPPER-CASE-P, LOWER-CASE-P, BOTH-CASE-P | |
(alexandria.0.dev:destructuring-case keyform &body clauses) | Function: DESTRUCTURING-CASE, -CCASE, and -ECASE are a combination of CASE and DESTRUCTURING-BIND. KEYFORM must evaluate to a CONS. Clauses are of the form: ((CASE-KEYS . DESTRUCTURING-LAMBDA-LIST) FORM*) The clause whose CASE-KEYS matches CAR of KEY, as if by CASE, CCASE, or ECASE, is selected, and FORMs are then executed with CDR of KEY is destructured and bound by the DESTRUCTURING-LAMBDA-LIST. Example: (defun dcase (x) (destructuring-case x ((:foo a b) (format nil "foo: ~S, ~S" a b)) ((:bar &key a b) (format nil "bar, ~S, ~S" a b)) (((:alt1 :alt2) a) (format nil "alt: ~S" a)) ((t &rest rest) (format nil "unknown: ~S" rest)))) (dcase (list :foo 1 2)) ; => "foo: 1, 2" (dcase (list :bar :a 1 :b 2)) ; => "bar: 1, 2" (dcase (list :alt1 1)) ; => "alt: 1" (dcase (list :alt2 2)) ; => "alt: 2" (dcase (list :quux 1 2 3)) ; => "unknown: 1, 2, 3" (defun decase (x) (destructuring-case x ((:foo a b) (format nil "foo: ~S, ~S" a b)) ((:bar &key a b) (format nil "bar, ~S, ~S" a b)) (((:alt1 :alt2) a) (format nil "alt: ~S" a)))) (decase (list :foo 1 2)) ; => "foo: 1, 2" (decase (list :bar :a 1 :b 2)) ; => "bar: 1, 2" (decase (list :alt1 1)) ; => "alt: 1" (decase (list :alt2 2)) ; => "alt: 2" (decase (list :quux 1 2 3)) ; =| error
|
(alexandria.0.dev:destructuring-ecase keyform &body clauses) | Function: DESTRUCTURING-CASE, -CCASE, and -ECASE are a combination of CASE and DESTRUCTURING-BIND. KEYFORM must evaluate to a CONS. Clauses are of the form: ((CASE-KEYS . DESTRUCTURING-LAMBDA-LIST) FORM*) The clause whose CASE-KEYS matches CAR of KEY, as if by CASE, CCASE, or ECASE, is selected, and FORMs are then executed with CDR of KEY is destructured and bound by the DESTRUCTURING-LAMBDA-LIST. Example: (defun dcase (x) (destructuring-case x ((:foo a b) (format nil "foo: ~S, ~S" a b)) ((:bar &key a b) (format nil "bar, ~S, ~S" a b)) (((:alt1 :alt2) a) (format nil "alt: ~S" a)) ((t &rest rest) (format nil "unknown: ~S" rest)))) (dcase (list :foo 1 2)) ; => "foo: 1, 2" (dcase (list :bar :a 1 :b 2)) ; => "bar: 1, 2" (dcase (list :alt1 1)) ; => "alt: 1" (dcase (list :alt2 2)) ; => "alt: 2" (dcase (list :quux 1 2 3)) ; => "unknown: 1, 2, 3" (defun decase (x) (destructuring-case x ((:foo a b) (format nil "foo: ~S, ~S" a b)) ((:bar &key a b) (format nil "bar, ~S, ~S" a b)) (((:alt1 :alt2) a) (format nil "alt: ~S" a)))) (decase (list :foo 1 2)) ; => "foo: 1, 2" (decase (list :bar :a 1 :b 2)) ; => "bar: 1, 2" (decase (list :alt1 1)) ; => "alt: 1" (decase (list :alt2 2)) ; => "alt: 2" (decase (list :quux 1 2 3)) ; =| error
|
(alexandria.0.dev:destructuring-ccase keyform &body clauses) | Function: DESTRUCTURING-CASE, -CCASE, and -ECASE are a combination of CASE and DESTRUCTURING-BIND. KEYFORM must evaluate to a CONS. Clauses are of the form: ((CASE-KEYS . DESTRUCTURING-LAMBDA-LIST) FORM*) The clause whose CASE-KEYS matches CAR of KEY, as if by CASE, CCASE, or ECASE, is selected, and FORMs are then executed with CDR of KEY is destructured and bound by the DESTRUCTURING-LAMBDA-LIST. Example: (defun dcase (x) (destructuring-case x ((:foo a b) (format nil "foo: ~S, ~S" a b)) ((:bar &key a b) (format nil "bar, ~S, ~S" a b)) (((:alt1 :alt2) a) (format nil "alt: ~S" a)) ((t &rest rest) (format nil "unknown: ~S" rest)))) (dcase (list :foo 1 2)) ; => "foo: 1, 2" (dcase (list :bar :a 1 :b 2)) ; => "bar: 1, 2" (dcase (list :alt1 1)) ; => "alt: 1" (dcase (list :alt2 2)) ; => "alt: 2" (dcase (list :quux 1 2 3)) ; => "unknown: 1, 2, 3" (defun decase (x) (destructuring-case x ((:foo a b) (format nil "foo: ~S, ~S" a b)) ((:bar &key a b) (format nil "bar, ~S, ~S" a b)) (((:alt1 :alt2) a) (format nil "alt: ~S" a)))) (decase (list :foo 1 2)) ; => "foo: 1, 2" (decase (list :bar :a 1 :b 2)) ; => "bar: 1, 2" (decase (list :alt1 1)) ; => "alt: 1" (decase (list :alt2 2)) ; => "alt: 2" (decase (list :quux 1 2 3)) ; =| error
|
ql-impl:defimplementation-case | Undocumented
|
(alexandria.0.dev:unwind-protect-case (&optional abort-flag) protected-form &body clauses) | Function: Like CL:UNWIND-PROTECT, but you can specify the circumstances that the cleanup CLAUSES are run. clauses ::= (:NORMAL form*)* | (:ABORT form*)* | (:ALWAYS form*)* Clauses can be given in any order, and more than one clause can be given for each circumstance. The clauses whose denoted circumstance occured, are executed in the order the clauses appear. ABORT-FLAG is the name of a variable that will be bound to T in CLAUSES if the PROTECTED-FORM aborted preemptively, and to NIL otherwise. Examples: (unwind-protect-case () (protected-form) (:normal (format t "This is only evaluated if PROTECTED-FORM executed normally.~%")) (:abort (format t "This is only evaluated if PROTECTED-FORM aborted preemptively.~%")) (:always (format t "This is evaluated in either case.~%"))) (unwind-protect-case (aborted-p) (protected-form) (:always (perform-cleanup-if aborted-p)))
|
(cffi-sys:canonicalize-symbol-name-case name) | Undocumented
|
(cis theta) | Function: Return cos(Theta) + i sin(Theta), i.e. exp(i Theta).
|
| Mentioned in: CLtL2 - 12.5.2. Trigonometric and Related Functions HyperSpec - Function CIS | |
(cos number) | Function: Return the cosine of NUMBER.
|
| Mentioned in: CLtL2 - 12.5.2. Trigonometric and Related Functions CLtL2 - 12.5.3. Branch Cuts, Principal Values, and Boundary Conditions in the Complex Plane HyperSpec - Function SIN, COS, TAN PCL - higher math | |
(acos number) | Function: Return the arc cosine of NUMBER.
|
| Mentioned in: CLtL2 - 12.1. Precision, Contagion, and Coercion CLtL2 - 12.5.2. Trigonometric and Related Functions CLtL2 - 12.5.3. Branch Cuts, Principal Values, and Boundary Conditions in the Complex Plane HyperSpec - Function ASIN, ACOS, ATAN PCL - higher math | |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| By Bill Moorier |