dos_compilers/Artek Ada v125/SAMPLE4.ADA
2024-07-08 09:31:49 -07:00

23 lines
523 B
Ada
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- SAMPLE4.ADA Strings
with TEXT_IO; use TEXT_IO;
procedure SAMPLE4 is
CONST : constant STRING (1..5) := "Artek";
subtype STR10 is STRING (1..10);
S4 : STRING (1..4) := " Ada";
S10 : STR10 := ('C', 'o', 'm', 'p', 'i', 'l', 'e', 'r', others => ' ');
S20 : STRING (1..21) := (others => ' ');
begin
S20 (S20'FIRST .. CONST'LAST) := CONST;
S20 (CONST'LAST + 1 .. CONST'LAST + S4'LAST + S10'LAST + 1) :=
S4 & " " & S10;
NEW_LINE (2);
PUT_LINE (S20);
end SAMPLE4;