Hello everyone

I have a very simple frustrating problem, for which I found a solution I don't understand, and I couldn't find a post about it anywhere so I am making one here so others can google and hopefully not was time figuring it out themselves.

Problem: using "*" as comments, within a section where ";" is set as delimiter, messes with some commands such that they make no output.
- i have just taken out the part of the code that doesn't work. Making graphs with several lines of code work as normal with "*"

1) Code that doesnt create any output:
Code:
#delimit ;
      
    * PREDICT FORECAST
            predict std_f, stdf;
        
#delimit cr
2) Code that works as normal
Code:
#delimit ;
      
    // PREDICT FORECAST
            predict std_f, stdf;
        
#delimit cr
I have seen posts on how complicated the commenting in stata can get, but not on this issue of "*" creating a problem like this.

I hope this post is not too trivial, but I would like to understand why (1) doesnt work.

Best regards,
Henrik