Wabba
  Home FAQ Contact Sign in
 
Advanced search
MATCHING GROUPS



more...
POPULAR GROUPS

more...

found 8 articles for 0.000 sec
Re: Elisp: Simple function to Add Two Numbers     

Group: gnu.emacs.help · Group Profile · Search for Wabba in gnu.emacs.help
Author: Edward Dodge
Date: Aug 28, 2006 17:18

... <barmar@alum.mit.edu> writes: Yes, the function returns a value. But your command never displays the value anywhere, and M-x doesn't automatically display the return value of functions. Use (print (+ jabba wabba)) and it will be displayed in the echo area. That was it! Thank-you very much! -- Edward Dodge __o _`\(,_ (_)/ (_) --- ---
Show full article (0.40Kb) · Show article thread
Re: Elisp: Simple function to Add Two Numbers     

Group: gnu.emacs.help · Group Profile · Search for Wabba in gnu.emacs.help
Author: Barry Margolin
Date: Aug 27, 2006 18:50

... an error by rewriting it: (defun ekd-average (jabba wabba) "Adds two numbers and returns the difference between" (interactive "nFirstvar: \nnSecondvar: ") (eval ( + jabba wabba))) You don't need eval. Now the ...automatically display the return value of functions. Use (print (+ jabba wabba)) and it will be displayed in the echo area....
Show full article (1.40Kb) · Show article thread
Re: Elisp: Simple function to Add Two Numbers     

Group: gnu.emacs.help · Group Profile · Search for Wabba in gnu.emacs.help
Author: Edward Dodge
Date: Aug 27, 2006 18:39

...And I have managed to keep the function from causing an error by rewriting it: (defun ekd-average (jabba wabba) "Adds two numbers and returns the difference between" (interactive "nFirstvar: \nnSecondvar: ") (eval ( + jabba wabba))) Now the only problem is this: it returns no answer when I run it. I thought lisp ...
Show full article (0.90Kb) · Show article thread
Re: Elisp: Simple function to Add Two Numbers     

Group: gnu.emacs.help · Group Profile · Search for Wabba in gnu.emacs.help
Author: David Kastrup
Date: Aug 27, 2006 15:12

... I try to run this simple, straight-forward code? (defun ekd-average (jabba wabba) "Adds two numbers and returns the sum." (interactive "nFirstvar: \nn Secondvar: \nr") ( + jabba wabba)) Because the arguments would need to be (jabba wabba region-start region-end) You are aware what the final "r" in your interactive spec means?...
Show full article (0.51Kb) · Show article thread
Re: Elisp: Simple function to Add Two Numbers     

Group: gnu.emacs.help · Group Profile · Search for Wabba in gnu.emacs.help
Author: Magnus Henoch
Date: Aug 27, 2006 14:55

... of arguments" every time I try to run this simple, straight-forward code? (defun ekd-average (jabba wabba) "Adds two numbers and returns the sum." (interactive "nFirstvar: \nn Secondvar: \nr") ( + jabba wabba)) The trailing "r" in the interactive string means to give the region as argument to the function, in the...
Show full article (0.53Kb) · Show article thread
Re: Elisp: Simple function to Add Two Numbers     

Group: gnu.emacs.help · Group Profile · Search for Wabba in gnu.emacs.help
Author: Pascal Bourguignon
Date: Aug 27, 2006 14:55

... arguments" every time I try to run this simple, straight-forward code? (defun ekd-average (jabba wabba) "Adds two numbers and returns the sum." (interactive "nFirstvar: \nn Secondvar: \nr") ( + jabba wabba)) As a fellow beginner I would say its because you havent properly specified your second argument ...
Show full article (1.09Kb) · Show article thread
Re: Elisp: Simple function to Add Two Numbers     

Group: gnu.emacs.help · Group Profile · Search for Wabba in gnu.emacs.help
Author: Hadron Quark
Date: Aug 27, 2006 14:47

... of arguments" every time I try to run this simple, straight-forward code? (defun ekd-average (jabba wabba) "Adds two numbers and returns the sum." (interactive "nFirstvar: \nn Secondvar: \nr") ( + jabba wabba)) As a fellow beginner I would say its because you havent properly specified your second argument string in ...
Show full article (0.47Kb) · Show article thread
Elisp: Simple function to Add Two Numbers     

Group: gnu.emacs.help · Group Profile · Search for Wabba in gnu.emacs.help
Author: Edward Dodge
Date: Aug 27, 2006 14:25

Please, Why do I get "wrong number of arguments" every time I try to run this simple, straight-forward code? (defun ekd-average (jabba wabba) "Adds two numbers and returns the sum." (interactive "nFirstvar: \nn Secondvar: \nr") ( + jabba wabba)) -- Edward Dodge __o _`\(,_ (_)/ (_) --- ---
Show full article (0.34Kb)