Author Topic: How to detect number of input-arguments?  (Read 937 times)

0 Members and 1 Guest are viewing this topic.

d2010

  • Bull Frog
  • Posts: 326
How to detect number of input-arguments?
« on: August 02, 2021, 10:10:59 AM »
First I got load function/s inside pp_topoxcad.lsp,
-->after  I  load entire program.lisp.
How  to  count  number  of  argument?>
E.g (sudowget "dfn_var_isdefun") --> 1
     (sudowget  "The function is undefined") -->(-1978)
 :whistling:

Code: [Select]
(Defun dfn_var_isdefun (a111 / rr ao bo co) ;_ASSERT_OK
 (setq co (type a111) bo (quote STR)
        a111 (if (= bo co)  (eval (read a111)) a111)
        bo (quote SYM) a111 (if (= bo co) (eval a111)  a111)
        co (type a111) ao (type dfn_var_isdefun)
        rr (if (= co ao) 1 0))
 (if (< rr 1) (setq ao (quote SUBR) rr (if (= co ao) 2 rr)))
 (if (< rr 1) (setq ao (quote USUBR) rr (if (= co ao) 3 rr)))
 rr)

Code: [Select]
"lsp_var_islista":L=NotFound
"poalr":L=NotFound
"pp_cads_detaspara_trigtriunghibvls":L=NotFound
"const_dxfpointlist":L=NotFound
"str_trimlefteft":L=NotFound
"pp_purge_linebackpline_multe":L=NotFound
"pp_util_dupdelbw":L=NotFound
"pp_util_blockreplace_sbdd":L=NotFound
"dfn_dcl_i_savea":L=NotFound
"pp_cads_gknomec_a4":L=NotFound
"acad_strlsort":L=NotFound("0" nil nil nil)
« Last Edit: August 03, 2021, 04:39:55 PM by d2010 »

mhupp

  • Bull Frog
  • Posts: 250
Re: How to detect number of input-arguments?
« Reply #1 on: August 02, 2021, 03:16:23 PM »
Anything before the / needs to be passed to the function for it to work properly. so a111 needs to be passed to the function.
(Defun dfn_var_isdefun "what ever a111 is needs to be put here")