Changes

Ruby Operators

No change in size, 21:25, 15 November 2007
The Anatomy of a Ruby Math Operation
== The Anatomy of a Ruby Math Operation ==
In Ruby, as with most other programming languages, mathematical operations consist of values on which the calculation is to be performed (called ''operands'') and an ''operator'' which dictates the mathematical operation to be performed. Typically, the ''operands'' a replaced are placed either side of the ''operator''. Optionally, the ''assignment'' operator (=) can be used to assign the result of the operation to, for example, a variable. Let's take the most basic of operations, executed in ''irb'':
<pre>