140 likes | 256 Views
ADA. Loading… …. 乔梁. 5110379030. What is ADA ?. 啊哒!!. contents. History Language Features Others. History. Jean David Ichbiah (25 March 1940 – 26 January 2007). United States Department of Defense. Ada Lovelace ( 10 December 1815 – 27 November 1852). History. --Ada 83 --Ada 95
E N D
ADA Loading… … 乔梁 5110379030
What is ADA? 啊哒!!
contents History Language Features Others
History Jean David Ichbiah (25 March 1940 – 26 January 2007) United States Department of Defense Ada Lovelace (10 December 1815 – 27 November 1852)
History --Ada 83 --Ada 95 --Ada 2005(Ada 95 Amendment 1) and Rationale --Ada 2012 and Rationale
Language Features Strong typing Modularity mechanisms Run-time checking Parallel processing Exception handling Generics Object-oriented programming
Language Features Hello World withAda.Text_IO:useAda.Text_IO; procedureHellois begin Put_Line("Hello, world!"); end Hello;
Language Features Data type type Day_type is range 1 .. 31; type Month_type is range 1 .. 12; type Year_type is range 1800 .. 2100; type Hours ismod 24; type Weekday is (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday); type Date is record Day : Day_type; Month : Month_type; Year : Year_type; end record;
Language Features Packages, procedures and functions -- example.ads packageExampleis typeNumberis range1.. 11; procedurePrint_and_Increment (j:inoutNumber); end Example;
-- example.adb withAda.Text_IO; packagebody Example is i : Number := Number'First; procedurePrint_and_Increment (j: in out Number) is function Next (k: in Number) return Number is begin return k + 1; end Next; begin Ada.Text_IO.Put_Line ( "The total is: " & Number'Image(j) ); j := Next (j); endPrint_and_Increment; begin whilei < Number’Lastloop Print_and_Increment(i) endloop; end Example;
Language Features Concurrency procedureTrafficis … task body Airplane is begin … end; begin for I in Airplane_ID’Range loop New_Airplane := new Airplane(I) delay 4.0 end loop end Tafiic;
OTHERS Ada vs C++ Run-time check Memory management Pointers Garbage collection Boeing 777 Airbus A340 NASA JSF
OTHERS Ariane 5 (1996.6.4) a data conversion from 64-bit floating point to 16-bit signed integer value