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

st: Syntax syntax

To   <>
Subject   st: Syntax syntax
Date   Tue, 18 May 2004 19:31:34 +0100

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

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

(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

Thank you very much!

Dominic Muston.
*   For searches and help try:

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