- Comprehensive Ruby Programming
- Jordan Hudgens
- 100字
- 2021-07-02 21:13:25
Printing strings

In the preceding code snippet, we're printing out a string that we have properly wrapped in quotation marks. Note that both single and double quotation marks work properly.
It's also important that you do not mix the quotation mark types. For example, run the following code:
puts "Name an animal'
You will get an error, because you need to ensure that every quotation mark is matched with a closing (and matching) quotation mark.
If you start a string with a double quotation mark, the Ruby parser requires that you end the string with a matching double quotation mark.
推薦閱讀
- C#高級編程(第10版) C# 6 & .NET Core 1.0 (.NET開發經典名著)
- Advanced Machine Learning with Python
- Intel Galileo Essentials
- Python自然語言處理實戰:核心技術與算法
- Building a Game with Unity and Blender
- Python從入門到精通(精粹版)
- 教孩子學編程:C++入門圖解
- 大學計算機基礎(第2版)(微課版)
- Visual FoxPro程序設計
- Python編程從0到1(視頻教學版)
- Mastering Android Game Development
- Swift 4從零到精通iOS開發
- Spring 5 Design Patterns
- Maker基地嘉年華:玩轉樂動魔盒學Scratch
- C++程序設計教程