cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
djhanson
Level V

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

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 ACCEPTED SOLUTION

Accepted Solutions
Craige_Hales
Super User

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

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

View solution in original post

1 REPLY 1
Craige_Hales
Super User

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

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