知名百科  > 所属分类  >  文化百科   

斜杠

“/”意指斜杠,主要分正斜杠(forward slash'/')和反斜杠(back slash'\'),它是电脑符号。正斜杠一般作为除法符号或者间隔符号使用,主要用于间隔使用。越来越多的人会使用“/”作为“或”的意思,但实际上它只作为间隔符号。

Famous Encyclopedia String

目录

发展历程 编辑本段

操作系统

设计了这种路径分隔法,它使用斜杠:/。由于网络是首先应用在 UNIX 计算机之间的,至今为止,一半以上的网络服务器仍是使用 UNIX 操作系统,所以网址也沿用了斜杠作路径分隔符。

Famous Encyclopedia String

DOS 2.0

从 UNIX 中借鉴了这种目录结构,但由于 DOS 中,斜杠已经用来作为命令行参数的标志了(UNIX 中用的是“ - ”符),所以只得使用反斜杠:\ Famous Encyclopedia String

Windows 时代

很多时候已经没有命令行参数的干扰,加上网络使用的扩展,现在斜杠和反斜杠大多时候可以互换,没有什么影响。

Famous Encyclopedia String


Famous Encyclopedia String

编程设计

在程序设计,斜线在Unicode字符是U+002F、ASCII字符是47。ISO及Unicode.org画定为固相线,并作“FRACTION SLASH”分数斜线,与英语排板术语有着矛盾。

Famous Encyclopedia String

使用情况 编辑本段

1.在大部分编程语言,斜线/是分数的运行者。Python的2.2版开始使用双斜线//作整数除法及下舍入法。不过,Python 3中,/除法的结果都是浮点值。 https://www.qwbaike.cn

2.C语言、C++和C#里表示代码的注释,以/*开始,以*/结束。

Famous Encyclopedia String

斜杠斜杠

3.C99、C++、C#、PHP及Java同时有双斜线//为注释之用。 Famous Encyclopedia String

https://www.qwbaike.cn

4.在SGML、标记语言HTML和XML,斜线用作结束标记的其中一员。 Famous Encyclopedia String

Famous Encyclopedia String

5.斜线作为正则表达式的标准界定

Famous Encyclopedia String

Famous Encyclopedia String

6.斜线用来表示斜体italics,当无格式表示,如/Italic text/

Famous Encyclopedia String

Famous Encyclopedia String

Google

在 Gmail 中,如果你给 label 命名为 abc/def,那么通过 IMAP 维护邮箱时会发现,abc 是 def 的上层目录。也就是说你可以给 label 增加一层(或多层)目录。 Famous Encyclopedia String

在Google Analytics 中也可以见到斜杠的身影。常用 Analytics 的人知道,可以用 pageTracker._trackPageview("/abc/def"); 来重命名内容,并且可以通过 Content Drilldown 来查看 abc 的访问情况(包含 def),也可以展开,单独查看 def 的访问情况。不过即使不通过 _trackPageview() 来重命名内容,默认是 URL,URL 也是用斜杠区分的。 Famous Encyclopedia String
Famous Encyclopedia String

通过Google的例子可以看到斜杠在表示目录、层级关系时发挥的作用。相信在 Google 的其他很多产品中也会有很多斜杠的妙用。

Famous Encyclopedia String

Famous Encyclopedia String

输入方法

第四行的倒数第二个按钮。需要切换到英文输入法,或者直接通过小键盘输入。

Famous Encyclopedia String

内容简介 编辑本段

1、在很多时候,需要在打字的时候输入斜杠/或者反斜杠\ ,作为一种间隔符号来使用,用来分隔字体。 Famous Encyclopedia String

2、但是如果在中文状态下,找到键盘上的/键,就只会打出顿号,那怎么才能打出/这个符号呢? qwbaike.cn

Famous Encyclopedia String

3、只需要将键盘输入法的状态调到英文,再按/键就可以了,如果想要打出汉字,只需要再把中文状态切换回来就好。

Famous Encyclopedia String


www.qwbaike.cn

4、你也可以选择用符号打出/键,在你的文档中找到符号,找到/键,点击,你就可以使用/键了

Famous Encyclopedia String

Famous Encyclopedia String

5、当然,也可以利用360,输入斜杠进行搜索,然后就想复制黏贴,这样也可以使用/键了。 Famous Encyclopedia String

Famous Encyclopedia String

6、出反斜杠的方法也是上面打出斜杠的方法。

https://www.qwbaike.cn


Famous Encyclopedia String

正反含义 编辑本段

正斜杠

表示除法,分隔,在windows系统中通常用来分隔命令行参数,/ 表示选项等。不能作为文件名isiss/。

qwbaike.cn

正斜杠"/"在某些文档里面表示“顿号”,如通讯方式GSM/GPRS/3G,表示这三类通讯方式都可以支持。

Famous Encyclopedia String


Famous Encyclopedia String

反斜杠

在windows系统中,\ 用来表示目录。

www.qwbaike.cn

而在unix系统中,/ 表示目录。

Famous Encyclopedia String

Famous Encyclopedia String

由于web遵循unix命名,所以在网址(URL)中,/ 表示目录。 Famous Encyclopedia String
www.qwbaike.cn

鉴于不同的人对正反有不同的理解。

Famous Encyclopedia String

Famous Encyclopedia String

有部分中国国内的计算机使用者开始使用【撇斜杠】和【捺斜杠】来对应“正斜杠”和“反斜杠” Famous Encyclopedia String

Famous Encyclopedia String

以便达到快速交流理解的目的。或可简称为【撇杠】和【捺杠】。 Famous Encyclopedia String

https://www.qwbaike.cn

附件列表


0

词条内容仅供参考,如果您需要解决具体问题
(尤其在法律、医学等领域),建议您咨询相关领域专业人士。

如果您认为本词条还有待完善,请 编辑

上一篇    下一篇 carplay

标签

同义词