code-examples/2015/2015_03/ada/nauka/parse/cl1.adb

28 lines
541 B
Ada

with Ada.Text_IO;
with Ada.Command_Line;
with Ada.Strings.Fixed;
procedure cl2 is
package T_IO renames Ada.Text_IO;
package CL renames Ada.Command_Line;
package S renames Ada.Strings;
package SF renames Ada.Strings.Fixed;
X : String := CL.Argument (1);
begin
T_IO.Put ("Argument 1 = ");
T_IO.Put_Line (X);
SF.Move (
Source => CL.Argument (2),
Target => X,
Drop => S.Right,
Justify => S.Left,
Pad => S.Space);
T_IO.Put ("Argument 2 = ");
T_IO.Put_Line (X);
end cl2;