tash_8.7.2_4c588c12/src/cargv-test.adb

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
--  $Id$

with Ada.Exceptions;
with Ada.Text_IO; use Ada.Text_IO;

procedure CArgv.Test is
   Argv : Chars_Ptr_Ptr
     := Empty & "this" & "is" & "four" & "arguments";
begin
   for I in 0 .. 4 loop
      Put_Line (I'Img & " " & Arg (Argv, CNatural (I)));
   end loop;
exception
   when E : others =>
      Put_Line (Ada.Exceptions.Exception_Information (E));
end CArgv.Test;