Statalist The Stata Listserver


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

Re: st: obtaining the value of c(byteorder) in Mata


From   [email protected] (William Gould, Stata)
To   [email protected]
Subject   Re: st: obtaining the value of c(byteorder) in Mata
Date   Mon, 22 May 2006 08:21:11 -0500

Phil Schumm <[email protected]> writesw, 

> [...] my understanding was that values of c() scalars were to be referenced
> in Mata using st_numscalar() and st_strscalar().  Yet while this appears to
> work for numeric scalars, it doesn't seem to work for string scalars:
>
>       . mata: st_numscalar("c(SE)")
>         1
>
>       . mata: st_strscalar("c(byteorder)")
>    

Phil has discovered a bug.  

Another way to obtain c() values is using Mata's -c()- function:

	. mata: c("SE")
	  1

	. mata: c("byteorder")
	  "lohi"

There was nothing wrong with Phil's st_numscalar() and st_strscalar() 
approach, both are intended to work.

-- Bill
[email protected]
*
*   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