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 on April 23, and its replacement, is already up and running.

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

Re: st: literal single quotes

From   "Newson, Roger B" <>
To   "" <>
Subject   Re: st: literal single quotes
Date   Thu, 4 Mar 2010 17:32:03 +0000

I think the best way is to use the -char()- function. Type

local llquote=char(96)
local lrquote=char(39)

and the macros -llquote- and -lrquote- will contain literal left and right quotes, respectively.

A useful tool for this kind of problem is Nick Cox's -asciiplot-, which you can download from SSC, and which gives you the ASCII codes and their corresponding characters graphically, at a glance.

I hope this helps.

Best wishes


Roger B Newson BSc MSc DPhil
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton Campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Web page:
Departmental Web page:

On 04/03/2010 17:21, Feiveson, Alan H. (JSC-SK311) wrote:
Can someone please tell me how to define a local macro  that contains literal single quotes? For example Suppose I want to do something like

local bull "count if `temp'>  0"

where `temp' is to be interpreted literally, not evaluated.


Al Feiveson

*   For searches and help try:
*   For searches and help try:

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