View Single Post
  #2 (permalink)  
Old 03-27-2008, 10:43 PM
nnraja nnraja is offline
D-Web Programmer
 
Join Date: May 2007
Posts: 94
nnraja is on a distinguished road
Default Re: Ruby Datastructure

Data structures is a generalized name for arrays,hashes,string
Data structures have been invented because simple variables are not enough for solving more complex problems.
Methods are give other names too, such as functions,subprograms or procedures, while in other programming languages there might be several differences between all these, they all mean pretty much the same thing in Ruby, although everyone is trying to using the term "method" only.

Here's how you define a method:

def mymethod
puts "this is my first method"
end
Reply With Quote