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

35 lines
756 B
Ada
Raw Permalink 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.

-- SAMPLE3.ADA Overloading
with TEXT_IO; use TEXT_IO;
procedure SAMPLE3 is
procedure NAME (I : in INTEGER) is
begin
PUT_LINE ("Following is an integer => " & INTEGER'IMAGE (I));
NEW_LINE (2);
end NAME;
procedure NAME (I : in STRING) is
begin
PUT_LINE ("Following is a string => " & I);
NEW_LINE (2);
end NAME;
procedure NAME (I : in CHARACTER) is
begin
PUT_LINE ("Following is a character => " & I);
NEW_LINE (2);
end NAME;
begin
NEW_LINE (2);
NAME ('A'); -- NAME with character parameter
NAME ("This is a string"); -- NAME with string parameter
NAME (100); -- NAME with integer parameter
end SAMPLE3;