RosettaCodeData/Task/Integer-overflow/Julia/integer-overflow-1.julia

10 lines
229 B
Text
Raw Permalink Normal View History

2020-02-17 23:21:07 -08:00
using Printf
2018-06-22 20:57:24 +00:00
S = subtypes(Signed)
U = subtypes(Unsigned)
2015-11-18 06:14:39 +00:00
2018-06-22 20:57:24 +00:00
println("Integer limits:")
for (s, u) in zip(S, U)
@printf("%8s: [%s, %s]\n", s, typemin(s), typemax(s))
@printf("%8s: [%s, %s]\n", u, typemin(u), typemax(u))
2015-11-18 06:14:39 +00:00
end