Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Using the ASCII Code Character Map
From
Bruno Skrinjaric <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: Using the ASCII Code Character Map
Date
Mon, 17 Mar 2014 14:58:30 +0000
Dear all,
When I want to insert some characters from ASCII Code Character Map (net describe asciiplot, from (http://fmwww.bc.edu/RePEc/bocode/a/)) I use the following command:
u "$path\grey_eco.dta", clear
local Chh=char(200)
local chh=char(232)
local Ch=char(198)
local ch=char(230)
local D=char(208)
local d=char(240)
local Sh=char(138)
local sh=char(154)
local Z=char(142)
local z=char(158)
replace country="`Chh'e`sh'ka" in 1
replace country="Ma`d'arska" in 6
replace country="Slova`chh'ka" in 8
Since I am from Croatia these are all letters in Croatian alphabet. I defined as local all the letters not found in English language that I might ever need (I did not have to write them all out here but I did that to illustrate my question). I have two questions about that?
First, is it possible to define a GLOBAL instead of a local for these characters, and how to use this if it is possible?
Second, I have tried saving all these locals in separate .do file and then loading it into working memory prior to -replace- command, but that didn't work. Here is what I have tired:
u "$path\grey_eco.dta", clear
do "$path\ascii_code_characters.do"
replace country="`Chh'e`sh'ka" in 1
replace country="Ma`d'arska" in 6
replace country="Slova`chh'ka" in 8
So, basically, my question is - is there any way of making a "permanent" list of the ASCII characters I will be using regularly and then just "calling" to that list when I need it?
Just to be clear, the first code in this e-mail works fine, I am just wondering is there a way where I do not have to write the local every time?
Bruno Škrinjarić
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/