From: Ted Flethuseo on 26 Jun 2010 01:58 Hi everyone, I want to get some data from a user, that I want to put in an array.. well the first one is filename and the rest are a bunch of numbers which are sepparated by -i and -o options. inFile = ARGV[0] myArr = -i params myArr2 = -o params Any help appreciated. Ted. -- Posted via http://www.ruby-forum.com/.
From: botp on 26 Jun 2010 02:10 On Sat, Jun 26, 2010 at 1:58 PM, Ted Flethuseo <flethuseo(a)gmail.com> wrote: > inFile = ARGV[0] > myArr = -i params > myArr2 = -o params start fr a program that only contains: p ARGV kind regards -botp
From: Lee Jarvis on 26 Jun 2010 04:45 [Note: parts of this message were removed to make it a legal post.] On 26 June 2010 06:58, Ted Flethuseo <flethuseo(a)gmail.com> wrote: > Hi everyone, > > I want to get some data from > a user, that I want to put in an > array.. well the first one is filename > and the rest are a bunch of numbers > which are sepparated by -i and -o > options. > > > inFile = ARGV[0] > myArr = -i params > myArr2 = -o params > > Any help appreciated. > Ted. > -- > Posted via http://www.ruby-forum.com/. > > Also, check out OptionParser - http://www.ruby-doc.org/stdlib/libdoc/optparse/rdoc/index.html
From: Ted Flethuseo on 1 Jul 2010 23:06 Cool, but now I'm having some trouble transforming the array from: ["0", "1", "2", "3"] to [0,1,2,3].. how can I do this? Ted. Lee Jarvis wrote: > On 26 June 2010 06:58, Ted Flethuseo <flethuseo(a)gmail.com> wrote: > >> inFile = ARGV[0] >> myArr = -i params >> myArr2 = -o params >> >> Any help appreciated. >> Ted. >> -- >> Posted via http://www.ruby-forum.com/. >> >> > Also, check out OptionParser - > http://www.ruby-doc.org/stdlib/libdoc/optparse/rdoc/index.html -- Posted via http://www.ruby-forum.com/.
From: GianFranco Bozzetti on 1 Jul 2010 23:26 "Ted Flethuseo" <flethuseo(a)gmail.com> wrote in message news:2d79e2fe1837a47f100e9ce9efd4d72d(a)ruby-forum.com... > Cool, but now I'm having some trouble transforming the array from: > > ["0", "1", "2", "3"] to [0,1,2,3].. how can I do this? > > Ted. > > Lee Jarvis wrote: >> On 26 June 2010 06:58, Ted Flethuseo <flethuseo(a)gmail.com> wrote: >> >>> inFile = ARGV[0] >>> myArr = -i params >>> myArr2 = -o params >>> >>> Any help appreciated. >>> Ted. >>> -- >>> Posted via http://www.ruby-forum.com/. >>> >>> >> Also, check out OptionParser - >> http://www.ruby-doc.org/stdlib/libdoc/optparse/rdoc/index.html > > -- > Posted via http://www.ruby-forum.com/. > a = ["1", "2,","3"] a.map { |x| x.to_i } HTH gfb
|
Pages: 1 Prev: RCR: IO.popen4 Next: [ANN] local-openid 0.2.0 - Single User, Ephemeral OpenID Provider |