⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 smcl.hlp

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 HLP
📖 第 1 页 / 共 3 页
字号:
{smcl}
{* 28feb2005}{...}
{cmd:help smcl}
{hline}

{title:Title}

{p2colset 5 17 19 2}{...}
{p2col :{hi:[P] smcl} {hline 2}}Stata Markup and Control Language{p_end}
{p2colreset}{...}


{title:Description}

{pstd}
SMCL, which stands for Stata Markup and Control Language and is
pronounced "smickle", is Stata's output language.  SMCL directives, such
as "{cmd:{c -(}it:...{c )-}}" in the following,

{pin2}
You can output {c -(}it:italics{c )-} using SMCL

{pstd}
affect how output appears:

{pin2}
You can output {it:italics} using SMCL

{pstd}
All Stata output is processed by SMCL: help files, statistical results, and
even the output of {helpb display} in the programs you write.


{title:Remarks}

{pstd}
Remarks are presented under the headings

        {help smcl##modes:SMCL modes}
        {help smcl##general_syntax:Command summary{hline 2}general syntax}
        {help smcl##repeated_material:Directive for substituting repeated material}
        {help smcl##line_paragraph_mode:Formatting directives for use in line and paragraph modes}
        {help smcl##link_mode:Link directives for use in line and paragraph modes}
        {help smcl##line_mode:Formatting directives for use in line mode}
        {help smcl##paragraph_mode:Formatting directives for use in paragraph mode}
        {help smcl##class:Inserting values from constant and current-value class}
        {help smcl##ascii:Displaying characters using ASCII code}


{marker modes}{...}
{title:SMCL modes}

{pstd}
At all times, SMCL is in one of four modes:

{center:1.  SMCL line mode     }
{center:2.  SMCL paragraph mode}
{center:3.  As-Is mode         }
{center:4.  Stata 6 help mode  }

{pstd}
Modes 1 and 2 are nearly alike{hline 2}in these two modes, SMCL directives are
understood, and the modes differ only in the way they treat blanks and
carriage returns.  In paragraph mode{hline 2}so called because it is useful for
formatting text into paragraphs{hline 2}SMCL joins one line to the next and
splits lines to form output with lines that are of nearly equal length.  In
line mode, SMCL shows the line very much as you entered it.  For instance,
in line mode, the input text

        Variable name        mean        standard error

{pstd}
(which might appear in a help file) would be spaced in the output exactly as you entered it.  In paragraph mode, the above would be output as "Variable name mean standard error", meaning that it would all run together.  On the other hand, the text

{pin}
The two main uses of SMCL are in the programs you compose and in the help files you write to document them, although SMCL may be used in any context.
Everything Stata displays on the screen is processed by SMCL.

{pstd}
In mode 3, As-Is mode, SMCL directives are not interpreted; text is displayed
just as it was entered.  There is seldom need for this mode.  Mode 4, Stata 6
help mode, is included for backwards compatibility of displaying old style
Stata help files and should be avoided.  If interested in As-Is mode or Stata
6 help mode, see {hi:[P] smcl}.

{pstd}
The directive {cmd:{c -(}smcl{c )-}} followed by a carriage return signals
the beginning of the line and paragraph SMCL modes.  The default SMCL mode is
line mode.  Paragraph mode is entered using the {cmd:{c -(}p{c )-}} directive.
SMCL Paragraph mode ends, and SMCL line mode is reestablished, when a blank
line is encountered or the {cmd:{c -(}p_end{c )-}} directive is given.

{pstd}
It is only from line mode that you can get to the other modes.  In addition
to the {cmd:{c -(}p{c )-}} directive for SMCL paragraph mode, there is the
{cmd:{c -(}asis{c )-}} and {cmd:{c -(}s6hlp{c )-}} directives that activate
the As-Is mode and Stata 6 help mode.  To return to SMCL mode from these two
modes, you must use the {cmd:{c -(}smcl{c )-}} directive.


{marker general_syntax}{...}
{title:Command summary{hline 2}general syntax}

{pstd}
Pretend that {cmd:{c -(}xyz{c )-}} is a SMCL directive, although it is not.
{cmd:{c -(}xyz{c )-}} might have any of the following syntaxes:

{center:Syntax 1:  {cmd:{c -(}xyz{c )-}}          }
{center:Syntax 2:  {cmd:{c -(}xyz:}{it:text}{cmd:{c )-}}     }
{center:Syntax 3:  {cmd:{c -(}xyz} {it:args}{cmd:{c )-}}     }
{center:Syntax 4:  {cmd:{c -(}xyz} {it:args}{cmd::}{it:text}{cmd:{c )-}}}

{pstd}
Syntax 1 means "do whatever it is that {cmd:{c -(}xyz{c )-}} does".
Syntax 2 means "do whatever it is that {cmd:{c -(}xyz{c )-}} does, do it on
the text {it:text}, and then stop doing it".  Syntax 3 means "do whatever it
is that {cmd:{c -(}xyz{c )-}} does, as modified by {it:args}".  Finally,
syntax 4 means "do whatever it is that {cmd:{c -(}xyz{c )-}} does, as
modified by {it:args}, do it on the text {it:text}, and then stop doing it".

{pstd}
Not every SMCL directive has all four syntaxes, and which syntaxes are
allowed is made clear in the descriptions below.

{pstd}
Also note that in syntaxes 3 and 4, {it:text} may contain other SMCL
directives.  However, be aware of one important limitation:  Not only must the
braces match, but they must match on the same physical (input) line.


{marker repeated_material}{...}
{title:Directive for substituting repeated material}

    {cmd:INCLUDE help} {it:args}{right:(syntax 3)  }
{pin}{cmd:INCLUDE} specifies that SMCL substitute the contents of a file named
{it:arg}{cmd:.ihlp}.  This is useful when you need to include the same text
multiple times.


{marker line_paragraph_mode}{...}
{title:Formatting directives for use in line and paragraph modes}

    {cmd:{c -(}sf{c )-}}, {cmd:{c -(}it{c )-}}, and {cmd:{c -(}bf{c )-}}{...}
{right:(syntaxes 1 & 2)  }
{pin}These directives specify how the font is to appear.
{cmd:{c -(}sf{c )-}} indicates standard face (font), {cmd:{c -(}it{c )-}}
italic face, and {cmd:{c -(}bf{c )-}} boldface.

{pin}Used in syntax 1, these directives switch to the font face specified,
and that rendition will continue to be used until another one of the commands
is given.

{pin}Used in syntax 2, they display {it:text} in the specified way and then
switch the font face back to whatever it was previously.

    {cmd:{c -(}input{c )-}}, {cmd:{c -(}error{c )-}}, {cmd:{c -(}result{c )-}}, and {cmd:{c -(}text{c )-}}{right:(syntaxes 1 & 2)  }
{pin}These directives specify how the text should be rendered: in the style
that indicates user input, an error, a calculated result, or the text around
calculated results.

{pin}These styles are often rendered in terms of color.  In the results
window, on a black background, Stata by default shows input in white, error
messages in red, calculated results in yellow, and text in green.  As a
result, many users think of these four directives as the "color" directives:

{center:{cmd:{c -(}input{c )-}} = {inp:white}}
{center:{cmd:{c -(}error{c )-}} = {err:red}  }
{center:{cmd:{c -(}result{c )-}} = {res:yellow}}
{center: {cmd:{c -(}text{c )-}} = {txt:green}}

{pin}However, the relationship between the real colors and
{cmd:{c -(}input{c )-}}, {cmd:{c -(}error{c )-}}, {cmd:{c -(}result{c )-}},
and {cmd:{c -(}text{c )-}} may not be the default (the user could reset it).

    {cmd:{c -(}inp{c )-}}, {cmd:{c -(}err{c )-}}, {cmd:{c -(}res{c )-}}, and {cmd:{c -(}txt{c )-}}{right:(syntaxes 1 & 2)  }
{pin}These four commands are synonyms for {cmd:{c -(}input{c )-}},
{cmd:{c -(}error{c )-}}, {cmd:{c -(}result{c )-}}, and {cmd:{c -(}text{c )-}}.

    {cmd:{c -(}cmd{c )-}}{right:(syntaxes 1 & 2)  }
{pin}{cmd:{c -(}cmd{c )-}} is similar to the "color" styles and is the
recommended way to show Stata commands in help files.  Do not confuse
{cmd:{c -(}cmd{c )-}} with {cmd:{c -(}inp{c )-}}.  {cmd:{c -(}inp{c )-}} is
the way commands actually typed are shown, and {cmd:{c -(}cmd{c )-}} is the
recommended way you show commands you might type.  We recommend that 
you present help files in terms of {cmd:{c -(}txt{c )-}} and use
{cmd:{c -(}cmd{c )-}} to show commands; use any of {cmd:{c -(}sf{c )-}},
{cmd:{c -(}it{c )-}}, or {cmd:{c -(}bf{c )-}} in a help file, but we recommend
that you not use any of the "colors" {cmd:{c -(}inp{c )-}},
{cmd:{c -(}err{c )-}}, or {cmd:{c -(}res{c )-}}, except in places where you
are showing actual Stata output.

    {cmd:{c -(}cmdab:}{it:text1}{cmd::}{it:text2}{cmd:{c )-}}{right:(variation on syntax 2)  }
{pin}{cmd:{c -(}cmdab{c )-}} is the recommended way to show minimal
abbreviations for Stata commands and options in help files;  {it:text1}
represents the minimum abbreviation, and {it:text2} represents the rest of the
text.  When the entire command or option name is the minimal abbreviation,
you may omit {it:text2} along with the extra colon.  In that case,
{cmd:{c -(}cmdab:}{it:text}{cmd:{c )-}} is equivalent to
{cmd:{c -(}cmd:}{it:text}{cmd:{c )-}}.

    {cmd:{c -(}opt} {it:option}{cmd:{c )-}}, {cmd:{c -(}opt} {it:option}{cmd:(}{it:arg}{cmd:){c )-}},
    {cmd:{c -(}opt} {it:option}{cmd:(}{it:a}{cmd:,}{it:b}{cmd:){c )-}}, and {cmd:{c -(}opt} {it:option}{cmd:(}{it:a}{cmd:|}{it:b}{cmd:){c )-}}{right:(syntax 3)  }
{pin}Alternatives to using {cmd:{c -(}cmd{c )-}}.{p_end}
    {cmd:{c -(}opt} {it:option}{cmd::}{it:option2}{cmd:{c )-}}, {cmd:{c -(}opt} {it:option1}{cmd::}{it:option2}{cmd:(}{it:arg}{cmd:){c )-}},
    {cmd:{c -(}opt} {it:option1}{cmd::}{it:option2}{cmd:(}{it:a}{cmd:,}{it:b}{cmd:){c )-}}, and
    {cmd:{c -(}opt} {it:option1}{cmd::}{it:option2}{cmd:(}{it:a}{cmd:|}{it:b}{cmd:){c )-}}{right:(syntaxes 3 & 4)  }
{pin}Alternatives to using {cmd:{c -(}cmdab{c )-}}.{p_end}
{pin}{cmd:{c -(}opt{c )-}} is the recommended way to show options. 
     {cmd:{c -(}opt{c )-}} allows you to easily include arguments.

  SMCL directive ...{col 30}is equivalent to typing ...
  {hline 76}
  {cmd:{c -(}opt} {it:option}{cmd:{c )-}}{col 30}{cmd:{c -(}cmd:}{it:option}{cmd:{c )-}}
  {cmd:{c -(}opt} {it:option}{cmd:(}{it:arg}{cmd:)}{cmd:{c )-}}{col 30}{cmd:{c -(}cmd:}{it:option}{cmd:({c )-}{c -(}it:}{it:args}{cmd:{c )-}{c -(}cmd:){c )-}}
  {cmd:{c -(}opt} {it:option}{cmd:(}{it:a}{cmd:,}{it:b}{cmd:)}{cmd:{c )-}}{col 30}{cmd:{c -(}cmd:}{it:option}{cmd:({c )-}{c -(}it:}{it:a}{cmd:{c )-}{c -(}cmd:,{c )-}{c -(}it:}{it:b}{cmd:{c )-}{c -(}cmd:){c )-}}
  {cmd:{c -(}opt} {it:option}{cmd:(}{it:a}{cmd:|}{it:b}{cmd:)}{cmd:{c )-}}{col 30}{cmd:{c -(}cmd:}{it:option}{cmd:({c )-}{c -(}it:}{it:a}{cmd:{c )-}|{c -(}it:}{it:b}{cmd:{c )-}{c -(}cmd:){c )-}}

  {cmd:{c -(}opt} {it:option1}{cmd::}{it:option2}{cmd:{c )-}}{col 30}{cmd:{c -(}cmd:}{it:option1}{cmd::}{it:options2}{cmd:{c )-}}
  {cmd:{c -(}opt} {it:option1}{cmd::}{it:option2}{cmd:(}{it:arg}{cmd:)}{cmd:{c )-}}{col 30}{cmd:{c -(}cmd:}{it:option1}{cmd::}{it:option2}{cmd:({c )-}{c -(}it:}{it:arg}{cmd:{c )-}{c -(}cmd:){c )-}}
  {cmd:{c -(}opt} {it:option1}{cmd::}{it:option2}{cmd:(}{it:a}{cmd:,}{it:b}{cmd:)}{cmd:{c )-}}{...}
 {col 30}{cmd:{c -(}cmd:}{it:option1}{cmd::}{it:option2}{cmd:({c )-}{c -(}it:}{it:a}{cmd:{c )-}{c -(}cmd:,{c )-}{c -(}it:}{it:b}{cmd:{c )-}{c -(}cmd:){c )-}}
  {cmd:{c -(}opt} {it:option1}{cmd::}{it:option2}{cmd:(}{it:a}{cmd:|}{it:b}{cmd:)}{cmd:{c )-}}{col 30}{cmd:{c -(}cmd:}{it:option1}{cmd::}{it:option2}{cmd:({c )-}{c -(}it:}{it:a}{cmd:{c )-}|{c -(}it:}{it:b}{cmd:{c )-}{c -(}cmd:){c )-}}
  {hline 76}

{pin}{it:option1} represents the minimum abbreviation, and {it:option2}
represents the rest of the text.

{pin}{it:a}{cmd:,}{it:b} and {it:a}{cmd:|}{it:b} may have any number of
elements.  Available elements that are displayed in {cmd:{c -(}cmd{c )-}}
style are {cmd:,}, {cmd:=}, {cmd::}, {cmd:*}, {cmd:%}, and {cmd:()}.  Several
elements are displayed in plain text style: {c |}, {c -(}{c )-}, and [].

{pin}Also note that {cmd:{c -(}opth} {it:option}{cmd:(}{it:arg}{cmd:){c )-}}
is equivalent to {cmd:{c -(}opt{c )-}}, except that {it:arg} is displayed as
a link to {cmd:help}; see {help smcl##link_mode:Link directives for use in line and paragraph modes} for further details.


    {cmd:{c -(}hilite{c )-}} and {cmd:{c -(}hi{c )-}}{right:(syntaxes 1 & 2)  }
{pin}{cmd:{c -(}hilite{c )-}} and {cmd:{c -(}hi{c )-}} are synonyms.
{cmd:{c -(}hilite{c )-}} is the recommended way to highlight (draw attention
to) something in help files.  You might highlight, for example, a reference
to a manual, the STB, the SJ, or a book.

    {cmd:{c -(}ul{c )-}}{right:(syntaxes 2 & 3)  }
{pin}{cmd:{c -(}ul on{c )-}} starts underlining mode.
{cmd:{c -(}ul off{c )-}} ends it.  {cmd:{c -(}ul:}{it:text}{cmd:{c )-}}
underlines {it:text}.

    {cmd:{c -(}*{c )-}}{right:(syntaxes 2 & 4)  }
{pin}{cmd:{c -(}*{c )-}} is the comment indicator.  What follows it (inside
the braces) is ignored.

    {cmd:{c -(}hline{c )-}}{right:(syntaxes 1 & 3)  }
{pin}{cmd:{c -(}hline{c )-}} (syntax 1) draws a horizontal line the rest of
the way across the page. {cmd:{c -(}hline} {it:#}{cmd:{c )-}} (syntax 3) draws
a horizontal line of {it:#} characters.  {cmd:{c -(}hline{c )-}} (either
syntax) is generally used in line mode.

    {cmd:{c -(}.-{c )-}}{right:(syntax 1)  }
{pin}{cmd:{c -(}.-{c )-}} is a synonym for {cmd:{c -(}hline{c )-}} (syntax 1).

    {cmd:{c -(}dup} {it:#}{cmd::}{it:text}{cmd:{c )-}}{right:(syntax 4)  }
{pin}{cmd:{c -(}dup{c )-}} repeats {it:text} {it:#} times.

    {cmd:{c -(}char} {it:code}{cmd:{c )-}} and {cmd:{c -(}c} {it:code}{cmd:{c )-}}{right:(syntax 3)  }
{pin}
{cmd:{c -(}char} {it:code}{cmd:{c )-}} and {cmd:{c -(}c} {it:code}{cmd:{c )-}}
are synonyms.  These directives display the specified characters which
otherwise might be difficult to type on your keyboard.  See
{help smcl##ascii:Displaying characters using ASCII code} below.

    {cmd:{c -(}reset{c )-}}{right:(syntax 1)  }
{pin}{cmd:{c -(}reset{c )-}} is equivalent to coding
{cmd:{c -(}txt{c )-}{c -(}sf{c )-}}.


{marker link_mode}{...}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -