b068b636a74dcc129892d99642ee3f42745da8b2
[rrq/rrqforth.git] / adoc / p_0less.adoc
1 // logic.asm:   WORD p_0less, '0<',fasm
2
3 anchor:p_0less[]
4
5 === Word: 0<
6
7 ....
8 Data stack: ( v -- 0/-1 )
9 ....
10
11 "0<" is a function word that replaces a value with -1 if the value is
12 less than 0, and 0 otherwise.
13
14 ====
15 .Word: 0<
16 [caption='Definition concept {counter:exec}: ']
17 ----
18 : 0= 0 SWAP < ;
19 ----
20 ====
21
22 See also <<p_swap,SWAP>> and
23 <<p_lessthan,<>>.