From: steve-humphreys@gmx.com
To: Help Gnu Emacs <help-gnu-emacs@gnu.org>
Subject: Elisp - Elements in tlist is not being updated with the new values
Date: Sat, 19 Dec 2020 00:54:25 +0100 [thread overview]
Message-ID: <trinity-6cb02844-cf38-4980-a7f7-ce3dcd921207-1608335665679@3c-app-mailcom-bs02> (raw)
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 ))
reply other threads:[~2020-12-18 23:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=trinity-6cb02844-cf38-4980-a7f7-ce3dcd921207-1608335665679@3c-app-mailcom-bs02 \
--to=steve-humphreys@gmx.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.