monk Posted July 10, 2012 Posted July 10, 2012 (edited) In lisp what is the significance of backslash? For example for me to load a command from a DCL button I would write: (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 Edited July 10, 2012 by monk Quote
MSasu Posted July 10, 2012 Posted July 10, 2012 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). Quote
monk Posted July 10, 2012 Author Posted July 10, 2012 (edited) Ah i understand! But why for example does this not work? (action_tile "MKLINE" "(command line)(done_dialog)") Edited July 10, 2012 by monk Quote
MSasu Posted July 10, 2012 Posted July 10, 2012 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. [s](command line)[/s] (command "line") Quote
Lee Mac Posted July 10, 2012 Posted July 10, 2012 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 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.