mud16 - Lecture C16 Records Response to'Muddiest Part of...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture C16: Records Response to 'Muddiest Part of the Lecture Cards' (38 respondents) 1) In defining record 'My_First_Record' you just said ("Name", "Age", "Location") Is that acceptable? Shoouldn't you define each input separately? (1 student) I assume it is the code for Concept question 1 you are refering to. There is no input operations at all in that file. The record is declared at the top, where each field in the record gets its name and what type each field should be. type My_Record_1 is record Name : String (1. .10); Age : Integer; Location : String ( 1. .10); end record ; After those declarations we assigned 2 records and give them their values: My_First_Record : My_Record_1 := ("John Doe ", 25,"Detroit Mi"); My_Second_Record : My_Record_2 := ("Jane Doe ", 30,"New York "); Which meens that "My_First_Record" is a record of type 'My_Record_1' and at the same time gets assigned values for each field. Within the main section of the procedure we then perform operations on these two reocrds, My_First_Record and My_Second_Record. 2 ) In your code, you often use Put("Blah"), but when I've tried this command, I get a compilation error. I have to use Ada.Text_Io.Put("Blah"); Why? (1 student) That is correct. You will always have to use the correct IO routines for the kind of types you want to
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/20/2012 for the course AERO 16.02 taught by Professor Charlescoleman during the Winter '12 term at MIT.

Page1 / 5

mud16 - Lecture C16 Records Response to'Muddiest Part of...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online