Announcement

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

  • Is possible to write comment in the same line as the code?

    In most programming languages, this is possible. For example, in Python, I would write
    x=1 #x is a good variable
    And anything after # in that line is commented out, and anything before is executed. Is such a thing possible in Stata using * or an alternative?

  • #2
    Code:
    gen x = 1 // x is a good variable
    See
    Code:
    help comments
    Last edited by Hemanshu Kumar; 15 Nov 2022, 12:22.

    Comment


    • #3
      Originally posted by Hemanshu Kumar View Post
      Code:
      gen x = 1 // x is a good variable
      See
      Code:
      help comments
      Thank you so much! I've been doing it wrong for YEARS!

      Comment

      Working...
      X