Re: automatically call functions based on arguments




Now, the presence of these digits is strange.  Couldn't they be
parameters to the functions?  Do you have a lot of them?

Sorry, those digits should be replaced with normal strings.
All those parameters have nothing to do with the parameters
of functions/macros, they are only related with their names.
Yes, maybe hundreds.



(defvar *name-to-function-map*
  '((aa func-aa)
    (bb func-bb)
    (cc func-cc)))

(defun call-function (name arguments)
   (let ((fun  (cdr (assoc name *name-to-function-map*))))
      (if fun
        (apply fun arguments)
        (error "No user function named ~S" name))))

(call-function 'aa 1 2)
(call-function (read) (read) (read))


This could be taken as a solution.
.



Relevant Pages

  • Re: What is the problem with this ?
    ... for all arithmetic calculations. ...   First, getting somebody to make you a prototype. ... digits but you would apparently be forced to represent large numbers ... according to some rule and the result stored in another register. ...
    (sci.electronics.design)
  • Re: automatically call functions based on arguments
    ... the presence of these digits is strange. ... those digits should be replaced with normal strings. ...   ' ...
    (comp.lang.lisp)
  • Re: TWO AMENDMENTS NEEDED IN MACRO - PLEASE HELP
    ... Excel 556987 - Page 1.xlsm ... the button then macro opens that file for me. ... one put 6 digits like "Excel " macro should not open the file and it ...
    (microsoft.public.excel.programming)
  • Re: solving two of nonlinear equations and two unknwons.
    ... Solves a nonlinear least squares problem subject to bounds on the ... digits, and f values in processing are: ... this would yield horribly wrong derivatives and hence chaotic ...
    (sci.math.num-analysis)
  • Re: OT: Got my stimulus money today!
    ... digits of your social security number and not by state. ... specifically put my direct deposit info on my unneeded tax form ...     If you had Direct Deposit ...
    (alt.fan.letterman)