<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>
In String Constant Words in String Library
Moves the string within the specified string constant to the string stack, where it can be manipulated.
50 $CONST WELCOME \ define a string constant called WELCOME WELCOME :=" Hello, World!" \ assign the string Hello, World! to WELCOME WELCOME >$ \ move the string Hello, World! to the string stack. .$ \ display the string on the top of the string stack. (Displays Hello, World!)
50 $CONST WELCOME
WELCOME :=" Hello, World!"
WELCOME >$
.$
A run-time error results if there is not enough string stack space to accomodate the string.