Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: concatenating macros

From   "Wallace, John" <>
To   "''" <>
Subject   st: concatenating macros
Date   Wed, 10 Nov 2004 11:13:00 -0800

Hi all:
I’m working within the Windows2000 OS and am having trouble getting paths
and filenames stored in local macros properly.
.local pathvar "F:\CELS\"
.local filename "35051403"
.local longname `pathvar'`filename'

.di “`longname’”
F:\CELS35051403    ←Stata output

The problem is that the final \ gets dropped from the path.

.di "`pathvar'"

Oddly, the initial macro seems to store this correctly

Changing the longname macro construction to...
.local longname `pathvar'`filename'
.di “`longname’”
F:\CELS35051403 effect

Any suggestions?

John Wallace | Research Associate | Test Method Development
AFFYMETRIX, INC. | 3380 Central Expressway | Santa Clara, CA 95051 | Tel: 
408-731-5574 | Fax:  408-481-0435

*   For searches and help try:

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