all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Understanding the "let" construct and the setting of variables
@ 2020-12-17  0:10 steve-humphreys
  2020-12-17  0:21 ` Joost Kremers
                   ` (2 more replies)
  0 siblings, 3 replies; 50+ messages in thread
From: steve-humphreys @ 2020-12-17  0:10 UTC (permalink / raw)
  To: Help Gnu Emacs

I have been writing some elisp to set the time grid in the agenda.
The discussion progressed towards the use of the "let" construct.

But, the discussion got too advanced for me to follow the different
points of view and make a decision.

This message is for showing some examples, of how to set and use variables
in a "let", because people criticise using "setq".  But discussion needs
simple examples  that would not overwhelm a relative beginner.

(defun timfutur ()
   (interactive)
   (setq tim 845)
   (setq tsk 80)

   (setq thr (/ tim 100))
   (setq tmn (- tim (* thr 100)))

   (setq tinc_mn (+ tmn tsk))
   (setq tinc_hr (/ (+ tmn tsk) 60))
   (setq tinc_mn (- tinc_mn (* tinc_hr 60)) )

   (setq thr_futur (* (+ thr tinc_hr) 100)  )
   (setq tmn_futur tinc_mn)
   (setq tim_out (+ thr_futur tmn_futur))







^ permalink raw reply	[flat|nested] 50+ messages in thread

end of thread, other threads:[~2020-12-20  5:19 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-17  0:10 Understanding the "let" construct and the setting of variables steve-humphreys
2020-12-17  0:21 ` Joost Kremers
2020-12-17  2:08   ` steve-humphreys
2020-12-17  3:12     ` steve-humphreys
2020-12-17  8:01       ` Joost Kremers
2020-12-17  8:31         ` steve-humphreys
2020-12-17  8:50           ` Joost Kremers
2020-12-17  8:10     ` Joost Kremers
2020-12-17  8:43       ` steve-humphreys
2020-12-17  8:56         ` Joost Kremers
2020-12-18 20:48           ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-18 20:46         ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-18 21:07           ` Jean Louis
2020-12-18 22:31           ` tomas
2020-12-18 20:39       ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-17  2:49   ` steve-humphreys
2020-12-17  7:58     ` Joost Kremers
2020-12-17 16:55       ` Drew Adams
2020-12-17 20:11         ` steve-humphreys
2020-12-17 21:57           ` Drew Adams
2020-12-17 22:35           ` Michael Heerdegen
2020-12-18  9:01             ` tomas
2020-12-18  9:16               ` Michael Heerdegen
2020-12-18 20:55                 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-19  2:17                   ` Michael Heerdegen
2020-12-19  2:52                     ` Drew Adams
2020-12-19  5:15                     ` Stefan Monnier
2020-12-18 20:33   ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-17  0:25 ` steve-humphreys
2020-12-17  0:35   ` steve-humphreys
2020-12-17  1:05     ` Joost Kremers
2020-12-17  1:20       ` steve-humphreys
2020-12-18 20:58         ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-17  4:34   ` Jean Louis
2020-12-17  5:12     ` steve-humphreys
2020-12-19  6:06       ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-17  7:31     ` steve-humphreys
2020-12-19  5:55     ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-19  6:49       ` Jean Louis
2020-12-20  5:19         ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-18 17:14   ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-18 17:48     ` tomas
2020-12-18 15:33 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-18 18:12   ` Jean Louis
2020-12-18 18:20     ` Drew Adams
2020-12-18 18:45       ` Jean Louis
2020-12-18 19:16         ` Drew Adams
2020-12-18 20:00           ` Jean Louis
2020-12-18 21:27     ` Christopher Dimech
2020-12-19  6:23     ` Emanuel Berg via Users list for the GNU Emacs text editor

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.