mud3 - Lecture C3: Ada syntax 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 C3: Ada syntax Response to 'Muddiest Part of the Lecture Cards' (51 respondents) 1) Why no PRS questions today, and why don't you recommend any problems we can try on our own ? (2 student s ) There will be PRS questions in more or less every lecture. Today we unfortunaley never reached my last slide and it's PRS question. If you want to try out your Ada knowledge, there are homework assignments on each lecture (in the weekly unified problem sets) and the Feldman book is filled with good examples, that all are available via the Feldman-CD. 2) Can you type cast in Ada, how to change from Integer to Float ? (2 student s ) Yes you can. Examples was shown in class, for example: 1.0 > FLOAT(0) -- change the Integer 0 into being a floating point number FLOAT(3) * 4.0 -- change the Integer 3 into being a floating point number 3 * INTEGER(4.0) -- change the Float 4.0 into being an integer 3) Difference between Ada.Text_Io and Text_Io ? (1 student) They are both identical. The package Text_Io was used in 'Ada 83'. The package Text_Io is in 'Ada 95' a sub package to Ada. It is kept for consistency reasons, so that old Ada 83 programs still can be used using the new compileras and tools. 4) How many different ways are there to store numbers, do they have different functions for each ? (1 student) Infinitely many ways. Each time you declare a new kind of number type, new functions can be instantiated. 5) Can you in a recursive function assign a number or name that already exist. E.g., number_1 := number_1 + 1; ? (1 student) Yes, all values will be saved on a "stack" and therir values will not be lost. More about details of this on later lecture. 6)
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.

Page1 / 4

mud3 - Lecture C3: Ada syntax 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