% $Id: wc.slang,v 1.0 2003/01/03 14:41:00 dada Exp $
% http://dada.perl.it/shootout/
%
% contributed by John E. Davis

define main()
{
   variable nl, nw, nc;
   
   nl = 0; nw = 0; nc = 0;
   
   foreach (stdin) using ("line")
     {
    variable line = ();
        nl++;
    nc += strlen (line);
    nw += length (strtok (line));
     }

   vmessage ("%d %d %d", nl, nw, nc);
}

main()