What does the straight line mean in writing?

There are forward slash (/), backslash (\) and vertical slash (|) symbols on a computer keyboard. The forward slash is the type you're most likely to see or use in writing.

  • Forward (/) slashes serve many purposes in writing. They are commonly used to separate words, lines of poetry, abbreviations, dates, and fractions.
  • Backslashes (\) are primarily used in computer coding. They appear in some technical writing, such as software manuals or user guides.
  • Vertical (|) slashes, also called upright or straight slashes, are used in math and computer programming. A vertical slash stands for "it is true that" or "such that."

Memory tip: To differentiate the forward slash from the backslash, remember that the top part of the forward slash is in front of the bottom part. Since the vertical slash is straight up and down, that one's easy to remember.

When writing a date, you can opt to use a combination of words and numbers, such as December 25, 2025. You can also leave out the words entirely. When writing dates with only numbers, you'll need to use forward slashes.

  • month, day and year - 12/25/2025 or 12/25/25
  • month and day only - 12/25

Even though slashes are usually used informally, it can be appropriate to use a forward slash when dealing with dates even in formal writing. Do not leave spaces between the slashes and the numbers. Be mindful of any special requirements that apply to what you are writing. For example, the military format for dates doesn't allow for any symbols to be used. Some citation methods might prefer a hyphen (12-25-2025). It's always worth the extra ounce of effort to check and double-check your teacher's preferred method of citation.

The vertical bar ( | ) -- also called the vertical line, vertical slash, pipe, pipe symbol or upright slash -- is a symbol used in mathematics, computing and other areas to represent a specific type of logic or operation, depending on its context. Even within a single area such as computing, the vertical bar is applied in multiple ways. Once again, its use depends on the context.

As with computing, mathematics uses the vertical bar in a variety of ways. For example, it can indicate the absolute value of a number, as in |-5| = 5. This means that the absolute value of -5 is 5. The vertical bar can also express divisibility. A simple example of this is a|b, which translates to "a divides b" or "b is divisible by a." The vertical bar is also used for mathematical norms, conditional probability, set-builder notation, function parameter separation and other areas of mathematics.

The vertical bar is used in other ways as well. For example, vertical bars, along with angle brackets, are key elements in Bra-ket notation, a standard notation found in quantum mechanics to describe quantum states. Vertical bars also appear in printed and online material in the form of punctuation or typographical marks. For example, a person might see them on a business card or at the bottom of a webpage to separate text elements such as phone numbers and addresses.

The vertical bar in computing

The vertical bar is used extensively in computing. It is represented in different ways, depending on the character encoding standard being applied. The following table lists common examples of how the vertical bar is represented in different character sets.

What does the straight line mean in writing?
This table illustrates how the vertical bar is represented in different character sets.

Shell scripts use the vertical bar to build pipelines that pass the results of one command to the next command. The vertical bar connects the commands together, making it possible to create a chain of related but separate processes. This approach is used extensively in Unix and Linux systems to build multiprocess pipelines in shell programs such as sh, csh, tcsh, ksh and bash. Microsoft PowerShell uses the same concept for scripting in Windows.

Each command in the pipeline after the first one filters or transforms the data being passed down from the preceding command. The current command then passes the refined data down the pipeline to the next command. For example, macOS computers, like Unix and Linux, can run the bash shell, which supports pipeline constructions such as the following.

ls /etc/ | grep ".*\.conf$" | wc -l

The pipeline includes three commands that are separated by vertical bars. Together, the commands return the number of .conf files in the etc directory. The first command in the pipeline is an ls command that retrieves a list of files from the etc directory. This list is then pipelined to the second command, grep, which limits the files to those with the .conf extension. The filtered results are then piped to the wc command, which returns a count of the number of files in the pipeline.

The vertical bar is also used in programming languages as a logical or bitwise operator that represents OR logic. The vertical bar makes it possible to specify alternative values within an expression. For this reason, it is sometimes referred to as an alternation operator. Some programming languages use double vertical bars ( || ) as an OR operator, rather than using a single bar. The vertical bar is also used in regular expressions to specify alternative characters. For example, a regular expression that contains s(a|i|u)ng will match the words sang, sing and sung.

The vertical bar is sometimes used as a delimiter in text files. Although commas and tabs are far more common, the use of vertical bars does occur on occasion. In addition, the vertical bar appears in Backus-Naur form notation, a standard format for describing the syntax of a programming language. In this case, the vertical bar is used to separate alternative options, much like an OR operator.

To type the vertical bar on most keyboards, press Shift + \.

See also: Mathematical symbols

This was last updated in August 2022

Continue Reading About vertical bar

  • 11 cloud programming languages developers need to know
  • The basics of working with declarative programming languages
  • A quick glance at the history of C programming languages
  • Interpreted vs. compiled languages: What's the difference?
  • The functional programming paradigm at enterprise scale

Related Terms

logical OR symbolIn mathematics, the logical OR symbol is a Boolean function that is positioned between two statements to indicate an inclusive ... See complete definitionrapid mobile app development (RMAD)Rapid mobile application development (RMAD) uses low-code/no-code programming tools to expedite the application creation process ... See complete definitiontruth tableA truth table is a breakdown of all the possible truth values returned by a logical expression. See complete definition

Word of the Day

neuromorphic computing

Neuromorphic computing is a method of computer engineering in which elements of a computer are modeled after systems in the human brain and nervous system.

What does the dash line mean in writing?

Dashes interrupt your writing to insert an interjection or pause, while parentheses gently add information to your point. A word of caution: although parentheses can be used throughout all writing genres, dashes are rarely used in formal academic research.

What does the long line mean in writing?

Those long straight lines draw your eye and hold your attention. But long dashes aren't just show-offs. They insert information into a sentence and introduce lists. Short dashes — technically, en dashes — aren't as showy as their wider cousins, but they're still useful.

What are dashes used for?

Dashes are used to separate groups of words, not to separate parts of words like a hyphen does. (Learn more about the difference between a dash and a hyphen here). There are three forms of dashes: em, en, and the double hyphen. The most common types of dashes are the en dash (–) and the em dash (—).

Does and/or need a slash?

Do not use a slash to separate alternatives when using "and" or "or" would suffice. Bring your new and used (not new/used) books to the exchange.