Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

[no subject]



--------------------------------------------------------------------------------

Well, that's correct then. But I am now completely unclear 
on what is going wrong. 

Here is an extract from the FAQ: 

"Say exactly what you typed and exactly what Stata typed 
(or did) in response. N.B. exactly! If you can, reproduce 
the error with one of Stata's provided datasets or a simple 
concocted dataset that you include in your posting." 

Nick 
n.j.cox@durham.ac.uk 

> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu 
> [mailto:owner-statalist@hsphsun2.harvard.edu]On Behalf Of 
> DOMINIC MUSTON
> Sent: 18 May 2004 20:00
> To: statalist@hsphsun2.harvard.edu 
> Subject: st: RE: Syntax syntax
> 
> 
> Thanks for that Nick. (And so quick too!) I'm afraid I made a rather
> crucial typo in my email. The command that follows "syntax ..." is
> actually:
> 
> display `preffect'
> 
> ie: with the quotes.
> 
> Any suggestions?
> 
> Dominic
> 
> From   "Nick Cox" <n.j.cox@durham.ac.uk> 
> To   <statalist@hsphsun2.harvard.edu> 
> Subject   st: RE: Syntax syntax 
> Date   Tue, 18 May 2004 19:40:09 +0100 
> 
> --------------------------------------------------------------
> ------------------
> 
> After this syntax, what is specified 
> in -preffect()- will be visible as `preffect'. 
> This will be a string (emphatically not 
> a string variable). The ` ' are essential. 
> 
> di preffect 
> 
> by itself will be interpreted as 
> a reference to a variable -preffect-, 
> in fact to -preffect[1]-, which evidently 
> you don't have. 
> 
> If you don't have anything compulsory before
> the options the syntax should be 
> 
> syntax [, PREffect(string)]
> 
> Nick 
> n.j.cox@durham.ac.uk 
> 
> > -----Original Message-----
> > From: owner-statalist@hsphsun2.harvard.edu 
> > [mailto:owner-statalist@hsphsun2.harvard.edu]On Behalf Of 
> > DOMINIC MUSTON
> > Sent: 18 May 2004 19:32
> > To: statalist@hsphsun2.harvard.edu 
> > Subject: st: Syntax syntax
> > 
> > 
> > I'm pulling my hair out with this problem - I just can't see
what's
> > wrong, so any help much appreciated! The problem I'm having
contains
> > syntax for the "syntax" programming command.
> > 
> > A program I'm writing includes the line:
> > 
> > syntax [anything] [, PREffect(string)]
> > 
> > This is intended to pick-up an optional option called "preffect"
(or
> > "pre" for short) with the contents of the brackets recorded 
> > as a string
> > variable.
> > 
> > The next line of my program is:
> > 
> > display preffect
> > 
> > Yet when I run the program specifying the preffect option
(including
> > something in brackets), the "display" command displays nothing -
it
> > appears that the contents of the bracket following the preffect
> option
> > in the command line have not been picked-up.
> > 
> > Why not? How can I get my program to pick-up the contents of the
> > option?
> > 
> > (What's the [anything] code about? Without it, I get a "varlist
not
> > allowed" error. I guess putting [anything] in the program is not
> great
> > practice, but I would like to get the options problem sorted out
> > first.)
> > 


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index