Lecture 5 - September 10, 2007

 

We reviewed the difference between a file name and an Ada  file_type

We discussed the modes for a file:  in_file, out_file, append_file

We discussed the three parameter modes of Ada

            in   --   passes a value into a sub-program  (i.e. copies the value in)

            out --   passes a value back to a calling program (i.e. copies the value out)

            in out --  passes a value into a sub-program (i.e. copies the value in) and copies the value out at the end of the

                           sub-program. [ NOTE:  this is not identical to pass by reference because if the sub-program aborts,

                           nothing is copied back]

 

We talked about

            the use of  others =>   in an Ada String  

            SEE:  play_with_others.adb

 

We discussed the importance of initializing the variables that will hold the user's input and output file names to blanks.

 

We learned that get_line and put_line only work for String not for Character

 

We learned that get_line not only returns a String, it returns the length of the String as an integer.

 

We used the Ada 95 language reference manual to see how to use

            ada.text_io.end_of_file   

 

We looked up the syntax for a while loop

 

We looked up the binary logical operators

            and

            or

            xor

and the unary logical operator 

            not

 

We discussed the difference between the short circuit operators  and then and or else  and the normal binary logical operators  and and or.

 

 

We skimmed the slides for Chapter 1

 

We skimmed the slide for Chapter 2

 

We have an assignment due by 11:59pm on Tuesday. 

 

We do not have class on Wednesday - instead we will have to go on line and complete an assignment during class time.