Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: tempvar in debugging

From   Wincent <[email protected]>
To   [email protected]
Subject   st: tempvar in debugging
Date   Fri, 7 Jan 2011 12:07:32 +0800

Dear all, here is the situation I ran into:

***  first case
capture program drop test
program define test
tempvar x
matrix `x'=(1,2\3,4)
pause examine matrix `x'

pause on
pause:  examine matrix __000000
-> . matrix dir
-> . matrix list `x'
matrix name required
-> . matrix list __000000
    c1  c2
r1   1   2
r2   3   4
-> . end
execution resumes...

** second case
tempvar x
matrix `x'=(1,2\3,4)
matrix list `x'

In the first case, I can't use macro name to inspect the matrix, but
the second case I can.
I wonder why it throws an error in the first case, and is there any
way to inspect the matrix instead of using the actual tempvar

Thank you very much.

Wincent Ronggui HUANG (Ph.D.)
City University of Hong Kong
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index