PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.ruby > my first program just shuttin' down
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
my first program just shuttin' down

Réponse
 
LinkBack Outils de la discussion
Vieux 08/06/2008, 19h14   #1
Ruby Noob
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut my first program just shuttin' down

Why? I tryin' to open the "hello.rb" program, but it just shuttin' down
why?
The hello.rb file, look's like this...

#!/usr/bin/ruby
print "Hello World"

and by the way... is methods like functions and object's in PHP? Could
some nice guy tell me the basic of methods, why it's important in Ruby
programmin' and so on.
--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Vieux 08/06/2008, 19h25   #2
Sam Rudd
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: my first program just shuttin' down

[Note: parts of this message were removed to make it a legal post.]

I can't with the title question, nor do I know the ins and outs of
Ruby, but I'm aware methods add functionality to classes.

Sorry I can't be any more .

On Sun, Jun 8, 2008 at 7:14 PM, Ruby Noob <john_@live.se> wrote:

> Why? I tryin' to open the "hello.rb" program, but it just shuttin' down
> why?
> The hello.rb file, look's like this...
>
> #!/usr/bin/ruby
> print "Hello World"
>
> and by the way... is methods like functions and object's in PHP? Could
> some nice guy tell me the basic of methods, why it's important in Ruby
> programmin' and so on.
> --
> Posted via http://www.ruby-forum.com/.
>
>


  Réponse avec citation
Vieux 08/06/2008, 19h33   #3
AzimuthDragon
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: my first program just shuttin' down

For one thing, a proper Ruby script ends and terminates itself at the end of
the file if there were no errors. Use IRB instead to play with Ruby, or use
the command prompt and ruby helloworld.rb.




You can also create a Windows command script if you wanted.

--------------------------------------------------
From: "Ruby Noob" <john_@live.se>
Sent: Sunday, June 08, 2008 11:14 AM
Newsgroups: comp.lang.ruby
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
Subject: my first program just shuttin' down

> Why? I tryin' to open the "hello.rb" program, but it just shuttin' down
> why?
> The hello.rb file, look's like this...
>
> #!/usr/bin/ruby
> print "Hello World"
>
> and by the way... is methods like functions and object's in PHP? Could
> some nice guy tell me the basic of methods, why it's important in Ruby
> programmin' and so on.
> --
> Posted via http://www.ruby-forum.com/.
>
>


  Réponse avec citation
Vieux 08/06/2008, 19h38   #4
Ruby Noob
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: my first program just shuttin' down

Cool, thanks a lot for the information, both of you. But if we sailing
over to the next question "What is method?" I've learn a lot of basic
method, i think like sort, max, reverse, length and so on. I got to know
more about it, thanks again / Ruby Noob
--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Vieux 08/06/2008, 19h41   #5
AzimuthDragon
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: my first program just shuttin' down

Gladly, it's better to ask a question and be a fool for five minutes instead
of not asking and not letting us . =)

--------------------------------------------------
From: "Ruby Noob" <john_@live.se>
Sent: Sunday, June 08, 2008 11:38 AM
Newsgroups: comp.lang.ruby
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
Subject: Re: my first program just shuttin' down

> Cool, thanks a lot for the information, both of you. But if we sailing
> over to the next question "What is method?" I've learn a lot of basic
> method, i think like sort, max, reverse, length and so on. I got to know
> more about it, thanks again / Ruby Noob
> --
> Posted via http://www.ruby-forum.com/.
>
>


  Réponse avec citation
Vieux 08/06/2008, 20h11   #6
David Masover
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: my first program just shuttin' down

On Sunday 08 June 2008 13:38:01 Ruby Noob wrote:
> Cool, thanks a lot for the information, both of you. But if we sailing
> over to the next question "What is method?"


A method is a function/subroutine which is associated with an object. In Ruby,
there are no functions/subroutines which are not methods.

For more than you probably ever wanted to know:

http://en.wikipedia.org/wiki/Method_(computer_science)

Otherwise, you probably want to start at the beginning -- pick up a Ruby book
(or tutorial, etc) which is targeted at non-programmers. If you don't know
what a method is, you're going to have to learn object-oriented programming
as you learn Ruby.

  Réponse avec citation
Vieux 08/06/2008, 20h41   #7
Axel Etzold
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: my first program just shuttin' down


-------- Original-Nachricht --------
> Datum: Mon, 9 Jun 2008 04:11:25 +0900
> Von: David Masover <ninja@slaphack.com>
> An: ruby-talk@ruby-lang.org
> Betreff: Re: my first program just shuttin\' down


> On Sunday 08 June 2008 13:38:01 Ruby Noob wrote:
> > Cool, thanks a lot for the information, both of you. But if we sailing
> > over to the next question "What is method?"

>
> A method is a function/subroutine which is associated with an object. In
> Ruby,
> there are no functions/subroutines which are not methods.
>
> For more than you probably ever wanted to know:
>
> http://en.wikipedia.org/wiki/Method_(computer_science)
>
> Otherwise, you probably want to start at the beginning -- pick up a Ruby
> book
> (or tutorial, etc) which is targeted at non-programmers. If you don't know
> what a method is, you're going to have to learn object-oriented
> programming
> as you learn Ruby.


Hi ---

if you want a nice online introduction into Ruby, I'd suggest Chris Pine's
Learn to Program (http://pine.fm/LearnToProgram/).
It teaches you Ruby from no pre-knowledge to using classes for a
small dragon in a game.
With respect to the shutting down part of your question: are you on Windows ?
It might be that your program runs nicely and quits without errors, but that
the window it runs in gets closed, as Windows routinely behaves like that.
You can try out irb in the one-click installer for Windows instead. Or you use
scite (I think it#s included with the one-click installer) or some other editor where you can run scripts in. Then you'll see the result in a special window.

Best regards,

Axel








--
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser

  Réponse avec citation
Vieux 09/06/2008, 06h42   #8
Ruby Noob
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: my first program just shuttin' down

Hello. Yeah, I did install the "Windows On-Click-Installer". In this
week i'll try to get a book, or hopely a good intrducin' to Ruby. If
your'e knowin' a good introducin' please tell me. This is the dummiest
question ever, but is ruby used for applications or websites? Wikipedia
didn't tell me so much.

I'll test the book you recommend.
--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 13h05.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,17183 seconds with 16 queries