Figure 35.
The first Get_Command_Line procedure.
---------------------------------------------------------
-- GCLBAIBM.ada
-- 19 October 1987
-- Do-While Jones
-- 324 Traci Lane
-- Ridgecrest, CA 93555
-- (619) 375-4607
-- This version works with Alsys Ada on the IBM
-- PC. The Alsys DOS package contains a
-- function Get_Parms which returns a string
-- with a length depending upon the number of
-- characters entered by the user. Since this
-- probably isn't the exact number of
-- characters requested by the calling program,
-- a little bit of data massaging has to be
-- done to put the command line in the first
-- part of the longer output string.
with DOS;
procedure Get_Command_Line(S : out string;
L : out natural) is
procedure Extract(S_IN : string;
S_OUT : out string;
L : out natural) is
begin
L := S_IN'LENGTH;
S_OUT(1..S_IN'LENGTH) := S_IN;
end Extract;
begin
Extract(DOS.Get_Parms, S, L);
end Get_Command_Line;