[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: binary format type str question
Hi. I'm writing a Mathematica program to read stata "dta" files. I have
the "Stata help for dta" page, which is quite useful. Everything seems
to work fine as long as the data types are in the range 251 to 255
(byte, int, long, float, or double). But I can't figure out how to
properly read the data when the data types are in the range 1 to 244
(str1, str2, ... str244). BTW, I have no trouble reading the "char"
strings for the data_label and the time_stamp; I just read them in as a
list of bytes, discard the bytes starting with the first zero, and
convert the remaining bytes to ascii. But the str types don't seem be
the same sort of beast. Any guidance would be appreciated. Thanks.
--Mark.
*
* 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/