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


:='' Search:

In String Constant Words in String Library

Word Name: :=''
Type: Immediate compiling word
Data Stack Signature: $Caddr "value" --
Return Stack Signature: --
Availability: V1.2
Description:

Assigns the string following the word to the referenced string constant.

Example:

50 $CONST WELCOME \  define a string constant called WELCOME
WELCOME :=" Hello, World!" \ assign the string Hello, World! to WELCOME
WELCOME .$CONST \ display it

Comment:

The string should be terminated with a quotation mark.

An error occurs if the string to be assigned will not fit within the space allocated to the string constant when it was declared.

For example:

5 $CONST COLOUR
COLOUR :=" Purple" \ does not fit. An error occurs.

See Also: $CONST  MAXLEN$  $'' 

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