Announcement

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

  • Did comment /* */ syntax change?

    Until recently, I would write do files using "/************************************/ at the beginning and end of a block of comments to make commands easier to read, but now the same syntax comments out all lines following the final "**/" . Now, I have to end the final line of the block with " */". That is, this doesn't work:

    Code:
    /*******************************************************************************/
    *save a dataset with non-centered variables
    /*******************************************************************************/
    save newfilename.dta,replace
    but this does:

    Code:
    /*******************************************************************************/
    *save a dataset with non-centered variables
    /****************************************************************************** */
    save newfilename.dta,replace

    Does anyone know the rationale for this change?

  • #2
    Although I cannot find the thread, I believe that this problem has been recently reported by somebody else in this Forum, and was acknowledged by StataCorp to be a bug. While it is on their to-do list to fix this, at least as of the latest update, the problem still remains.

    One thing I recall that was pointed out is that the problem is related to the parity of the number of asterisks, so you can work around by adding or removing one asterisk.

    Comment


    • #3
      Clyde, Thanks. Glad to learn I wasn't going crazy.

      Comment


      • #4
        That is a bug. Clyde may want to find this: https://www.statalist.org/forums/for...do-file-editor

        Comment


        • #5
          Thank you, Chen Samulsion , that is precisely the thread I was looking for!

          Comment


          • #6
            This was fixed in the 26 Feb 2025 update.

            Click image for larger version

Name:	Screenshot 2025-03-20 at 9.08.46 AM.png
Views:	1
Size:	146.0 KB
ID:	1774665
            -Chinh Nguyen

            Comment


            • #7
              That's great to know! Perhaps the update notes could have mentioned the fix?

              Comment

              Working...
              X