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

RE: st: Is there any bug in unabbreviation of variable names?

From   "Nick Cox" <>
To   <>
Subject   RE: st: Is there any bug in unabbreviation of variable names?
Date   Fri, 11 Apr 2008 18:38:06 +0100

Reserved words are documented at [U] 11.3. 


Austin Nichols

Sergiy Radyakin <>:

I would guess that the prohibited abbreviations include words that are
not allowed as variables names, e.g. long or byte:

. g byte_ok=1

. d byte
byte not allowed

. d byte*

              storage  display     value
variable name   type   format      label      variable label
byte_ok         float  %9.0g

. unab g: byte
byte not allowed

. unab g: byt

. di "`g'"

I think that the above looks a bit like a bug.

On Fri, Apr 11, 2008 at 1:24 PM, Sergiy Radyakin
<> wrote:

> I wonder if there is any bug in unabbreviation of variable names. I
> have a persistent problem, which can be reproduced as following (Stata
> for Windows version 9 and 10):
> // --------------------------------------------------------
> sysuse auto
> keep gear_ratio
> describe gear
> rename gear_ratio long_name
> describe long
> // --------------------------------------------------------
> r(101): long not allowed
> Same thing happens when I use tab instead of describe.
> In real life I have a variable long_unempl, which caused troubles when
> abbreviated in such a way. Is it only the word "long" that causes such
> problems? Or are there other "prohibited" abbreviations (I know
> "using" is one because it is a reserved word and appears in the syntax
> of describe, but "long" is not a part of the syntax)?

*   For searches and help try:

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