Statalist


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

Re: Re: st: profile.do


From   n j cox <[email protected]>
To   [email protected]
Subject   Re: Re: st: profile.do
Date   Fri, 15 Feb 2008 19:11:54 +0000

I would put it differently. You can include

set more off

in a do-file but it doesn't have a persistent effect. It only operates until the end of the do file. This is generic to do files, and beyond. Experiments with something like

* --------------------------- setmoreoff.do
set more off
* ---------------------------

clear
set obs 1000
do setmoreoff
gen id = _n
l

will show that the do-file does nothing that persists beyond its own termination. Adding -, permanently- makes no difference to that as far as I can tell. At this moment I don't have access to a manual, so I can't see if the manual says more than the help on this detail.

I surmise that the rationale for this behaviour is that it is more likely to be what you really want than the opposite. -set more off- is usually for here and now, and temporarily. That means, _within_ a program, do file (including code currently in do file editor) or interactive session, but not beyond.

Nick
[email protected]

David Jacobs <[email protected]>

Stata deliberately does not let users alter the set more off command
in the profile.do file although I can't remember why.

Dave

>I'm using Stata 9 and I made a profile.do file so that when Stata opens
>it sets the mem to 500m and sets more off. I see that the little do
>file runs every time Stata opens, but it does not set more off. Does
>anybody have any idea why? Here is what is in the profile.do file.
>
>set more off
>set memory 500m
>
>and here is how I know it is actually running. This is the message I
>get now whenever I start Stata:
>Notes:
> 1. (/m# option or -set memory-) 10.00 MB allocated to data
> 2. (/v# option or -set maxvar-) 5000 maximum variables
>
>
>running C:\Program Files\Stata9\profile.do ...

*
* 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