- 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.
推薦閱讀
- Python程序設計教程(第2版)
- Java應用與實戰
- INSTANT OpenCV Starter
- Oracle 11g從入門到精通(第2版) (軟件開發視頻大講堂)
- Reactive Programming with Swift
- HTML5+CSS3網站設計基礎教程
- The HTML and CSS Workshop
- ExtJS高級程序設計
- Learning Node.js for .NET Developers
- Xamarin Blueprints
- SQL Server實例教程(2008版)
- 虛擬現實建模與編程(SketchUp+OSG開發技術)
- Vue.js 3.x高效前端開發(視頻教學版)
- Building Clouds with Windows Azure Pack
- Hands-On ROS for Robotics Programming