Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: RE: RE: [programming] syntax syntax


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: RE: [programming] syntax syntax
Date   Fri, 14 Dec 2007 15:47:06 -0000

I (we) are pleased you solved your problem, but you're being a little 
unfair to the help. 

You are asked about -real()-. In the help for -syntax-, I read this: 

----------------------------------------------------
option_descriptor optional_real_value

        type                OPname   (capitalization indicates minimal
                                           abbreviation)
        type                (real
        type                # (unless the option is required)
                              (the default value)
        type                )

    Examples:
        syntax ... , ... Mean(real 2.5) ...
        syntax ... , ... SD(real -1) ...

    The result of the option is returned in a macro name formed by the
first
    31 letters of the option's name.

    The macro contains the real number specified by the user, or else it
    contains the default value.
--------------------------------------------------

I don't think that is "buried". It is exactly where I would expect it. 
And there are examples. "Dense", "terse", etc., yes indeed. 

Feiveson, Alan H. (JSC-SK311)

Nick - 

Yes, I looked at the help and buried way down inside is this cyptic
reference:

option_descriptor optional_integer_value

        type                OPname   (capitalization indicates minimal
                                           abbreviation)
        type                (integer
        type                # (unless the option is required) 
                              (the default integer value)
        type                )

Reading this, I never would have guessed that a default is required. So
I greatly thank you and Tom and Austin for taking the trouble to reply
to my questions.

Al

 

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Nick Cox
Sent: Friday, December 14, 2007 9:19 AM
To: [email protected]
Subject: st: RE: [programming] syntax syntax

When -xb1()- takes a real argument and is an optional option then you
must specify a default, e.g. -xb1(real 0)-. 

An equivalent constraint does not bite with a string argument, as an
empty string is the default. 

The second question is answered by specifying 

[varlist(default=none)] 

The online help is very dense, but both points are covered. 

Nick
[email protected] 


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