Announcement

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

  • #16
    Originally posted by qing xuan View Post
    Now I understand, which means that in fact, an ado file has only one entry point, namely the function with the same name as the ado file. The other functions defined in the ado file are just some functional functions called by this function with the same name as the file, correct?
    Aside from terminology, you got the basic idea. On Statalist (and elsewhere when you talk about Stata) it is usually a good idea to use Stata's terminology to avoid misunderstanding. What you call functions are called programs in Stata. Stata has functions, too, but you cannot define your own functions. Aynway, an ado-file defines one or more programs (and it may define one or more Mata functions, but that's beyond the scope of my post). The main program, which could be called an entry point, must have the same name as the ado-file. All other programs in that ado-file are local subroutines, meaning they cannot be called from programs (or functions) outside of that ado-file. You can read more on this on just 52 pages in [P] 18.11 Ado-files.

    Comment


    • #17
      On this specific point, it suffices to read section 18.11.4 Local subroutines of the help file linked by Daniel in #16.

      Comment

      Working...
      X