Created
September 18, 2015 19:26
-
-
Save kylelk/4cdcc51accf95b3bbc41 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with Ada.Text_IO; | |
use Ada; | |
procedure name_test is | |
type Person is record | |
firstName, lastName : String (1 .. 20); | |
nameLength : Natural; | |
end record; | |
procedure get_person(person_info: out Person) is | |
begin | |
Text_IO.Put("first name: "); | |
Text_IO.Get_line(person_info.firstName, person_info.nameLength); | |
Text_IO.Put("last name: "); | |
Text_IO.Get_line(person_info.lastName, person_info.nameLength); | |
end get_person; | |
procedure display_person(person_info: in Person) is | |
begin | |
Text_IO.Put("first name: "); | |
Text_IO.Put_Line(person_info.firstName); | |
Text_IO.Put("last name: "); | |
Text_IO.Put_Line(person_info.lastName); | |
end display_person; | |
new_member : Person; | |
begin | |
get_person(new_member); | |
display_person(new_member); | |
end name_test; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment