[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Elisp - Elements in tlist is not being updated with the new values
From: |
steve-humphreys |
Subject: |
Elisp - Elements in tlist is not being updated with the new values |
Date: |
Sat, 19 Dec 2020 00:54:25 +0100 |
Am trying to use more let constructs. The problem is that the elements in tlist
is not being updated with the new values.
(defun timgrid (tstr tend tpd)
(let* ( (timu tstr) (tfr tstr)
(tlist (list tstr))
(frc (/ 60.0 (float tpd)))
(cnt (* (/ (float (- tend tstr)) 100.0) frc))
(i 0) (k 0))
;; ----- body of let -----
(message "frc: %f" frc)
(message "cnt: %f %d" cnt (truncate cnt))
(message "tlist: %s" tlist)
(dotimes (i (truncate cnt))
(let* ( (tfr (typh-timfutur timu tpd))
(timu tfr) )
;; ----- body of let -----
(setq k (+ k 1))
(when (string-equal lgfun "t")
(message "Iteration: %d %d %d %d" k timu tpd tfr))
(setq tlist (append tlist (list tfr))) ))
(message "%s" "* timgrid")
(message "tlist: %s" tlist)
tlist ))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Elisp - Elements in tlist is not being updated with the new values,
steve-humphreys <=