Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: parameter handover in .ado file


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: parameter handover in .ado file
Date   Wed, 12 Apr 2006 14:19:39 +0100

This is documented in [U]. 

Consider the simplest kind of case: 

program myprog 
	args a b c 
	...
end 

myprog 1 2 3 

will result in 1 being mapped to `a', 2 to `b', 3 to `c'. 

However, any program you want to have -if- functionality
should be set up using -syntax-. It's not impossible 
otherwise, but you'd be ill-advised to do it otherwise. 

Nick 
[email protected] 

Steffen Groening
 
> I was trying to do write my own little .ado program, but encountered
> some problems while doing that.
> Hopefully you can help me out here.
> 
> How do you hand over the parameters you enter when calling an .ado
> program?
> 
> E.g. you type: programname if parameter1 parameter2 parameter3
> 
> How can i address the values entered for parameter1, 
> parameter2, etc. in
> the .ado file?

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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