$ ADA ARRAY2 NYU Ada/ED 17.2(7/29/82) MON 12 SEP 83 13:31:00 PAGE 1 ADAfile: ARRAY2.ADA 1 -- SAMPLE TO DEMONSTRATE SIMPLE ARRAYS 2 of 4 2 -- add inputting into the array 3 4 with TEXT_IO ; use TEXT_IO ; 5 6 procedure MAIN is 7 package FLT_IO is new FLOAT_IO(FLOAT) ; use FLT_IO ; 8 9 BALANCES : array ( 1..20 ) of FLOAT ; 10 OPEN_ACCOUNTS : INTEGER := 0 ; 11 AMOUNT : FLOAT ; 12 13 begin 14 loop 15 begin 16 GET(AMOUNT); 17 OPEN_ACCOUNTS := OPEN_ACCOUNTS + 1 ; 18 BALANCES(OPEN_ACCOUNTS) := AMOUNT ; 19 exception 20 when END_ERROR => 21 PUT_LINE(" END OF DATA") ; 22 exit ; 23 end ; 24 end loop ; 25 PUT_LINE(" DONE"); 26 end MAIN ; no parse errors detected Parsing time: 8 seconds no semantic errors detected Translation time: 17 seconds Binding time: 0.4 seconds Begin Ada execution >3.5 >4.2 >^Z END OF DATA DONE Execution complete Execution time: 10 seconds I-code statements executed: 53