Handbook
Glossary
v-max-value ( x n -- x )
Form validators
Prev:
v-min-value ( x n -- x )
Next:
v-regexp ( str what regexp -- str )
Vocabulary
validators
Inputs
x
an
integer
n
an
integer
Outputs
x
an
integer
Word description
Throws an error if
x
is larger than
n
.
Definition
USING:
kernel
make
math
math.parser
;
IN:
validators
:
v-max-value
( x n -- x )
2dup
>
[
[
"must be no more than "
%
#
]
""
make
throw
]
[
drop
]
if
;