-----Messaggio originale-----
Da: Darren H. [mailto:dhulem1 / umbc.edu] 
Inviato: sabato 12 novembre 2011 22:51
A: ruby-talk ML
Oggetto: Syntax Error

Hi All,

I am somewhat new to Ruby coding and programming altogether,



 puts "enter Product ID Number"
 product_id = gets.chomp
 CSV.foreach("c:\plantproducts.csv") do |row|  if product_id == row[0]  do
(price * qty) end end

puts "Enter Qty)
qty = gets.chomp


# the price is given in the csv file when I run the code I get an error
"syntax error, unexpected keyword_do_block do (qty * price)


Can someone give me some advice so that shit code runs?

# The CSV file has product_id, name, price , then type....if this helps at
all.

thanks

--
Posted via http://www.ruby-forum.com/.


 
 
 --
 Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f
 
 Sponsor:
 Conto Arancio al 4,20%. Zero spese e massima liberta', aprilo in due minuti!
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=11919&d=29-12