Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • "more" command in Stata 15

    I recently upgraded from stata 14.2 to stata 15 and I noticed that the more command does not work anymore. Is it my stupid mistake or does anyone experience a similar problem? And does someone maybe have a solution? Here is a basic sample code:
    Code:
    foreach r in $list {
            sum emp if sec_`r' == 1
            more
    }
    Stata 15 executes the whole code without stopping and Stata 14.2 always stops at "more" until I press a key.

    Thanks a lot.

    Best,
    Dean

  • #2
    Code:
    help whatsnew14to15
    explains:

    71. set more off now the default

    Stata displays --more-- when output is about to scroll off the screen.
    You press the space bar or click on the More button, and another page of
    output appears. This is called set more on.

    set more off is now the default.

    If you prefer the old behavior, type set more on, permanently.

    See [R] more.

    Comment


    • #3
      Under Stata 15.1 for Unix, running on Ubuntu 17.10, the following works for me:
      Code:
      noisily : display in smcl as text `"{it:more} is currently set: "' as result `"`c(more)'"'
      if (`"`c(more)'"'=="off") {
          noisily : display in smcl as text `"switching it to {bf:on} for the rest of this do-file"'
          set more on
      }
      forvalues num=1/10 {
              noisily : display as result in smcl "iteration `num'"
              more
      }
      Did you check your more settings? If
      Code:
      display `"`c(more)'"'
      tells you "off", you have to -set more on- in order to get more to work in your script.

      Regards
      Bela

      PS: Crossed with Nick Cox's answer; he is, of course, correct; I did not see this entry in the changelog help file.
      Last edited by Daniel Bela; 15 Nov 2017, 03:18. Reason: added PS

      Comment


      • #4
        Ahh, yes.
        Stupid me. I did know that Stata 15 set more off as the default. I just though that it would set the (annoying) more in large outputs off but it would still work when forcing it to do "more". However, I was wrong (even though I would have liked to have "more" working as I though since it makes it again necessary to turn more on and off all the time).
        Thanks a lot Nick Cox and Daniel Bela.

        Comment


        • #5
          You don't have to set more on or off all the time, I think: When you set more on in a do-file that needs it in order to use the more command (like I did in my example script), the previous user setting will be restored after execution has finished. You can see this with my above script: The default setting of more is not changed, even when repeatedly executing the code in a do-file.

          Regards
          Bela

          Comment

          Working...
          X