From: Tom Werner Date: 2007-08-04T07:22:14+09:00 Subject: Re: percentage in Ruby Li Chen wrote: > Hi all, > > How to write percentage in Ruby, for instance 1.2%? Do I have to change > it to 0.012 before I apply other operation on it? It looks like "%" is > used for other purpose in Ruby. > > Thanks, > > Li > Yes, % is the modulo operator, so 1.2 percent would indeed be best represented as 0.012 in your code. Tom