Handbook
Glossary
be> ( seq -- x )
Working with binary data
Next:
le> ( seq -- x )
Vocabulary
endian
Inputs
seq
a
sequence
of bytes
Outputs
x
a non-negative integer
Word description
Converts a sequence of bytes in big endian order into an unsigned integer.
Definition
USING:
combinators
endian.private
kernel
sequences
;
IN:
endian
:
be>
( seq -- x )
dup
length
{
{
1
[
1be>
]
}
{
2
[
2be>
]
}
{
4
[
4be>
]
}
{
8
[
8be>
]
}
[
drop
slow-be>
]
}
case
;