Announcement

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

  • Pointers to built-in functions

    Dear Statalist

    I have written a Mata function that accepts a pointer to a function. The code works fine with user-written functions, but i receive an error when referring to built-in functions, e.g.:

    dofunc(x,&sum())

    since "&sum()" returns a null pointer. I have also tried using findexternal, e.g.,

    findexternal("sum()")

    but this also returns a null pointer. Is there any way to pass a built-in function to a mata function?

    Thanks in advance,

    Barth

  • #2
    No. At Stata's command prompt, type
    Code:
    help m2_ftof
    and then click on the hyperlink Passing built-in functions

    Comment


    • #3
      Got it, thanks!

      Comment

      Working...
      X