Name

s-comma:dstrings — ordinary primitive

Synopsis

FORTH
S, ( addr len -- addr' len )(); 
 ;

Description

ALLOT room and store the Forth string into data space as an mstring, leaving data space aligned; and leave the length and new body address. It is assumed that len is unsigned. An error is thrown if len is larger than the system parameter MAX_DATA_STR. <ansref>"s-comma"</ansref>

NOTE: MAX_DATA_STR is returned by

   S" /SCOPY" ENVIRONMENT?

Perhaps this restriction should be removed in favor of a normal data space overflow error.

NOTE: S, is the same as STRING, in Wil Baden's Tool Belt, except it stores a measured string instead of a counted string.