明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1179|回复: 4

下面的子函数为什么在主程序里调用不了!

[复制链接]
发表于 2009-4-28 13:11:00 | 显示全部楼层 |阅读模式
下面的子函数为什么在主程序里调用不了!
在主程序里如下调用 (setq lts (numchk no))
提示:错误: no function definition: NUMCHK

(defun numchk (str1 /  stn stw st isn lt str n n0 l ls)
    (setq lt ($numchk str1))
    (cond ((not lt) (princ "\n**文字中没有数字,只能作一般拷贝!"))
      ((> (setq l (length lt)) 3)
       (initget 6)
       (setq n0 (fix (/ l 2))
         n  (getint
              (strcat "\n编号中有"
                  (itoa n0)
                  "个数字,请输入左起第几个数字要排序号 <全部>: "
              )
            )
         n  (cond ((not n) 0)
              ((> n n0) n0)
              (n)
            )
       )
      )
      ((setq n 1))
    )
    (if    lt
      (cons n lt)
    )
  )
发表于 2009-4-28 13:28:00 | 显示全部楼层
是不是 $numchk,这个函数多了个$
 楼主| 发表于 2009-4-28 14:35:00 | 显示全部楼层
不行呀!
我为了试验将
(defun numchk ()
alert("**********")
)
在主程序里如下调用 (numchk)
照样提示:错误: no function definition: NUMCHK
发表于 2009-4-28 15:55:00 | 显示全部楼层

怪事,我调试可以通过。估计不是子函数问题。

发表于 2009-4-28 16:07:00 | 显示全部楼层

(defun c:xxx (/ x x x NUMCHK)

是否有上面的现象

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-9-23 04:36 , Processed in 1.012584 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表