[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: -syntax , option(varlist min=0)-?

From   Jeph Herrin <>
Subject   st: -syntax , option(varlist min=0)-?
Date   Thu, 08 Oct 2009 14:13:59 -0400

I would like a program to take an option which contains
either a varlist or nothing. Something like

 syntax varlist..., myoption(varlist min=0)

which Stata doesn't like. The idea is that -myoption-
only applies to the listed variables in the primary varlist;
unless -myoption()- is specified, then it applies to all
variables in the primary varlist. This sounds confusing
even to me, so in pseudo code, I would like to have

 myprogram var1-var10, myoption(var1)

apply the option to only -var1-, but

 myprogram var1-var10, myoption

apply the option to var1-var10. Seems like I have done this
before, but it escapes me now. Any ideas?

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index