| Table of Contents

## A.17 The optional String word set

### A.17.6 Glossary

A.17.6.1.0245 /STRING

/STRING is used to remove or add characters relative to the left end of the character string. Positive values of n will exclude characters from the string while negative values of n will include characters to the left of the string. /STRING is a natural factor of WORD and commonly available.

A.17.6.1.0910 CMOVE

If c-addr2 lies within the source region (i.e., when c-addr2 is not less than c-addr1 and c-addr2 is less than the quantity c-addr1 u CHARS +), memory propagation occurs.

Typical use: Assume a character string at address 100: ABCD. Then after

    	100 DUP  CHAR+  3 CMOVE

the string at address 100 is AAAA.

Rationale for CMOVE and CMOVE> follows MOVE.

A.17.6.1.0920 CMOVE>

If c-addr1 lies within the destination region (i.e., when c-addr1 is greater than or equal to c-addr2 and c-addr2 is less than the quantity c-addr1 u CHARS +), memory propagation occurs.

Typical use: Assume a character string at address 100: ABCD. Then after

    	100 DUP CHAR+ SWAP 3 CMOVE>

the string at address 100 is DDDD.

A.17.6.1.0935 COMPARE

Existing Forth systems perform string comparison operations using words that differ in spelling, input and output arguments, and case sensitivity. One in widespread use was chosen.

A.17.6.1.2191 SEARCH

Existing Forth systems perform string searching operations using words that differ in spelling, input and output arguments, and case sensitivity. One in widespread use was chosen.

A.17.6.1.2212 SLITERAL

The current functionality of 6.1.2165 S" may be provided by the following definition:

    : S" ( "ccc<quote>" -- )
        [CHAR] " PARSE   POSTPONE SLITERAL ; IMMEDIATE

Table of Contents
Next Section