umouse

umouse.git
git clone git://git.lenczewski.org/umouse.git
Log | Files | Refs | Submodules | README

DPANS17.HTM (7039B)


      1 <HTML>
      2 <HEAD>
      3 <TITLE>DPANS94</TITLE>
      4 <link disabled rel="stylesheet" href="mpexc6.css">
      5 <style>@import url(mpexc6.css);</style>
      6 </head>
      7 <body>
      8 <table width=100%>
      9 <tr>
     10 <td align=left>
     11 <a href=dpans16.htm><img src=left.gif
     12  width=26 height=26 align=ALIGN border=0></a>
     13 <a href=dpansa1.htm><img src=right.gif
     14  width=26 height=26 align=ALIGN border=0></a>
     15 </td>
     16 <td align=right>
     17 <a href=dpans.htm#toc><img src=up.gif 
     18  width=26 height=26 align=ALIGN border=0></a>
     19 <a name=17.>Table of Contents</a>
     20 </td>
     21 </tr>
     22 </table>
     23 <p>
     24 <hr size=4>
     25 
     26 
     27 <H1>17. The optional String word set</H1>
     28 
     29 
     30 <hr>
     31 <A name=17.1>
     32 <H2>17.1 Introduction</H2>
     33 </a>
     34 
     35 
     36 <hr>
     37 <A name=17.2>
     38 <H2>17.2 Additional terms and notation</H2>
     39 </a>
     40 
     41 None.
     42 <P>
     43 
     44 
     45 <hr>
     46 <A name=17.3>
     47 <H2>17.3 Additional usage requirements</H2>
     48 </a>
     49 
     50 Append table 17.1 to table 3.5.
     51 <P>
     52 
     53 <code>
     54 See:
     55 <A href=dpans3.htm#3.2.6>3.2.6</a> Environmental queries
     56 </code>
     57 <P>
     58 
     59 Table 17.1 - Environmental query strings
     60 
     61 
     62 <PRE>
     63 String         Value data type    Constant?   Meaning
     64 ------         ---------------    ---------   -------
     65 STRING          flag              no          string word set present
     66 STRING-EXT      flag              no          string extensions word set present
     67 </PRE>
     68 <P>
     69 
     70 
     71 <hr>
     72 <A name=17.4>
     73 <H2>17.4 Additional documentation requirements</H2>
     74 </a>
     75 
     76 None.
     77 <P>
     78 
     79 <hr>
     80 <A name=17.5>
     81 <H2>17.5 Compliance and labeling</H2>
     82 </a>
     83 
     84 <hr>
     85 <A name=17.5.1>
     86 <H3>17.5.1 ANS Forth systems</H3>
     87 </a>
     88 
     89 The phrase <B>Providing the String word set</B> shall be appended to the
     90 label of any Standard System that provides all of the String word set.
     91 <P>
     92 
     93 The phrase <B>Providing name(s) from the String Extensions word set</B>
     94 shall be appended to the label of any Standard System that provides
     95 portions of the String Extensions word set.
     96 <P>
     97 
     98 The phrase <B>Providing the String Extensions word set</B> shall be
     99 appended to the label of any Standard System that provides all of the
    100 String and String Extensions word sets.
    101 <P>
    102 
    103 
    104 <hr>
    105 <A name=17.5.2>
    106 <H3>17.5.2 ANS Forth programs</H3>
    107 </a>
    108 
    109 The phrase <B>Requiring the String word set</B> shall be appended to the
    110 label of Standard Programs that require the system to provide the String
    111 word set.
    112 
    113 <P>
    114 
    115 The phrase <B>Requiring name(s) from the String Extensions word set</B>
    116 shall be appended to the label of Standard Programs that require the
    117 system to provide portions of the String Extensions word set.
    118 
    119 <P>
    120 
    121 The phrase <B>Requiring the String Extensions word set</B> shall be
    122 appended to the label of Standard Programs that require the system to
    123 provide all of the String and String Extensions word sets.
    124 
    125 
    126 <P>
    127 
    128 <hr>
    129 <A name=17.6>
    130 <H2>17.6 Glossary</H2>
    131 </a>
    132 
    133 
    134 <hr>
    135 <A name=17.6.1>
    136 <H3>17.6.1 String words</H3>
    137 </a>
    138 
    139 
    140 <hr>
    141 <A name=17.6.1.0170>
    142 <code>
    143 17.6.1.0170 <b>-TRAILING</b>
    144 </code>
    145 </a>
    146 <BR>
    147 <B>dash-trailing</B> STRING
    148 <BR>
    149 <pre>
    150 	( c-addr u1 -- c-addr u2 )
    151 </pre>
    152 <P>
    153 
    154 If u1 is greater than zero, u2 is equal to u1 less the number of spaces
    155 at the end of the character string specified by c-addr u1.  If u1 is
    156 zero or the entire string consists of spaces, u2 is zero.
    157 
    158 <P>
    159 
    160 <hr>
    161 <A name=17.6.1.0245>
    162 <code>
    163 17.6.1.0245 <b>/STRING</b>
    164 </code>
    165 </a>
    166 <BR>
    167 <B>slash-string</B>  STRING
    168 <BR>
    169 <pre>
    170 	( c-addr1 u1 n -- c-addr2 u2 )
    171 </pre>
    172 <P>
    173 
    174 Adjust the character string at c-addr1 by n characters.  The resulting
    175 character string, specified by c-addr2 u2, begins at c-addr1 plus n
    176 characters and is u1 minus n characters long.
    177 
    178 <P>
    179 <code>
    180 See:
    181 <a href=dpansa17.htm#A.17.6.1.0245>A.17.6.1.0245 /STRING</a>
    182 </code>
    183 <p>
    184 
    185 <hr>
    186 <A name=17.6.1.0780>
    187 <code>
    188 17.6.1.0780 <b>BLANK</b>
    189 </code>
    190 </a>
    191 <BR>
    192 STRING
    193 <BR>
    194 <pre>
    195 	( c-addr u -- )
    196 </pre>
    197 <P>
    198 
    199 If u is greater than zero, store the character value for space in u
    200 consecutive character positions beginning at c-addr.
    201 <P>
    202 
    203 <hr>
    204 <A name=17.6.1.0910>
    205 <code>
    206 17.6.1.0910 <b>CMOVE</b>
    207 </code>
    208 </a>
    209 <BR>
    210 <B>c-move</B>        STRING
    211 <BR>
    212 <pre>
    213 	( c-addr1 c-addr2 u -- )
    214 </pre>
    215 <P>
    216 
    217 If u is greater than zero, copy u consecutive characters from the data
    218 space starting at c-addr1 to that starting at c-addr2, proceeding
    219 character-by-character from lower addresses to higher addresses.
    220 
    221 <P>
    222 <code>
    223 See:
    224 <a href=dpansa17.htm#A.17.6.1.0910>A.17.6.1.0910 CMOVE</a> ,
    225 <a href=dpans17.htm#17.6.1.0920>17.6.1.0920 CMOVE&gt;</a>
    226 </code>
    227 <p>
    228 
    229 
    230 <hr>
    231 <A name=17.6.1.0920>
    232 <code>
    233 17.6.1.0920 <b>CMOVE&gt;</b>
    234 </code>
    235 </a>
    236 <BR>
    237 <B>c-move-up</B>     STRING
    238 <BR>
    239 <pre>
    240 	( c-addr1 c-addr2 u -- )
    241 </pre>
    242 <P>
    243 
    244 If u is greater than zero, copy u consecutive characters from the data
    245 space starting at c-addr1 to that starting at c-addr2, proceeding
    246 character-by-character from higher addresses to lower addresses.
    247 
    248 <P>
    249 <code>
    250 See:
    251 <a href=dpans17.htm#17.6.1.0910>17.6.1.0910 CMOVE</a> ,
    252 <a href=dpansa17.htm#A.17.6.1.0920>A.17.6.1.0920 CMOVE&gt;</a>
    253 </code>
    254 <p>
    255 
    256 
    257 <hr>
    258 <A name=17.6.1.0935>
    259 <code>
    260 17.6.1.0935 <b>COMPARE</b>
    261 </code>
    262 </a>
    263 <BR>
    264 STRING
    265 <BR>
    266 <pre>
    267 	( c-addr1 u1 c-addr2 u2 -- n )
    268 </pre>
    269 <P>
    270 
    271 Compare the string specified by c-addr1 u1 to the string specified by
    272 c-addr2 u2.  The strings are compared, beginning at the given addresses,
    273 character by character, up to the length of the shorter string or until
    274 a difference is found.  If the two strings are identical, n is zero.  If
    275 the two strings are identical up to the length of the shorter string, n
    276 is minus-one (-1) if u1 is less than u2 and one (1) otherwise.  If the
    277 two strings are not identical up to the length of the shorter string, n
    278 is minus-one (-1) if the first non-matching character in the string
    279 specified by c-addr1 u1 has a lesser numeric value than the
    280 corresponding character in the string specified by c-addr2 u2 and one
    281 (1) otherwise.
    282 
    283 <P>
    284 <code>
    285 See:
    286 <a href=dpansa17.htm#A.17.6.1.0935>A.17.6.1.0935 COMPARE</a>
    287 </code>
    288 <p>
    289 
    290 
    291 <hr>
    292 <A name=17.6.1.2191>
    293 <code>
    294 17.6.1.2191 <b>SEARCH</b>
    295 </code>
    296 </a>
    297 <BR>
    298 STRING
    299 <BR>
    300 <pre>
    301 	( c-addr1 u1 c-addr2 u2 -- c-addr3 u3 flag )
    302 </pre>
    303 <P>
    304 
    305 Search the string specified by c-addr1 u1 for the string specified by
    306 c-addr2 u2.  If flag is true, a match was found at c-addr3 with u3
    307 characters remaining.  If flag is false there was no match and c-addr3
    308 is c-addr1 and u3 is u1.
    309 
    310 <P>
    311 <code>
    312 See:
    313 <a href=dpansa17.htm#A.17.6.1.2191>A.17.6.1.2191 SEARCH</a>
    314 </code>
    315 <p>
    316 
    317 
    318 <hr>
    319 <A name=17.6.1.2212>
    320 <code>
    321 17.6.1.2212 <b>SLITERAL</b>
    322 </code>
    323 </a>
    324 <BR>
    325 STRING
    326 <BR>
    327 <P>
    328 <pre>
    329 	Interpretation: Interpretation semantics for this word are undefined.
    330 </pre>
    331 <PRE>
    332         Compilation: ( c-addr1 u -- )
    333 </PRE>
    334 
    335 <P>
    336 
    337 Append the run-time semantics given below to the current definition.
    338 <P>
    339 
    340 
    341 <PRE>
    342         Run-time:       ( -- c-addr2 u )
    343 </PRE>
    344 <P>
    345 
    346 Return c-addr2 u describing a string consisting of the characters
    347 specified by c-addr1 u during compilation.  A program shall not alter
    348 the returned string.
    349 
    350 <P>
    351 <code>
    352 See:
    353 <a href=dpansa17.htm#A.17.6.1.2212>A.17.6.1.2212 SLITERAL</a>
    354 </code>
    355 <p>
    356 
    357 
    358 <hr>
    359 <A name=17.6.2>
    360 <H3>17.6.2 String extension words</H3>
    361 </a>
    362 
    363 None
    364 <P>
    365 
    366 
    367 <A href=dpans.htm#toc><IMG   src="up.gif" ></A>
    368 Table of Contents 
    369 <BR>
    370 <A href=dpansa1.htm><IMG   src="right.gif" ></A>
    371 Next Section
    372 <P>
    373 </BODY>
    374 </HTML>