Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: AW: st: Stata Inbuilt commands


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: AW: st: Stata Inbuilt commands
Date   Fri, 9 Oct 2009 11:43:54 +0100

Quite correct. For those like Sergiy who want all the complications laid out: some Mata code is given in uncompiled form _as well as_ being bundled up with the executable in its compiled form. 

Nick 
[email protected] 

Sergiy Radyakin

a lot of the source code for Mata procedures is actually available and
is shipped together with the ado files. I am not sure that this is the
official Stata policy to keep the Mata code open (not the C code!) but
my installation of Stata 11 contains 314 files with .mata extension
which actually contain the code that was compiled into the Mata
libraries. I believe the situation was the same with Stata 10, etc.
They are an excellent source of examples of Mata capabilities as well
as hints for hidden/not-described features.

On Thu, Oct 8, 2009 at 12:06 PM, Nick Cox <[email protected]> wrote:

> Martin and Maarten [NB] have already explained that the code for inbuilt
> functions and commands is not visible to users. Such inbuilt commands
> are coded in C or Mata and the code compiled; the C or Mata source code
> remains inaccessible and firmly within StataCorp.
>
> -invnorm()- and -uniform()- and their successors are cases in point.
> There is nothing for such functions that users can see inside.
>
> What Victor may be thinking of here is -viewsource- or -source-:
>
> [P]     viewsource  . . . . . . . . . . . . . . . . . . . . . View
> source code
>        (help viewsource)
>
> [M-1]   source  . . . . . . . . . . . . . . . . . . .  Viewing the
> source code
>        (help [M-1] source)
>
> Book    . . . . . . . . . . . . . . . . . . . . . . .  Thirty-three
> Stata Tips
>        . . . . . . . . . . . . . . . . . . . . H. Joseph Newton and N.
> J. Cox
>        http://www.stata.com/bookstore/tips.html
>
> SJ-6-1  pr0022  . . . . . . . . . . . Stata tip 30: May the source be
> with you
>        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  N.
> J. Cox
>        Q1/06   SJ 6(1):149--150                                 (no
> commands)
>        tip for using viewsource to locate and view source
>        code or text files
>
> However, "source code" in the descriptions above is a strict subset of
> the entire source code, i.e. ado files and uncompiled Mata code. To
> repeat, the compiled source code is only visible through joining
> StataCorp as a developer.

> Victor M. Zammit
>
> Thank you very much,Martin and Mateen foryour help.I will take a look at
> the sources that you have referred me to.However,some couple of years
> ago,there was the same query and someone suggested some ado file that
> reveals the code that is implied by functions such as
> invnorm(uniform()).I know I had saved that suggestion,but since then the
> computer that I was using had broken down and got lost.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index