Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: RE: writing quotes in a global variable


From   Nick Cox <n.j.cox@durham.ac.uk>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
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 

However, 

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

http://www.stata.com/statalist/archive/2008-08/msg01258.html 

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! 

Nick 
n.j.cox@durham.ac.uk 

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")"

or

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:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index