Name

str-store:dstrings — ordinary primitive

Synopsis

FORTH

$! ( $var.dfa $: a$ -- )();
p4:"str-store";

Description

Store the string MSA on the string stack in the variable whose DFA is on the parameter stack. <ansref>"string-store"</ansref>

NOTES: The only situation in which $! copies the string value is when it is a bound string already stored in another variable. In that case, the new copy is the one that is stored in the variable. In particular, external strings are not copied.

If the string value held by the string variable on entry is a bound string that is also referenced deeper on the string stack, its back link is reset to point to the deepest string stack reference. If it is a bound string not deeper on the string stack and not identical to the input string, its back link is set to zero, making it garbage. If it is an external string, its MSA in the variable is simply written over by that popped from the string stack.