aboutsummaryrefslogtreecommitdiff
path: root/unix/boot/spp/rpp/ratlibr/putdec.r
blob: 6f7bb195b99ad46d764ce0bf3ebb0741eda42f33 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
include	defs

# putdec - put decimal integer n in field width >= w

   subroutine putdec(n,w)
   integer n, w

   character chars (MAXCHARS)

   integer i, nd
   integer itoc

   nd = itoc (n, chars, MAXCHARS)
   for (i = nd + 1; i <= w; i = i + 1)
      call putc (BLANK)
   for (i = 1; i <= nd; i = i + 1)
      call putc (chars (i))

   return
   end