home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 October / Chip_1997-10_cd.bin / invex / ozogan / openarr.ips < prev    next >
Text File  |  1997-07-13  |  380b  |  18 lines

  1. FUNCTION calcSum(vector : array of integer) : integer;
  2. VAR    
  3.    i : integer;
  4.    s : integer;
  5. ENDVAR
  6.    s := 0;
  7.    FOR i := low(vector) to high(vector)
  8.        s := s + vector[i];
  9.    ENDFOR
  10.    RETURN s;
  11. ENDPROC
  12.  
  13. PROCEDURE main
  14.    ConsoleClear;
  15.    WRITELN('test otev°enΘho pole:');
  16.    WRITELN('SouΦet polo₧ek pole:  ', IntToStr(calcSum([1, 2, 3, 4, 5, 6])));
  17. ENDPROC
  18.