Mathematica “\<…\>” syntax

In an answer to another SO question, passing mention was made to a Mathematica string escape syntax that looks like this: "\<...>". Apparently, this syntax is useful for dealing with embedded newlines in strings. I've tried searching for documentation using various terms in the Mathematica help browser (and Google), but to no avail. Where can I find documentation on this syntax?

Answer Summary

@Mark points out that the construct is documented in Section 2.8.6 of the V5 Mathematica book. It is also mentioned in Section 2.8.7 of the V5.2 Mathematica Book. In both of those locations, the documentation states that Mathematica ignores line breaks and following tabs in strings -- unless they are enclosed between \ and \> in which case the line breaks (but not tabs) are retained.

In the corresponding section of the V6 documentation, it states that line breaks are retained in strings. Therefore, it appears that the escape syntax is no longer needed starting in V6 -- and is therefore no longer documented.

Note that many notebooks still use this syntax internally, even in V8. @Alexey points out that the cell expressions for strings that contain line breaks still use the syntax.

12
задан Community 23 May 2017 в 12:02
поделиться