Subscribe Bookmark RSS Feed

What's the forward slash ("/") escape sequence for quoted strings?

djhanson

Community Trekker

Joined:

Jun 23, 2011

Hi All, I know the JSL backslash escape sequence for quoted strings is \!\.  But what is the equivalent escape sequence for a forward slash?  Does one even exist in JSL?  I did not see any references in the JSL scripting guide (p. 85).  thx, dj

1 REPLY
Craige_Hales

Staff

Joined:

Mar 21, 2013

There is a "ignore almost everything" escape that might be useful.


Write( "\!U263Atest\!U263A\[


  anything " goes ' \ here \!n \!U263A


  except square-bracket back-slash


]\\!U263Atest\!U263A" );




☺test☺

  anything " goes ' \ here \!n \!U263A

  except square-bracket back-slash

☺test☺

Note the smile face characters from the Unicode escape \!U263A work outside of the \[ ... ]\ part of the string but not inside.  The two adjacent back slashes in the last line are doing two different jobs; one belongs with the square bracket and one with the Unicode escape.  And, of course, if you leave out the ]\, the rest of your JSL will be part of the un-terminated string, causing an error.  Keep the string on one line and the editor's syntax coloring will work better too.

Craige