[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Error in Loop!!

Robert Dober

10/2/2007 1:52:00 PM

On 10/2/07, John Nott <JNott@dto.ie> wrote:
> Hi Everyone!
> I keep getting the following error message for this line of the below code:
>
> mat1[r,c] << this_record.chomp(",").strip()
You try to append the RHS to a float, which is what
mat1[r,c] evaluates to, that does not work of course.

It is difficult to fix the error because I do not know what you want to achieve
depending on the API of OtMatrix maybe the following would make sense

mat1[r] << RHS # adding an element to a row, however now you might
have an irregular matrix
mat1 << RHS # adding a new line at the end of the Matrix, is this what you want?

HTH
Robert
--
what do I think about Ruby?
http://ruby-smalltalk.blo...