6.1.1710
IMMEDIATE
CORE
( -- )
Make the most recent definition an immediate word. An ambiguous condition exists if the most recent definition does not have a name or if it was defined as a
SYNONYM
.
See:
15.6.2.2264 SYNONYM
A.6.1.1710 IMMEDIATE
.
Rationale:
Typical use:
:
X
...
;
IMMEDIATE
Testing:
T{ 123
CONSTANT
iw1
IMMEDIATE
iw1 -> 123 }T
T{
:
iw2 iw1
LITERAL
;
iw2 -> 123 }T
T{
VARIABLE
iw3
IMMEDIATE
234 iw3
!
iw3
@
-> 234 }T
T{
:
iw4 iw3
[
@
]
LITERAL
;
iw4 -> 234 }T
T{
:NONAME
[
345
]
iw3
[
!
]
;
DROP
iw3
@
-> 345 }T
T{
CREATE
iw5 456
,
IMMEDIATE
-> }T
T{
:NONAME
iw5
[
@
iw3
!
]
;
DROP
iw3
@
-> 456 }T
T{
:
iw6
CREATE
,
IMMEDIATE
DOES>
@
1+
;
-> }T
T{ 111 iw6 iw7 iw7 -> 112 }T
T{
:
iw8 iw7
LITERAL
1+
;
iw8 -> 113 }T
T{
:
iw9
CREATE
,
DOES>
@
2
+
IMMEDIATE
;
-> }T
:
find-iw
BL
WORD
FIND
NIP
;
T{ 222 iw9 iw10 find-iw iw10 -> -1 }T
\
iw10 is not immediate
T{ iw10 find-iw iw10 -> 224 1 }T
\
iw10 becomes immediate
See
F.6.1.2510 [']
,
F.6.1.2033 POSTPONE
,
F.6.1.2250 STATE
,
F.6.1.2165 S"
.
Forth 2012
Forth 2012
Glossary
Foreword
Proposals Process
200
x
Membership
Introduction
Terms, notation, and references
Usage requirements
Documentation requirements
Compliance and labeling
Glossary
Block word set
Double-Number word set
Exception word set
Facility word set
File-Access word set
Floating-Point word set
Locals word set
Memory-Allocation word set
Programming-Tools word set
Search-Order word set
String word set
Extended-Character word set
Rationale
Bibliography
Compatibility analysis
Portability guide
Reference Implementations
Test Suite
Alphabetic list of words
IMMEDIATE
!
#
#>
#S
'
(
*
*/
*/MOD
+
+!
+LOOP
,
-
.
."
/
/MOD
0<
0=
1+
1-
2!
2*
2/
2@
2DROP
2DUP
2OVER
2SWAP
:
;
<
<#
=
>
>BODY
>IN
>NUMBER
>R
?DUP
@
ABORT
ABORT"
ABS
ACCEPT
ALIGN
ALIGNED
ALLOT
AND
BASE
BEGIN
BL
C!
C,
C@
CELL+
CELLS
CHAR
CHAR+
CHARS
CONSTANT
COUNT
CR
CREATE
DECIMAL
DEPTH
DO
DOES>
DROP
DUP
ELSE
EMIT
ENVIRONMENT?
EVALUATE
EXECUTE
EXIT
FILL
FIND
FM/MOD
HERE
HOLD
I
IF
IMMEDIATE
INVERT
J
KEY
LEAVE
LITERAL
LOOP
LSHIFT
M*
MAX
MIN
MOD
MOVE
NEGATE
OR
OVER
POSTPONE
QUIT
R>
R@
RECURSE
REPEAT
ROT
RSHIFT
S"
S>D
SIGN
SM/REM
SOURCE
SPACE
SPACES
STATE
SWAP
THEN
TYPE
U.
U<
UM*
UM/MOD
UNLOOP
UNTIL
VARIABLE
WHILE
WORD
XOR
[
[']
[CHAR]
]
.(
.R
0<>
0>
2>R
2R>
2R@
:NONAME
<>
?DO
ACTION-OF
AGAIN
BUFFER:
C"
CASE
COMPILE,
DEFER
DEFER!
DEFER@
ENDCASE
ENDOF
ERASE
FALSE
HEX
HOLDS
IS
MARKER
NIP
OF
PAD
PARSE
PARSE-NAME
PICK
REFILL
RESTORE-INPUT
ROLL
S\"
SAVE-INPUT
SOURCE-ID
TO
TRUE
TUCK
U.R
U>
UNUSED
VALUE
WITHIN
[COMPILE]
\