<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>


LIT Search:

In Compilation Words in TurboForth Kernal

Word Name: LIT
Type: Standard word
Data Stack Signature: -- n
Return Stack Signature: --
Availability: V1.0  V1.1  V1.2
Description:

At execution time, places the value in the cell immediately following the LIT instruction onto the data stack.

Example:

: TEST ( -- ) 1 2 3 ;

Causes the following sequence to be compiled into TEST:

LIT 1 LIT 2 LIT 3

At run time, LIT pushes the value in front of it to the data stack.

Comment:

LIT is compiled into definitions by the compiler when a number is encountered in a definition. Also see LITERAL.

See Also: LITERAL 

<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>