[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Executing part of the code instead of another
From: |
Christopher Dimech |
Subject: |
Re: Executing part of the code instead of another |
Date: |
Wed, 7 Oct 2020 15:48:51 +0200 |
It would be better if you explain to me this progn stuff
Have tried an example like this
(setq na 8)
(setq nb 13)
( if (> nb na)
progn (
(message "nb > na condition [condition is true]")
(message "nb > na condition [condition is true]")
)
progn (
(message "condition false")
(message "condition false")
)
)
> Sent: Wednesday, October 07, 2020 at 11:46 AM
> From: "Emanuel Berg via Users list for the GNU Emacs text editor"
> <help-gnu-emacs@gnu.org>
> To: help-gnu-emacs@gnu.org
> Subject: Re: Executing part of the code instead of another
>
> Gregory Heytings via Users list for the GNU Emacs text editor wrote:
>
> > In general you can do:
> >
> > (if [condition]
> > (progn
> > [multiple statements of the "then" part])
> > [multiple statements of the "else" part"])
>
> And the value returned, if condition, is the one of
> the last one in the "then" or progn part - the
> nth one!
>
> There is also a `prog1'!
>
> But no prog2 :(
>
> --
> underground experts united
> http://user.it.uu.se/~embe8573
> https://dataswamp.org/~incal
>
>
>
- Re: Executing part of the code instead of another, (continued)
- Re: Executing part of the code instead of another, Gregory Heytings, 2020/10/07
- Re: Executing part of the code instead of another, Emanuel Berg, 2020/10/07
- Re: Executing part of the code instead of another, Robert Pluim, 2020/10/07
- Re: Executing part of the code instead of another, Emanuel Berg, 2020/10/07
- Re: Executing part of the code instead of another, Robert Pluim, 2020/10/07
- Re: Executing part of the code instead of another, Stefan Monnier, 2020/10/07
- Re: Executing part of the code instead of another, Robert Pluim, 2020/10/07
- Re: Executing part of the code instead of another,
Christopher Dimech <=
- Re: Executing part of the code instead of another, tomas, 2020/10/07
- Re: Executing part of the code instead of another, Christopher Dimech, 2020/10/07
- Re: Executing part of the code instead of another, Leo Butler, 2020/10/08
- RE: Executing part of the code instead of another, Drew Adams, 2020/10/07
- Re: Executing part of the code instead of another, Douglas Lewan, 2020/10/18