Lecture_2

Topics Discussed

 

Read pages x, xi, xii of Preface

          URLs important

 

Watched video of train in the Real-Time Embedded Systems Laboratory which is programmed in Ada by students to run

Interesting points

          10,000-15,000 lines of code to complete project

          first 6 years of course students programmed in C and NO group completed the project

          since switching to Ada, 80% of the groups complete the project

 

Handed out Gold Sheet describing Ada Syntax

 

Showed what GNAT Ada will look like on system

 

Showed how to compile, link and run Ada programs under JGrasp

 

Sample programs discussed in class are available as HTML documents 

          Example1.adb

          TestPut2.adb

 

Also discussed type declarations on page 15 of text

 

Discussed

          instantiation

          type compatibility

          semi-colon as a statement terminator

          main program unit is a procedure

          every program needs at least one executable statement between the begin and the end

          to produce output need appropriate WITH clauses

          Ada is NOT case sensitive – but we will use standard style conventions although we didn’t do so today

          Ada has reserved words

          ability to input and output enumerated type values directly

          use of named parameters

          := is the assignment operator

          -- on a line indicates the start of a comment and no code can follow the comment

          => is called an “arrow” and we saw its use in named parameter passing

            is called a tick – all discrete types have attributes such as ‘first  and ‘last 

          if you want to output different types of values on a single line, you will need a separate put statement for each value

          Ada has three different parameter passing modes

          and ...