Files
sausage/userland/goawk/source/testdata/gawk/hex.awk
T

23 lines
378 B
Awk

# Test program from Paul Eggert, eggert@cs.ucla.edu, Jan. 14, 2005
BEGIN {
e = "1(e)"
ex = "3e2(ex)"
x = "6e5(x)"
print e+0, x+0
print 0x
# print 0e+x # GoAWK behaviour is different (saner!) here
# print 0ex # GoAWK behaviour is different (saner!) here
print 010e2
print 0e9.3
}
# Expected results:
# 1 600000
# 06e5(x)
# 0600001
# 03e2(ex)
# 1000
# 00.3