-- Code to try the command line arguments
with ada.text_io; use ada.text_io;
with ada.integer_text_io; use ada.integer_text_io;

with ada.command_line; 

procedure cmdline is
    -- A renames helps show what's in the package without too much typing
    package cl renames ada.command_line;
begin
    -- Output the name of the command
    put_line("The name of the command is: " & cl.command_name);

    -- Output the number of command line arguments
    put_line("Argument_Count: " & cl.argument_count'img);

    -- Output each command line argument
    put_line("The Arguments are:");
    for i in 1 .. cl.argument_count loop
        set_col(5);
        put_line(cl.argument(i));
    end loop;
end cmdline;