Handbook
Glossary
find-type ( char -- code type )
Vocabulary
io
.
encodings
.
iso2022
.
private
Inputs
char
an
object
Outputs
code
an
object
type
an
object
Definition
USING:
assocs
combinators
io.encodings
kernel
namespaces
;
IN:
io.encodings.iso2022.private
:
find-type
( char -- code type )
{
{
[
dup
ascii
get-global
value?
]
[
drop
switch-ascii
ascii
get-global
]
}
{
[
dup
jis201
get-global
value?
]
[
drop
switch-jis201
jis201
get-global
]
}
{
[
dup
jis208
get-global
value?
]
[
drop
switch-jis208
jis208
get-global
]
}
{
[
dup
jis212
get-global
value?
]
[
drop
switch-jis212
jis212
get-global
]
}
[
encode-error
]
}
cond
;