If newlisp does support this, it will save many time. e.g
Code: Select all
(define (check-checksum2 msg-length msg-body)                                                                                   
  (letn ((msg-checksum (append "0x" (pick-string msg-body (- msg-length 10) (- msg-length 8))))
         (checksum-value (cal-checksum (total msg-body 0 (- msg-length 10)))))
        (log (string checksum-value))
        (log (string (int msg-checksum)))
        (if (= checksum-value (int msg-checksum))
            (log (append "checksum is equal, received: " (string (int msg-checksum)) " calculated: " (string checksum-value)))
           (throw-error (append "checksum is wrong: " checksum-value)))))
Code: Select all
ERR: string expected in function append : checksum-value
called from user defined function Sign:check-checksum2
called from user defined function Sign:login
called from user defined function Sign:create-session
called from user defined function Sign:launch
called from user defined function create-sign
Is it possible to show error line number in newlisp?