Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Slash (punctuation)
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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!
====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 /&.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Slash (punctuation)
(section)
Add topic