-----Messaggio originale-----
Da: jake kaiden [mailto:jakekaiden / yahoo.com]=20
Inviato: luned=EC 14 novembre 2011 12:12
A: ruby-talk ML
Oggetto: Re: How to use csv files in ruby

hi Nehal

nehal sharma wrote in post #1031717:
> ........
>     elsif answer =3D=3D "n"
>       register_new_customer
> ........
>
> def register_new_customer ( customer_id, fname, lname, address1,=20
> address2, city, state, zip, ph_no) ........

  notice that you call register_new_customer with no arguments, but =
define
it to take 9 arguments.  this will certainly cause errors.  the
register_new_customer method is where all of that information is =
collected
and stored (where the 'salesman' asks you your data and records
it...)  you don't know any of that information yet when you call the
register_new_customer method, so leave off the arguments:

  .......
    elsif answer =3D=3D "n"
      register_new_customer
  .......

  def register_new_customer
    puts "Enter first name please"
    fname =3D gets.chomp
    ........ etc.
  end


  looks like you're on the right track, keep at it!

  - j

--
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:
 Capodanno al parco Oltremare Riccione: Pacchetto hotel 3 stelle in centro + ingresso al parco. 
* Mezza pensione, Internet gratis, animazione per bimbi. Scopri l'offerta!
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=11981&d=29-12