aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/glossary/类型转换
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/glossary/类型转换
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/glossary/类型转换')
-rw-r--r--files/zh-cn/glossary/类型转换/index.html27
1 files changed, 27 insertions, 0 deletions
diff --git a/files/zh-cn/glossary/类型转换/index.html b/files/zh-cn/glossary/类型转换/index.html
new file mode 100644
index 0000000000..7d1eb4c23e
--- /dev/null
+++ b/files/zh-cn/glossary/类型转换/index.html
@@ -0,0 +1,27 @@
+---
+title: Type conversion(类型转换)
+slug: Glossary/类型转换
+tags:
+ - Type
+ - 术语
+ - 类型
+translation_of: Glossary/Type_Conversion
+---
+<p class="syntaxbox">类型转换(或类型变换;英文:Type conversion, typecasting)是指将数据由一种类型变换为另一种类型。在编译器自动赋值时,会发生<em>隐式转换</em>,但在代码中,也可以用一些写法强制要求进行<em>显式转换</em>。例如:在表达式 <code>5 + 2.0</code> 中,整数 <code>5</code> 被隐式转换为浮点数,但 <code>Number("0x11")</code> 和 "0x11" 则被显式转换为数字 17。</p>
+
+<section class="Quick_links" id="Quick_Links">
+<ol>
+ <li><a href="/zh-CN/docs/Glossary">术语</a>
+
+ <ol>
+ <li>{{Glossary("Type", "类型")}}</li>
+ <li>{{Glossary("Type coercion")}}</li>
+ </ol>
+ </li>
+ <li>维基百科相关内容
+ <ol>
+ <li>{{Interwiki("wikipedia", "Type conversion")}}</li>
+ </ol>
+ </li>
+</ol>
+</section>