Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
fpc-src / usr / share / fpcsrc / 3.0.0 / tests / bench / shootout / src / sumcol.pp
Size: Mime:
{ The Computer Language Benchmarks Game
  http://shootout.alioth.debian.org

  contributed by Ales Katona
  modified by Daniel Mantione
  modified by Steve Fisher
  modified by Vincent Snijders
}

{$iochecks off}

var
  num, tot: longint;
  s: string[128];
  textbuf: array[0..8191] of char;
  infile: ^text;

begin
  infile := @input;
  settextbuf(infile^, textbuf);
  tot := 0;
  repeat
    readLn(infile^, s);
    val(s, num);
    tot := tot + num
  until eof(infile^);
  writeLn(tot)
end.