Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: writing quotes in a global variable

From   Nick Cox <>
To   "''" <>
Subject   st: RE: writing quotes in a global variable
Date   Thu, 23 Jun 2011 12:31:39 +0100

You don't need the outermost quotation marks " " to define a global macro. Try 

. global mycolor lcolor("100 100 100")

. mac li 


1. Stata does not use the terminology of global variables: see e.g. 

2. Your definition looks very confused: there are two commas and the single quotation marks are not balanced and there is an odd character there, so the chance of this working as you intend is zero. 

It is best not to try to run before you are able to walk! 


Martin Albers

I have a problem. I want to use RGB colors for graphics, because I need 60
discriminable colors. For this I have to code the colors "# # #". My problem
is that I cannot write Quotes into global variables. Is there any way or
trick to do so?

I need a global variable of the type
global graph1 "connected `op'ì'' `t', sort, lcolor("100 100 100")"


global color105 "100 100 100" 

where the quotes are part of the global variable, because otherwise I cannot
specify RGB-Colors.

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index