unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* if/else execution in elisp
@ 2002-10-17 13:08 ken
  0 siblings, 0 replies; 6+ messages in thread
From: ken @ 2002-10-17 13:08 UTC (permalink / raw)



This should be simple.  It is in every other language I've ever used.  
Here's an if/else:

  (if (> lb 5)
      (setq hh (+ 2 hh)  lb (+ 4 lb))		; if true
	    (setq hh (+ 1 hh) lb (+ 3 lb))	; if false
	    )

What I'm trying to do should be obvious.  If not:

If lb is greater than 5, increment hh and lb by 2 and 4 respectively.
If not, increment hh and lb by 1 and 3 respectively.


Appreciated.

-- 
AMD crashes?  See http://cleveland.lug.net/~ken/amd-problem/.

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

end of thread, other threads:[~2002-10-22  4:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.1034973328.14861.help-gnu-emacs@gnu.org>
2002-10-18 20:43 ` if/else execution in elisp Barry Margolin
2002-10-20 19:36   ` ken
2002-10-20 21:35     ` Ehud Karni
     [not found]     ` <mailman.1035149738.4225.help-gnu-emacs@gnu.org>
2002-10-21 20:10       ` Barry Margolin
2002-10-22  4:51         ` Miles Bader
2002-10-17 13:08 ken

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).