Skip to content

Adding a New Function to the Package

Alexandersax edited this page Aug 30, 2012 · 3 revisions

Congratulations on writing (or attempting to write) a new function!

Does your .ado file work? Excellent, all you need is a .sthlp help file and you're pretty much good to go.

Your help file allows a user to figure out how to use your wonderful function. It should have the .sthlp prefix and be written in smcl. It's an ugly language, but just use google and some existing help files and you can figure out how to write yours pretty quickly. Once you have your help file saved in the doc/ folder you're about 3 lines away from completely adding your function to the package.

##Update the .pkg file Go into the test folder (located in User/Alex/) and open the rti_egrma.pkg file. Add the line: f lib/myfunc.ado to load your function into the package, and the other line: f doc/myfunc.sthlp to load the help file.
pkg file Actually, you only needed those 2 lines. Congrats.

Once you've debugged and are production-ready, go ahead and promote it to the production folder.