Brendan Halpin <[email protected]>, trying to find out whether Stata had
been invoked in batch-style (stata -b), wrote,
> I found [...] by trial and error and now have the following code in
> profile.do:
>
> if "$S_MODE" != "batch" {
> set memory 100m
> }
He also discovered that $S_MODE can be accessed as c(mode), and asked
whether there is any reason to prefer on over the other.
Answer: c(mode) is considered more modern usage, and so should be prefered
over $S_MODE. Both, however, return the same thing and both will continue to
work. $S_MODE is no longer documented.
-- 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/