From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: steve-humphreys@gmx.com Newsgroups: gmane.emacs.help Subject: Elisp - Elements in tlist is not being updated with the new values Date: Sat, 19 Dec 2020 00:54:25 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34310"; mail-complaints-to="usenet@ciao.gmane.io" To: Help Gnu Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 19 00:54:56 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kqPaK-0008qK-Mf for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 19 Dec 2020 00:54:56 +0100 Original-Received: from localhost ([::1]:60534 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqPaJ-0003Um-PU for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 18 Dec 2020 18:54:55 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59662) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqPZt-0003Ue-GV for help-gnu-emacs@gnu.org; Fri, 18 Dec 2020 18:54:29 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:42449) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqPZr-0006Ti-KI for help-gnu-emacs@gnu.org; Fri, 18 Dec 2020 18:54:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1608335665; bh=zRpDSW2P92pYsHzvx/1g23pFel2sCWDsNB4FTQeeXkk=; h=X-UI-Sender-Class:From:To:Subject:Date; b=LLdvrCWd2eGhX0okczNMm3F+YM1Qkx+HrmWQtpa3AXFs7aMIEnCFi2ycyg/FitDHN 5PnSRJK8yocEB2WEa+DyG9Yqa/trYWFrC8q92mrUkLGBk5/1sP3iQcam8m/ZAJHAev BtKf5S6sXBKcf45ZYhj9lorWkx820+xZyACwDxB0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs02.server.lan [172.19.170.129]) (via HTTP); Sat, 19 Dec 2020 00:54:25 +0100 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:4OPgWUdt3qcVp/FE2MTBxmal+xVapMZRqsUl2nVTef6GAh20OKTP3JNKUmhDp0mMaLZOU TK6+zMorADpujehHj6fD7PV/G49+yxZ2qgRJBLJKxmsABYtqQ/9Q1NiqzkxA4uF+VFTd3aq8JIqf nFGYFIvgL6QDXjbqJivgC4Myj5UgJReRuLcC367+jjKKrtocyHxlxMSgqCd20S12OzR1oxEpQLGz ZB9BW498uY2Ns2G2YEacrjJ6y+ogTHwrfjIOWmJAHODUTdFpXyyzw+/fDqOBKv5xqmTUgFeqQWKE s0= X-UI-Out-Filterresults: notjunk:1;V03:K0:bZg8ng155UQ=:rqtrf1ti5S15lKp2fE7r8Q qcPAmBgBDczE1LaMEmKhzarAl5s+v0KLDlvHUn/a0hE3grYGnNlYERu+yDxtKK6uOAJ7hgxrn UTf2GOrRHuLRrpZ5ugab80HETI5yraw8FqtYVYZpGdRoBIpGQBnc/SfhO9YFv8ggirmiGwgnQ asgFmsGQSPTGRNwaIapdmyv1oVWTCey4I68h3G982bHjPi0l2uW0Ep3SLiXdi6hfV/7OvTusx i+uYARHlfqlVGz9eWxaxVsZc1Dcy0S4CAeelBoMHUGZ2QY1cwxju8DJCKMwdA2p8M2hlRbVM/ rTR2DTsMx/61B23Uib7s7Y1TOk2+RshOz2MBG0BuoSVgJZfIH3FqYH0zYAe8V3+YPUL44h/Ew BinR/8a3JQkp1jeDPiwBJwKchdSme4JV8jbOIDtjJHnItoYFiosMK/98Hk82y+lDtIANEGaNj XM8nYB4RmyNu7/NZ5sLNP9wpTgRVIqoHKTJGw27QgzVtcRLuvJZbuc6DUN0V+fNBahEWsBkQ9 Y5IVaRpGJS8Hboeo84DSjGuKS0TRiLsdWbR2zKCNeCu/ibOTg3yGnQSJrntzYRUPQBZCfrKZ9 7KYywBV2KA8bE= Received-SPF: pass client-ip=212.227.15.18; envelope-from=steve-humphreys@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:126538 Archived-At: 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 ))