code-examples/2015/2015_03/ada/nauka/cl/cl3.adb

38 lines
688 B
Ada
Raw Normal View History

2025-03-09 10:58:55 +00:00
with Ada.Text_IO;
with Ada.Command_Line;
with Ada.Strings.Fixed;
procedure cl3 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 (1..1000);
begin
SF.Move (
Source => CL.Argument (1),
Target => X,
Drop => S.Right,
Justify => S.Left,
Pad => Character'Val(0));
T_IO.Put ("Argument 1 = ");
T_IO.Put (X);
SF.Move (
Source => CL.Argument (2),
Target => X,
Drop => S.Right,
Justify => S.Left,
Pad => Character'Val(0));
T_IO.Put ("Argument 2 = ");
T_IO.Put_Line (X);
end cl3;