Anonymous user
Integer comparison: Difference between revisions
Emacs Lisp: Improve solution
Not a robot (talk | contribs) (Add Draco) |
(Emacs Lisp: Improve solution) |
||
Line 1,352:
=={{header|Emacs Lisp}}==
<lang Lisp>(defun integer-comparison (a b)▼
▲(defun integer-comparison (a b)
"Compare A to B and print the outcome in the message buffer."
(interactive "nFirst integer ⇒\nnSecond integer ⇒")
Line 1,380 ⟶ 1,359:
((< a b) (message "%d is less than %d." a b))
((> a b) (message "%d is greater than %d." a b))
((= a b) (message "%d is equal to %d." a b))))</lang>
Invoke from within Emacs Lisp (or
Or, use <code>M-x integer-comparison
=={{header|Erlang}}==
|