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


>$CONST Search:

In Transient String Words in String Library

Word Name: >$CONST
Type: Standard word
Data Stack Signature: $Caddr -- / ss: str --
Return Stack Signature: --
Availability: V1.2
Description:

Moves the topmost string on the string stack to the specified string constant.

Example:

10 $CONST COLOUR \ declare a string constant
$" purple" COLOUR >$CONST \ place string on stack, and move it to the string constant
COLOUR .$CONST \ display the string constant

Comment:

A run-time error occurs if the string stack is empty, or if the string constant is not large enough to accomdate the string.

See Also: :='' 

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