Ruby自学札记:类型,对象

Ruby自学笔记:类型,对象一. 注释单行注释# This entire line is a commentx #This is a string# And t

Ruby自学笔记:类型,对象
一. 注释

单行注释

# This entire line is a commentx = "#This is a string"               # And this is a commenty = /#This is a regular expression/   # Here's another comment


多行注释

=begin Someone needs to fix the broken code below!    <emphasis>Any code here is commented out</emphasis>=end


文档注释

# Rdoc comments use a simple markup grammar like those used in wikis. # Separate paragraphs with a blank line.# # = Headings# # Headings begin with an equals sign# # == Sub-Headings# The line above produces a subheading.# === Sub-Sub-Heading# And so on.


阅读全文