anchor.diff:  ;;;;****************************************************************************
   
   (in-package "COMMON-LISP-USER")
  -(declaim (declaration also-use-packages))
  -(declaim (also-use-packages "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.ISO3166"))
   (defpackage "COM.INFORMATIMAGO.COMMON-LISP.BANK.IBAN"
     (:use "COMMON-LISP"
           "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.UTILITY"
           "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.LIST"
  -        "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.STRING")
  +        "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.STRING"
  +        "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.ISO3166")
     (:export "GET-AND-CHECK-ALPHANUM" "COMPUTE-IBAN-KEY" "CHECK-IBAN-KEY"
  -           "GET-IBAN" "GET-KEY" "GET-COUNTRY-CODE" "SET-IBAN" "GET-IBAN" "GET-KEY"
  -           "GET-COUNTRY-CODE" "CHECK-COUNTRY" "BASIC-FORM" "IBAN" "IBAN-ERROR")
  +           "GET-IBAN" "GET-KEY" "GET-COUNTRY-CODE" "SET-IBAN" 
  +           "CHECK-COUNTRY" "BASIC-FORM" "IBAN" "IBAN-ERROR")
     (:documentation "
   This class is an Internationnal Bank Account Number, 
   according to the European standard:
  
positive.code: RAISE:  IBAN-ERROR 
  RETURN: SELF
  "
    (let ((cc  (subseq (basic-form self) 0 2)))
      (unless (member cc +country-codes+ :test (function string-equal))
        (signal 'iban-error :format-control "For IBAN ~S:~%   Bad country code: ~S"
                :format-arguments (list self cc))))
    self)
  
  
  
negative.code: 
  (defmethod get-and-check-alphanum ((self iban) string &optional length)
    (when (and length (/= length (length string)))
      (error 'iban-error
             :format-control "For IBAN ~S:~%   Bad length,  expected ~D, got ~D: ~S" 
             :format-arguments (list self length (length string) string)))
    (map 'string (lambda (ch) 
                   (let ((index (position ch +alphabet-from+)))
                     (unless index 
                       (error 'iban-error
                              :format-control "For IBAN ~S:~%    Bad character '~C' in ~S, ~
                                should be alphanumeric."
                              :format-arguments (list self ch string)))
                     (aref +alphabet-from+ (if (< index 36) index (- index 26)))))
         string))
  
  
  (defun country-codes ()
    "Returns a list of 2-letter country codes."
    (mapcar (function first)
            (get-countries :only-existing t)))
  
  (defparameter *country-codes* (country-codes)
    "List of 2-letter country codes.")
  
  
  