unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* macro that uses local variables
@ 2023-08-08  0:32 Heime
  2023-08-08  1:27 ` Emanuel Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Heime @ 2023-08-08  0:32 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

I am using the rocket equation in this macro.  I want to change it such that
the arguments are set as local variables.  How does one code that ?

(defmacro booster-velocity-change
    (specific-impulse standard-gravity initial-mass final-mass)

  "Compute change of velocity using rocket equation."

  `(* (* ,specific-impulse ,standard-gravity)
        (log (mass-ratio ,initial-mass ,final-mass))) )





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

end of thread, other threads:[~2023-08-09 21:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-08  0:32 macro that uses local variables Heime
2023-08-08  1:27 ` Emanuel Berg
2023-08-09  3:09   ` Heime
2023-08-09 21:02     ` Emanuel Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).