n is some integer; I want it to default to 1
I'll try the trap you suggest; tried something similar earlier, but
perhaps I had the quotation mark syntax wrong... Thanks...
On Tue, 19 Jul 2005, Scott Merryman wrote:
>
> > -----Original Message-----
> > From: [email protected] [mailto:owner-
> > [email protected]] On Behalf Of Herb Smith
> > Sent: Tuesday, July 19, 2005 5:36 PM
> > To: [email protected]
> > Subject: st: Variable number of matrixes as arguments
>
> <snip>
>
> > . program project
> > . args result history ratios years births
> >
> > how can I see whether "matrix3" was passed to `births' or not? I.e.,
> >
> > . project matrix0 matrix1 matrix2 n matrix3
> >
> > versus
> >
> > . project matrix0 matrix1 matrix2 n ?
> >
>
> How about using an -if- statement.
>
> args result history ratios years births
> if "`births'" != "" {
> commands using `births' matrix
> }
>
> > Similarly, how can I allow "n" not to be specified in the call line?
>
> What is the basis of n?
>
> Scott
>
>
>
> *
> * 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/
>
*
* 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/