.

Sunday, April 15, 2012

[Ruby] Function Syntax

          Hello, Reader ^^! Back again with source code. This time is a basic syntax Function in Ruby programming language. This source code is to show how to do  Function statement in Ruby language. Here's the template:


def <FunctionName>(<input1>,...,<inputN>)
       <Statement>
       return <value>
end

Note:  <input1>,...,<inputN>  is optional, only use it if there is input required in the function

Okay, that's all I can say. Thank you for reading ^^!








No comments:

Post a Comment