all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Elisp - Elements in tlist is not being updated with the new values
@ 2020-12-18 23:54 steve-humphreys
  0 siblings, 0 replies; only message in thread
From: steve-humphreys @ 2020-12-18 23:54 UTC (permalink / raw)
  To: Help Gnu Emacs

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 ))




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-18 23:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-18 23:54 Elisp - Elements in tlist is not being updated with the new values steve-humphreys

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.