This site contains older material on Eiffel. For the main Eiffel page, see http://www.eiffel.com.

Table of Contents Previous Chapter

5.19 Class ARGUMENTS

indexing
    description: "Access to command-line arguments. This class may be used as ancestor by classes needing its facilities."
class interface
    ARGUMENTS
feature -- Access
    argument (i: INTEGER): STRING
-- i-th argument of command that started system execution
-- (the command name if i = 0)
      require
index_large_enough: i >= 0;
index_small_enough: i <= argument_count
    command_name: STRING
-- Name of command that started system execution
      ensure
definition: Result = argument (0)
feature -- Measurement
    argument_count: INTEGER
-- Number of arguments given to command that started
-- system execution (command name does not count)
      ensure
Result >= 0
end

Table of Contents Next Chapter