Tuesday, June 27, 2006

Some features of Ruby

Now, let us explore some of the features of Ruby.
  1. Free format
  2. Case sensitive
  3. Comments - Anything following an unquoted #, to the end of the line on which it appears, is ignored by the interpreter. Also, to facilitate large comment blocks, the ruby interpreter also ignores anything between a line starting with "=begin" and another line starting with "=end"
  4. Statement delimiters - Multiple statements on one line must be separated by semicolons, but they are not required at the end of a line; a linefeed is treated like a semicolon. If a line ends with a backslash (\), the linefeed following it is ignored; this allows you to have a single logical line that spans several lines
  5. Documentation - The complete documentation for Ruby is available online here.


First Post | Previous | Next


Technorati Tags:
Blogs linking to this article

2 Comments:

Blogger Anish Betawadkar said...

Will it be better to talk about escape characters here? What I mean is, how can we escape these special characters? (=Begin, \, #)

Anish

1:06 PM  
Blogger Anish Betawadkar said...

Got the answer in the next blog. Thanks. Using a "\" we can escape the characters. To escape "\" simple use it twice "\\"

Anish

2:40 PM  

Post a Comment

Links to this post:

Create a Link

<< Home