[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: macro that uses local variables
From: |
Emanuel Berg |
Subject: |
Re: macro that uses local variables |
Date: |
Wed, 09 Aug 2023 23:02:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Heime wrote:
> In the context of a macro, the 'let' command should happen
> outside tho macro quote. With the quote expression in the
> body. Am I right ?
Why do you want to use a macro to begin with?
> (defmacro booster-velocity-change
> (specific-impulse initial-mass final-mass)
> "Compute change of velocity using rocket equation."
>
> (let ( (gravity 9.81) )
> `(* (* ,specific-impulse ,gravity)
> (log (mass-ratio ,initial-mass ,final-mass))) ))
Gets easier with a `defun', and then you can remove all the
complicated quoting as well ...
--
underground experts united
https://dataswamp.org/~incal