anchor.diff:    (let* ((ode-vars  (numerica-model-ode-vars nm))
            (allvars (query var))
            (klen-pos  nil))
  -    
  +    (format t "~&; Writing model block")
       (format file "MODEL ~A~%~
                     ~2TPARAMETER~%~
                       ~4Tk as ARRAY("
  
positive.code:   (let ((*math-print-function* 'default-math-printer))
      (apply #'format stream string args)))
  
  (defun write-kvars (file nm)
    (let* ((name (numerica-model-kvars-name nm))
           (kvars-table (numerica-model-kvars nm))
           (kvars  (make-array (1- (hash-table-count kvars-table)))))
      (loop for kvar being the hash-keys of kvars-table
            for i being the hash-values of kvars-table
            unless (eq kvar :last-index)
            do (setf (svref kvars (1- i)) kvar))
      (format file "~A= [...~%" name)
      (with-print-context t
        (loop for k across kvars ;(numerica-model-kvars nm)
              for i = 1 then (1+ i)
              for k-dimension = k.dimension.(calculate-unit (numerica-model-base-units nm))
              for value = k.value
              if (math-expression-p value)
                 do (with-dimensionless-math (numerica-model-base-units nm)
                      (format file "     0,... % "))
                    (b-format file "[~A] ~S = ~S (calculated below)~%" i k value)
                 and collect (list i k) into dependent-vars
              else
                 do  (with-dimensionless-math (numerica-model-base-units nm)
                       (format file "     ~a,... %" (print-math value nil)))
                     (b-format file " [~A] ~A (~A)~% "
                               i k k-dimension)
              finally 
              ;; close off the matrix
              (format file "];~%" file)
              ;; write any dependent vars:
              (loop for (i k) in dependent-vars
                    do (with-dimensionless-math (numerica-model-base-units nm)
                         (format file "~A(~A)=~S;~%" name i k.value)))
              (format file "~%")))))
    
  
  ;;;
  
negative.code:     (let ((end (file-position file)))
        (file-position file klen-pos)
        (princ (numerica-model-kvar-count nm) file)
        (file-position file end))
      (format file "~%END~%~%")))
  
  
  (defun compute-display-var-indicies (nm)
  