birdsky 发表于 2011-10-26 16:32:35

请教read的用法

本帖最后由 birdsky 于 2011-10-26 16:33 编辑

输入命令: (read "hello there")

返回:HELLO

为什么返回的是HELLO而不是“HELLO”? 很困惑?

cnks 发表于 2011-10-26 16:55:54

http://www.mjtd.com/object/autolisp/ALR.default.190.htm
多看帮助,善用搜索

byghbcx 发表于 2011-10-26 16:59:11

为什么困惑,read函数就是这样设计的, 返回的HELLO是sym,要字符串,可以用vl-princ-to-string 再转一下,或直接从"hello there"用字符串处理函数得到"hello"

birdsky 发表于 2011-10-26 18:20:13

谢谢楼上两位,学习了,谢谢!
页: [1]
查看完整版本: 请教read的用法