Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Backslash character does not collapse.

    The F&Q page https://www.stata.com/support/faqs/p...es-and-macros/ states that two consecutive backslashes collapse into a single backslash character. I am unable to reproduce the results shown in this link. When I enter the commands
    Code:
    local x3  "\\\"
    di "[`x3']"
    Stata returns the string "[\\\]"

  • #2
    Good question. Running the example code in the FAQ you link to on my system confirms your experience.
    Code:
    . local x1  "\"
    
    . local x2  "\\"
    
    . local x3  "\\\"
    
    . local x4  "\\\\"
    
    . 
    . di "[`x1']" 
    [\]
    
    . di "[`x2']" 
    [\\]
    
    . di "[`x3']" 
    [\\\]
    
    . di "[`x4']" 
    [\\\\]
    
    . 
    . about
    
    Stata/SE 17.0 for Mac (Apple Silicon)
    Revision 13 Oct 2022
    Perhaps someone else here will be able to update the advice from the FAQ.

    In any event, this is worth raising with Stata Technical Services at https://www.stata.com/support/tech-support/ since that FAQ is the first result returned by search backslash.

    Comment

    Working...
    X