[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: programs with options
> When I write a program with options, I must put a space
> between the last
> variable and the comma, else Stata don't understand that
> the last variable
> is "varK" and not "varK,". How resolve this problem.
> I have try to write my syntax line as :
> syntax varlist[,option1 option2] instead of
> syntax varlist [,option1 option2] but I obtain the same result.
> Example with an xxx program :
> xxx var1 var2 var3, option1 option2
> =>, invalid name
> xxx var1 var2 var3 , option1 option2
I think you must show us _exactly_ what your real program
is. My guess is that you have a problem, but it is not this.
If I write a program
syntax varlist[,foo bar]
di "is OK"
then things work OK with
. p1 mpg weight
. p1 mpg weight,foo
. p1 mpg weight, foo
. p1 mpg weight , foo
. p1 mpg weight ,foo
-- so in terms of both (a) how the program
is written (b) what you fire at it, Stata
is not fussed.
In practice, I would write something more
syntax varlist [, foo bar]
di "is OK"
but that's personal style reference (and
also -- and this is of some importance --
closer to Stata Corp's house style and the
style of most Stata programmers).
* For searches and help try: