Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Slash (punctuation)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Computing=== The slash, sometimes distinguished as "forward slash", is used in [[computing]] in a number of ways, primarily as a separator among levels in a given hierarchy, for example in the path of a filesystem. ====File paths==== The slash is used as the [[path (computing)|path]] component separator in many [[computer]] operating systems (e.g., Unix's {{mono|pictures/image.png}}). In [[Unix]] and [[Unix-like]] systems, such as [[macOS]] and [[Linux]], the slash is also used for the [[volume (computing)|volume]] [[root directory]] (e.g., the initial slash in {{mono|/usr/john/pictures}}). Confusion of the slash with the backslash {{angle brackets|\}} largely arises from the use of the latter as the path component separator in the widely used MS-DOS and [[Microsoft Windows]] systems.<ref name="jed" /><ref name="turton" /> ====Networking==== The slash is used in a similar fashion in internet [[Uniform Resource Locator|URLs]] (e.g., {{mono|<nowiki>https://en.wikipedia.org/wiki/Slash_(punctuation)</nowiki>}}).<ref name="solidhart" /> Often this portion of such URLs corresponds with files on a Unix [[computer server|server]] with the same name, and this is where this convention for [[internet]] URLs comes from. The slash in an [[IP address]] (e.g., {{mono|192.0.2.0/29}}) indicates the prefix size in [[CIDR notation]]. The number of addresses of a [[Subnetwork|subnet]] may be calculated as 2{{sup|address size β prefix size}}, in which the address size is 128 for [[IPv6]] and 32 for [[IPv4]]. For example, in IPv4, the prefix size/29 gives: 2{{sup|32β29}} = 2{{sup|3}} = 8 addresses. ====Programming==== The slash is used as a [[#Division|division operator]] in most [[programming language]]s while [[APL (programming language)|APL]] uses it for reduction ([[Fold (higher-order function)|fold]]) and compression ([[Filter (higher-order function)|filter]]). The double slash is used by [[Rexx]] as a [[#Mod|modulo operator]], and [[Python (programming language)|Python]] (starting in version 2.2) uses a double slash for division which rounds (using [[Floor and ceiling functions|floor]]) to an integer. In [[Raku (programming language)|Raku]] the double slash is used as a "defined-or" alternative to '''||'''. A dot and slash {{angle brackets|./}} is used in [[MATLAB]] and [[GNU Octave]] to indicate an element-by-element division of matrices. [[comment (computer programming)|Comments]] that begin with {{mono|'''/*'''}} (a slash and an asterisk) and end with {{mono|'''*/'''}} were introduced in [[PL/I]] and subsequently adopted by [[SAS System|SAS]], [[C (programming language)|C]], Rexx, [[C++]], [[Java (programming language)|Java]], [[JavaScript]], [[PHP]], [[Cascading Style Sheets|CSS]], and [[C Sharp (programming language)|C#]]. A double slash {{mono|'''//'''}} is also used by [[C99]], C++, C#, PHP, Java, [[Swift (programming language)|Swift]], [[Pascal (programming_language)|Pascal]] and JavaScript to start a single line comment. In [[SGML]] and derived languages such as [[HTML]] and [[XML]], a slash is used in closing tags. For example, in HTML, {{mono|<b>}} begins a section of {{strong|bold}} text and {{mono|</b>}} closes it. In XHTML, slashes are also necessary for "self-closing" elements such as the [[newline]] command {{nowrap|{{mono|<br />}}}} where HTML has simply {{nowrap|{{mono|<br>}}}}. In a style originating in the [[Digital Equipment Corporation]] line of operating systems ([[OS/8]], [[RT-11]], [[TOPS-10]], et cetera), [[Windows (operating system)|Windows]], [[DOS]], some [[CP/M]] programs, [[OpenVMS]], and [[OS/2]] all use the slash to indicate [[command-line option]]s. For example, the command {{mono|dir/w}} is understood as using the command [[dir (command)|dir]] ("directory") with the "wide" option. No space is required between the command and the switch; this was the reason for the choice to use backslashes as the path separator since one would otherwise be unable to run a program in a different directory. Slashes are used as the standard delimiters for [[regular expression]]s, although other characters can be used instead. [[IBM JCL]] uses a double slash to start each line in a batch job stream except for /* and /&. ====Programs==== [[Internet Relay Chat|IRC]] and many in-game chat clients use the slash to mark commands, such as joining and leaving a chat room or sending private messages. For example, in IRC, {{mono|/join #services}} is a command to join the [[IRC channels|channel]] "services" and {{mono|/me}} is a command to format the following message as though it were an action instead of a spoken message. In ''[[Minecraft]]''{{'}}s chat function, the slash is used for executing console and plugin commands. In ''[[Second Life]]''{{'}}s chat function, the slash is used to select the "communications channel", allowing users to direct commands to virtual objects "listening" on different channels. For example, if a virtual house's lights were set to use channel 42, the command "/42 on" would turn them on. In [[Discord (software)|Discord]], slash commands are used to send special messages and execute commands, like sending a [[shrug|shrug emoji (Β―\_(γ)_/Β―)]] or a table flip emoji ((β―Β°β‘Β°)β―οΈ΅ β»ββ»), or changing one's nickname using "/nick". Slash commands can also be used to use Discord bots. The [[Gedcom]] standard for exchanging computerized genealogical data uses slashes to delimit surnames; an example would be Bill /Smith/ Jr. Slashes around surnames are also used in [[Personal Ancestral File]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)