Though i’d give ruby a try
from the book you get when installing ruby 1.8.6 about the program Song.
this is the code i pasted into SciTE.
def initialize(name, artist, duration)
@name = name
@artist = artist
@duration = duration
this i saved as Song.rb
In the output window i type ruby aSong.rb
ruby: No such file or directory – aSong.rb (LoadError)
Exit code: 1
and with parameters i get
ruby aSong.rb(“me Myself and I”," we are sailing",180)
ruby: No such file or directory – aSong.rb(me Myself and I, we are
Exit code: 1
I was expecting it to drop back to the prompt without giving an error.
anyone explain to me what i’m not doing right?
I’m playing at present and would like to go through a worked example
tutorial of say a name address app where you…
- You punch in the data and it spits out to screen.
- Take that and get user input from screen and dump to screen.
- Take user input and output to text file.
- Take user input and allow data to be edited and then written to file
all this as a cmd line app (don’t want to get too greedy and bog myself
down with gui stuff or web stuff yet! (not done any cgi or web dev at
Also note i understand OOp but in the past theory and practical work has
left me with a big hole that i’ve not been able to cross.
anyhow wait for comments