Statalist


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

st: What is wrong with this syntax?


From   Kyle Hood <[email protected]>
To   [email protected]
Subject   st: What is wrong with this syntax?
Date   Sat, 21 Jul 2007 14:50:02 -0400 (EDT)

I have attempting to write a command (in version 8), with the following syntax:

program hhk, eclass
syntax varlist(min=3 max=3)[, P(real 0.5)]
di "`1'"
di "`2'"
di "`3'"
...

If I use the following call:

. hhk a b c, p(0.3)

I get an error (when I first try to use variable c), and the program displays

a
b
c,

Why is it picking up the comma in the third variable? It doesn't do that for built-in stata commands.

Thanks,
Kyle
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* 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