Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: gettoken -- bug?


From   "Johannes Schmieder" <[email protected]>
To   [email protected]
Subject   st: gettoken -- bug?
Date   Mon, 8 Sep 2008 15:10:23 -0400

Hi,
Can someone tell me whether this is intended behavior or a bug in
Stata (V10, SE Intercooled):

. local list `" "a b" c , d "'
. macro dir  // omitting the system macros
_list:           "a b" c , d
_one:           `"hello.dta"'

. gettoken one two : list , p(",")
. macro dir
_two:            c , d
_one:           a b
_list:           "a b" c , d

Shouldn't the local "one" contain:  "a b" c
rather than just: a b

If this is intended behavior this is not well documented in the help
file or the manual. I realize the first technical note in the manual
recommends to include " " as a parsing character, but this still seems
to be strange and not in line with the documentation.

Johannes Schmieder
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index