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

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

Re: if/else execution in elisp


From: Barry Margolin
Subject: Re: if/else execution in elisp
Date: Fri, 18 Oct 2002 20:43:42 GMT

In article <mailman.1034973328.14861.help-gnu-emacs@gnu.org>,
ken  <ken@cleveland.lug.net> wrote:
>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.

It looks correct to me.  What's the problem you're having?

-- 
Barry Margolin, barmar@genuity.net
Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.


reply via email to

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