Skip to content

Commit

Permalink
Adding devtools_demo.ado
Browse files Browse the repository at this point in the history
  • Loading branch information
George Vega committed Apr 7, 2014
1 parent bc4788a commit 7ad7d28
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions devtools_demo.ado
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
program define devtools_demo

syntax anything(name=which)

noisily {
di ""
di "{txt}------------"
di " begin demo"
di "------------"
capture noi demo_`which'
di "{txt}------------"
di " end demo"
di "------------"
di ""
}

end

program define demo_dt_random_name
noisily {
di " > an optional argument sets length of output"
di ": dt_random_name(5)"
mata: dt_random_name(5)
di ""
di " > default length is 10"
di ": dt_random_name()"
mata: dt_random_name()
di ""
di " > optional argument should be real scalar"
di `": dt_random_name("oops")"'
capture noi mata: dt_random_name("oops")
}
end

0 comments on commit 7ad7d28

Please sign in to comment.