qse/ase/test/awk/t1.awk

22 lines
186 B
Awk
Raw Normal View History

2006-04-19 04:18:43 +00:00
function sum(i, k, y)
{
2006-10-28 05:24:08 +00:00
y = 0;
for (k = i; k; k = k - 1)
{
y = y + k;
}
2006-04-19 04:18:43 +00:00
2006-10-28 05:24:08 +00:00
return y;
y = 10;
return y;
2006-04-19 04:18:43 +00:00
}
BEGIN {
2006-10-28 05:24:08 +00:00
/*s = sum(10000000);*/
s = sum (100);
2007-01-26 15:50:48 +00:00
print s;
2006-10-28 05:24:08 +00:00
return s;
2006-04-19 04:18:43 +00:00
}
2006-05-10 16:02:39 +00:00