### 2.1.1 Bar lines and bar checks

#### Bar lines

Single bar lines are automatically placed in the music so there is no need to add them manually. Other types of bar lines are added using `\bar`, for example `\bar "||"` for a double bar line, or `\bar "|."` for an ending bar line. For a full list of bar lines see the Bar lines.

>     g1 e1 \bar "||" c2. c'4 \bar "|."

#### Bar checks

Though not strictly necessary, bar checks should be used in the input code to show where bar lines are expected to fall. They are entered using the bar symbol, `|`. With bar checks, the program can verify that you’ve entered durations that make each measure add up to the correct length. Bar checks also make your input code easier to read, since they help to keep things organized.

>     g1 | e1 | c2. c'4 | g4 c g e | c4 r r2 |

#### See also

Notation Reference: Bar and bar number checks.

其他语言：español, français, italiano。
About automatic language selection.

#### LilyPond — Learning Manual v2.18.2 (稳定分支).