dimanche 28 juin 2015

syntax error, unexpected tINTEGER, expecting '('

My code is

 for i in 0..array_dif.count-1
   a = array_dif[i] - array_dif[0]
   b = array_dif[array_dif.count-1] - array_dif[0]
   norm = a.0/b
   array_norm[i] = norm
 end

And i'm getting the following error:

rb:135: no .<digit> floating literal anymore; put 0 before dot (SyntaxError)
    norm = a.0/b
             ^
C:/piegas/config/initializers/backtrace_silencers.rb:135: syntax error, unexpected tINTEGER, expecting '('
    norm = a.0/b
              ^

I don't know whats wrong with it

Aucun commentaire:

Enregistrer un commentaire