help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cond construct for situation when a variable is t


From: Emanuel Berg
Subject: Re: cond construct for situation when a variable is t
Date: Sun, 20 Aug 2023 00:04:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Heime wrote:

> How can I use the 'cond' construct for the case when
> a variable is 't' ?

It could look like this but in practice one would probably put
it in another way, that looks better.

(setq var nil)

(cond
  (var       1)
  ((not var) 0) )

> I can set a variable to boolean true using (setq var t), am
> I right ?

You can, you totally can. Just don't `setq' t to anything ;)

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]