【发布时间】:2016-06-03 10:08:48
【问题描述】:
Prelude> maxBound::(Bool,Int,Char)
(True,9223372036854775807,'\1114111')
Prelude> minBound::Char
'\NUL'
为什么显示的是 \NUL,而不是像 '\1114111' 这样的数字?
【问题讨论】:
标签: haskell char representation
Prelude> maxBound::(Bool,Int,Char)
(True,9223372036854775807,'\1114111')
Prelude> minBound::Char
'\NUL'
为什么显示的是 \NUL,而不是像 '\1114111' 这样的数字?
【问题讨论】:
标签: haskell char representation
Char 在 Haskell 中表示 Unicode 符号。
第一个符号的代码为0,在Unicode 中定义为NULL。它也是 ASCII 字符集的一部分,每个人都将\NUL(以及\NULL)与0 联系起来。
最大可能符号的代码为1114111 (0x10ffff) 并定义为Noncharacter。至少有两个名为Noncharacter 的Unicode 符号:第二个是0x10fffe。
【讨论】: