Afficher un message
Vieux 10/06/2008, 05h50   #4
David Masover
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: picking through a script

On Monday 09 June 2008 04:24:25 Gerry Ford wrote:

> It looks like ARG.delete is a way to get command line args. How would
> this behave if no command-line args are given?


Well, ARGV is an array of commandline arguments -- it behaves exactly like any
other array. A little testing shows that calling delete from an array will
either return the item asked for, or nil.

So in this case, RAW will be either '-r' or nil, depending on whether there's
a -r in the commandline. Same for MBX and '-m' -- so with no commandline
arguments, RAW and MBX will both be nil.

  Réponse avec citation
 
Page generated in 0,04632 seconds with 9 queries