Macaulay2 » Documentation
Packages » Macaulay2Doc > The Macaulay2 language > strings and nets > String > "
next | previous | forward | backward | up | index | toc

" -- delineate a string with quotation marks

This method for entering a string involves the use of backslashes as escape characters.

      \n             newline
      \f             form feed
      \r             return
      \\             \ 
      \"             "
      \a             audible bell
      \b             backspace
      \e, \E         escape
      \t             tab
      \v             vertical tab
      \nnn           ascii character with octal value nnn
      \xnn           ascii character with hex value nn
      \unnnn         unicode character with hex value nnnn, encoded with utf-8
i1 : x = " \" \f \r \\ \a\b\e\E\t\v \013 \x0b \u4f60 ";
i2 : ascii x

o2 = {32, 34, 32, 12, 32, 13, 32, 92, 32, 7, 8, 27, 27, 9, 11, 32, 11, 32,
     ------------------------------------------------------------------------
     11, 32, 228, 189, 160, 32}

o2 : List
i3 : utf8 x

o3 = {32, 34, 32, 12, 32, 13, 32, 92, 32, 7, 8, 27, 27, 9, 11, 32, 11, 32,
     ------------------------------------------------------------------------
     11, 32, 20320, 32}

o3 : List

See also