Statalist The Stata Listserver

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

Re: st: Size of a global

From   "Austin Nichols" <>
Subject   Re: st: Size of a global
Date   Wed, 28 Mar 2007 12:58:11 -0400

Emmanouil --
Try removing the = from your global definition statement, as the equal
sign forces a limit equal to the length of parsed strings (this has
been discussed many times on Statalist; try searching the archives if
you want more info).

On 3/28/07, Mentzakis, Emmanouil <> wrote:
I am trying to create a global but for some reason it does not really
read it.
I have an example below of what is happening. The first global $xvar is
working but when I increase its size, as in global $var2 it does not
work properly anymore.

---------Begin example----------
use auto
qui tab mpg, gen(dmpg)
qui tab trunk, gen(dtrunk)
# delimit ;
global xvar2="dmpg2 dmpg3 dmpg4 dmpg5 dmpg6 dmpg7 dmpg8 dmpg9 dmpg10
dmpg11 dmpg12
dmpg13 dmpg14 dmpg15 dmpg16 dmpg17 dmpg18 dmpg19 dmpg20 dmpg21 dtrunk2
dtrunk3 dtrunk4
dtrunk5 dtrunk6 dtrunk7 dtrunk8 dtrunk9 dtrunk10 dtrunk11 dtrunk12
dtrunk13 dtrunk14 dtrunk15
dtrunk16 dtrunk17 dtrunk18";
reg price $xvar2 ;
*   For searches and help try:

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