[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Elisp function that performs numeric computations
From: |
fatiparty |
Subject: |
Elisp function that performs numeric computations |
Date: |
Thu, 20 Jan 2022 19:17:28 +0100 (CET) |
Jan 20, 2022, 10:52 by help-gnu-emacs@gnu.org:
> Jan 19, 2022, 23:29 by mbork@mbork.pl:
>
>>
>> (defun test (depth maxdepth rptdepth)
>>
>>> "Compute depth to use."
>>> (interactive)
>>>
>>> (let* ( (j rptdepth)
>>> (w (- maxdepth j))
>>> (p (+ w 1))
>>> (r (mod (- depth maxdepth 1) p) )
>>> (o (+ j r)) )
>>> o))
>>>
> I would like to adapt the function a little bit more. If depth <= maxdepth
> I want to set o=depth instead of performing the computation shown for the
> variable o.
>
> I would like to use an if statement to set o to depth. The current
> computation will
> go with the else statement. How does one go about using the let* construct
> in the
> else part of the conditional. Would I need to use a progn for this?
>
- Elisp function that performs numeric computations, (continued)
- Elisp function that performs numeric computations, fatiparty, 2022/01/19
- Re: Elisp function that performs numeric computations, Sergey Organov, 2022/01/20
- Elisp function that performs numeric computations, fatiparty, 2022/01/21
- Re: Elisp function that performs numeric computations, Emanuel Berg, 2022/01/21
- Re: Elisp function that performs numeric computations, Sergey Organov, 2022/01/21
- Re: Elisp function that performs numeric computations, Emanuel Berg, 2022/01/21
- Re: Elisp function that performs numeric computations, Sergey Organov, 2022/01/21
- Elisp function that performs numeric computations, fatiparty, 2022/01/21
- Re: Elisp function that performs numeric computations, Emanuel Berg, 2022/01/21
- Elisp function that performs numeric computations, fatiparty, 2022/01/21
- Message not available
- Elisp function that performs numeric computations,
fatiparty <=
- Re: Elisp function that performs numeric computations, Manuel Giraud, 2022/01/19
- Re: Elisp function that performs numeric computations, Eduardo Ochs, 2022/01/19
Re: Elisp function that performs numeric computations, Michael Heerdegen, 2022/01/19