source: trunk/essentials/sys-apps/gawk/test/printf1.awk

Last change on this file was 3076, checked in by bird, 18 years ago

gawk 3.1.5

File size: 439 bytes
Line 
1# Tue May 25 16:36:16 IDT 1999
2#
3# Test cases based on email from Andreas Schwab, schwab@gnu.org
4
5BEGIN {
6 fmt[1] = "%8.5d"; data[1] = 100
7 fmt[2] = "%#o"; data[2] = 0
8 fmt[3] = "%#.1o"; data[3] = 0
9 fmt[4] = "%#.0o"; data[4] = 0
10 fmt[5] = "%#x"; data[5] = 0
11 fmt[6] = "%.0d"; data[6] = 0
12 fmt[7] = "%5.0d"; data[7] = 0
13
14 for (i = 1; i <= 7; i++) {
15 format = "%s, %d --- |" fmt[i] "|\n"
16 printf(format, fmt[i], data[i], data[i])
17 }
18
19}
Note: See TracBrowser for help on using the repository browser.