~vcs-imports/gawk/master

« back to all changes in this revision

Viewing changes to awklib/eg/lib/round.awk

  • Committer: Arnold D. Robbins
  • Date: 2010-07-16 11:49:57 UTC
  • Revision ID: git-v1:6a2caf2157d87b4b582b2494bdd7d6a688dd0b1f
Tags: gawk-3.1.6
Move to gawk-3.1.6.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# round.awk --- do normal rounding
2
2
#
3
 
# Arnold Robbins, arnold@gnu.org, Public Domain
 
3
# Arnold Robbins, arnold@skeeve.com, Public Domain
4
4
# August, 1996
5
5
 
6
6
function round(x,   ival, aval, fraction)
27
27
         return ival
28
28
   }
29
29
}
30
 
 
31
 
# test harness
32
 
{ print $0, round($0) }