On 21.04.2008 21:48, Tim Wolak wrote:
> Afternoon all,

Good night.

> I have a set of files that are downloaded via ftp which I iterate over and
> grab account numbers are their balances.  I have been able to iterate over
> the individual lines and get my data however the account balances are gather
> by getting their specific position on current line and the position just
> before the account balance is a "0" or a "-", which indicates if the balance
> is a positive or a negative number.
> 
> My issue is what is the best way to have ruby indicate this float number as
> a negative number so when I compare account balances from the current day
> and the previous that the difference is calculated correctly?

Floats can be negative and positive.  There is nothing extra you need to do.

Note however that if you want correctness with currency values it is 
better to use BigDecimal instead of Float because of the increased 
exactness.  Floats may be sufficient in your case but you should keep in 
mind that there are some issues lurking.

Kind regards

	robert