乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 98|回复: 4

[编程交流] What does Backslash "\" mean?

[复制链接]

12

主题

61

帖子

49

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
60
发表于 2022-7-6 07:45:30 | 显示全部楼层 |阅读模式
In lisp what is the significance of backslash? For example for me to load a command from a DCL button I would write:
 
  1. (action_tile "MKLINE" "(command "line")(done_dialog)")
 
I have had a look around and most people say that the character after the backslash is not taken into account?! I am a little foggy.
 
Thanks
回复

使用道具 举报

35

主题

2471

帖子

2447

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
174
发表于 2022-7-6 08:01:21 | 显示全部楼层
Is used in pair with following character to add special characters to strings. The ACTION_TILE function accept a string argument - therefore "\"" allow you to incluse the " character in string. Other examples: "\t" (tab), "\n" (new line) or "\\" (backslash).
回复

使用道具 举报

12

主题

61

帖子

49

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
60
发表于 2022-7-6 08:23:25 | 显示全部楼层
Ah i understand!
 
But why for example does this not work?
 
  1. (action_tile "MKLINE" "(command line)(done_dialog)")
回复

使用道具 举报

35

主题

2471

帖子

2447

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
174
发表于 2022-7-6 08:38:11 | 显示全部楼层
There are two errors on that excerpt (by the way, please edit your posts to add code tags).

    • The call of command is not allowed while the dialog is still open.
    • The name of command must be provided as a string.

      1. [s](command line)[/s](command "line")


回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 09:00:16 | 显示全部楼层
I've attempted to explain the use of the backslash many times...
 
http://www.cadtutor.net/forum/showthread.php?66989-Highligting-a-selection&p=459873&viewfull=1#post459873
http://www.cadtutor.net/forum/showthread.php?60935-Help-troubleshooting-LISP-to-insert-titleblock&p=413743&viewfull=1#post413743
http://www.cadtutor.net/forum/showthread.php?59341-Custom-Block-Inserts&p=402387&viewfull=1#post402387
http://www.theswamp.org/index.php?topic=41033.msg462429#msg462429
http://www.theswamp.org/index.php?topic=40111.msg453823#msg453823
http://forums.augi.com/showthread.php?131845-importing-layer-states-via-quot-layerstate-import-quot-function&p=1136714&viewfull=1#post1136714
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-9 21:53 , Processed in 1.190475 second(s), 62 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表