DPANS10.HTM (8851B)
1 <HTML><HEAD> 2 <TITLE>DPANS94</TITLE> 3 <link disabled rel="stylesheet" href="mpexc6.css"> 4 <style>@import url(mpexc6.css);</style> 5 </head> 6 7 <BODY> 8 <table width=100%> 9 <tr> 10 <td align=left> 11 <a href=dpans9.htm><img src=left.gif 12 width=26 height=26 align=ALIGN border=0></a> 13 <a href=dpans13.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=10.>Table of Contents</a> 20 </td> 21 </tr> 22 </table> 23 <p> 24 <hr size=4> 25 26 <H1>10. The optional Facility word set</H1> 27 28 29 <hr> 30 <A name=10.1> 31 <H2>10.1 Introduction</H2> 32 </a> 33 34 35 <hr> 36 <A name=10.2> 37 <H2>10.2 Additional terms and notation</H2> 38 </a> 39 40 None. 41 <P> 42 43 44 <hr> 45 <A name=10.3> 46 <H2>10.3 Additional usage requirements</H2> 47 </a> 48 49 50 <hr> 51 <A name=10.3.1> 52 <H3>10.3.1 Character types</H3> 53 </a> 54 55 Programs that use more than seven bits of a character by 56 <a href=dpans10.htm#10.6.2.1305>10.6.2.1305</a> 57 EKEY have an environmental dependency. 58 <P> 59 60 <code> 61 See: 62 <A href=dpans3.htm#3.1.2>3.1.2</a> Character types 63 </code> 64 <P> 65 66 67 <hr> 68 <A name=10.3.2> 69 <H3>10.3.2 Environmental queries</H3> 70 </a> 71 72 Append table 10.1 to table 3.5. 73 <P> 74 75 <code> 76 See: 77 <a href=dpans3.htm#3.2.6>3.2.6</a> Environmental queries 78 </code> 79 <P> 80 81 Table 10.1 - Environmental query strings 82 83 84 <PRE> 85 String Value data type Constant? Meaning 86 ------ --------------- --------- ------- 87 FACILITY flag no facility word set present 88 FACILITY-EXT flag no facility extensions word set present 89 90 </PRE> 91 92 <P> 93 94 <hr> 95 <A name=10.4> 96 <H2>10.4 Additional documentation requirements</H2> 97 </a> 98 99 100 <hr> 101 <A name=10.4.1> 102 <H3>10.4.1 System documentation</H3> 103 </a> 104 105 106 <hr> 107 <A name=10.4.1.1> 108 <H4>10.4.1.1 Implementation-defined options</H4> 109 </a> 110 111 <UL> 112 <LI>encoding of keyboard events 113 (<a href=dpans10.htm#10.6.2.1305>10.6.2.1305</a> EKEY); 114 <LI>duration of a system clock tick; 115 <LI>repeatability to be expected from execution of 116 <a href=dpans10.htm#10.6.2.1905>10.6.2.1905</a> MS. 117 </UL> 118 <P> 119 120 121 <hr> 122 <A name=10.4.1.2> 123 <H4>10.4.1.2 Ambiguous conditions</H4> 124 </a> 125 126 <UL> 127 <LI><a href=dpans10.htm#10.6.1.0742>10.6.1.0742</a> AT-XY 128 operation can't be performed on user output device. 129 </UL> 130 <P> 131 132 133 <hr> 134 <A name=10.4.1.3> 135 <H4>10.4.1.3 Other system documentation</H4> 136 </a> 137 138 <UL> 139 <LI>no additional requirements. 140 </UL> 141 <P> 142 143 <hr> 144 <A name=10.4.2> 145 <H3>10.4.2 Program documentation</H3> 146 </a> 147 148 149 <hr> 150 <A name=10.4.2.1> 151 <H4>10.4.2.1 Environmental dependencies</H4> 152 </a> 153 154 <UL> 155 <LI>using more than seven bits of a character in 156 <a href=dpans10.htm#10.6.2.1305>10.6.2.1305</a> EKEY. 157 </UL> 158 <P> 159 160 161 <hr> 162 <A name=10.4.2.2> 163 <H4>10.4.2.2 Other program documentation</H4> 164 </a> 165 166 <UL> 167 <LI>no additional requirements. 168 </UL> 169 <P> 170 171 <hr> 172 <A name=10.5> 173 <H2>10.5 Compliance and labeling</H2> 174 </a> 175 176 177 <hr> 178 <A name=10.5.1> 179 <H3>10.5.1 ANS Forth systems</H3> 180 </a> 181 182 The phrase <B>Providing the Facility word set</B> shall be appended to 183 the label of any Standard System that provides all of the Facility word 184 set. 185 <P> 186 187 The phrase <B>Providing name(s) from the Facility Extensions word 188 set</B> shall be appended to the label of any Standard System that 189 provides portions of the Facility Extensions word set. 190 <P> 191 192 The phrase <B>Providing the Facility Extensions word set</B> shall be 193 appended to the label of any Standard System that provides all of the 194 Facility and Facility Extensions word sets. 195 <P> 196 197 198 <hr> 199 <A name=10.5.2> 200 <H3>10.5.2 ANS Forth programs</H3> 201 </a> 202 203 The phrase <B>Requiring the Facility word set</B> shall be appended to 204 the label of Standard Programs that require the system to provide the 205 Facility word set. 206 <P> 207 208 The phrase <B>Requiring name(s) from the Facility Extensions word 209 set</B> shall be appended to the label of Standard Programs that require 210 the system to provide portions of the Facility Extensions word set. 211 <P> 212 213 The phrase <B>Requiring the Facility Extensions word set</B> shall be 214 appended to the label of Standard Programs that require the system to 215 provide all of the Facility and Facility Extensions word sets. 216 <P> 217 218 219 <hr> 220 <A name=10.6> 221 <H2>10.6 Glossary</H2> 222 </a> 223 224 225 <hr> 226 <A name=10.6.1> 227 <H3>10.6.1 Facility words</H3> 228 </a> 229 230 231 <hr> 232 <A name=10.6.1.0742> 233 <code> 234 10.6.1.0742 <b>AT-XY</b> 235 </code> 236 </a> 237 <BR> 238 <B>at-x-y</B> FACILITY 239 <BR> 240 <pre> 241 ( u1 u2 -- ) 242 </pre> 243 <P> 244 245 Perform implementation-dependent steps so that the next character 246 displayed will appear in column u1, row u2 of the user output device, 247 the upper left corner of which is column zero, row zero. An ambiguous 248 condition exists if the operation cannot be performed on the user output 249 device with the specified parameters. 250 251 <p> 252 <code> 253 See: 254 <a href=dpansa10.htm#A.10.6.1.0742>A.10.6.1.0742 AT-XY</a> 255 </code> 256 <P> 257 258 <hr> 259 <A name=10.6.1.1755> 260 <code> 261 10.6.1.1755 <b>KEY?</b> 262 </code> 263 </a> 264 <BR> 265 <B>key-question</B> FACILITY 266 <BR> 267 <pre> 268 ( -- flag ) 269 </pre> 270 <P> 271 272 If a character is available, return true. Otherwise, return false. If 273 non-character keyboard events are available before the first valid 274 character, they are discarded and are subsequently unavailable. The 275 character shall be returned by the next execution of 276 <a href=dpans6.htm#6.1.1750>KEY</a>. 277 <P> 278 279 After KEY? returns with a value of true, subsequent executions of KEY? 280 prior to the execution of KEY or 281 <a href=dpans10.htm#10.6.2.1305>EKEY</a> also return true, without 282 discarding keyboard events. 283 284 <p> 285 <code> 286 See: 287 <a href=dpansa10.htm#A.10.6.1.1755>A.10.6.1.1755 KEY?</a> 288 </code> 289 <P> 290 291 292 <hr> 293 <A name=10.6.1.2005> 294 <code> 295 10.6.1.2005 <b>PAGE</b> 296 </code> 297 </a> 298 <BR> 299 FACILITY 300 <BR> 301 <pre> 302 ( -- ) 303 </pre> 304 <P> 305 306 Move to another page for output. Actual function depends on the output 307 device. On a terminal, PAGE clears the screen and resets the cursor 308 position to the upper left corner. On a printer, PAGE performs a form 309 feed. 310 <P> 311 312 313 314 <hr> 315 <A name=10.6.2> 316 <H3>10.6.2 Facility extension words</H3> 317 </a> 318 319 320 <hr> 321 <A name=10.6.2.1305> 322 <code> 323 10.6.2.1305 <b>EKEY</b> 324 </code> 325 </a> 326 <BR> 327 <B>e-key</B> FACILITY EXT 328 <BR> 329 <pre> 330 ( -- u ) 331 </pre> 332 <P> 333 334 Receive one keyboard event u. The encoding of keyboard events is 335 implementation defined. 336 <P> 337 338 <code> 339 See: 340 <A href=dpans10.htm#10.6.1.1755>10.6.1.1755 KEY?</a> , 341 <A href=dpans6.htm#6.1.1750>6.1.1750 KEY</a> , 342 <a href=dpansa10.htm#A.10.6.2.1305>A.10.6.2.1305 EKEY</a> 343 </code> 344 <P> 345 346 347 348 <hr> 349 <A name=10.6.2.1306> 350 <code> 351 10.6.2.1306 <b>EKEY>CHAR</b> 352 </code> 353 </a> 354 <BR> 355 <B>e-key-to-char</B> FACILITY EXT 356 <BR> 357 <pre> 358 ( u -- u false | char true ) 359 </pre> 360 <P> 361 362 If the keyboard event u corresponds to a character in the 363 implementation-defined character set, return that character and true. 364 Otherwise return u and false. 365 366 367 <p> 368 <code> 369 See: 370 <a href=dpansa10.htm#A.10.6.2.1306>A.10.6.2.1306 EKEY>CHAR</a> 371 </code> 372 <P> 373 374 375 <hr> 376 <A name=10.6.2.1307> 377 <code> 378 10.6.2.1307 <b>EKEY?</b> 379 </code> 380 </a> 381 <BR> 382 <B>e-key-question</B> FACILITY EXT 383 <BR> 384 <pre> 385 ( -- flag ) 386 </pre> 387 <P> 388 389 If a keyboard event is available, return true. Otherwise return false. 390 The event shall be returned by the next execution of 391 <a href=dpans10.htm#10.6.2.1305>EKEY</a>. 392 <P> 393 394 After EKEY? returns with a value of true, subsequent executions of EKEY? 395 prior to the execution of 396 <a href=dpans6.htm#6.1.1750>KEY</a>, 397 <a href=dpans10.htm#10.6.1.1755>KEY?</a> 398 or EKEY also return true, referring 399 to the same event. 400 401 <P> 402 403 404 <hr> 405 <A name=10.6.2.1325> 406 <code> 407 10.6.2.1325 <b>EMIT?</b> 408 </code> 409 </a> 410 <BR> 411 <B>emit-question</B> FACILITY EXT 412 <BR> 413 <pre> 414 ( -- flag ) 415 </pre> 416 <P> 417 418 flag is true if the user output device is ready to accept data and the 419 execution of 420 <a href=dpans6.htm#6.1.1320>EMIT</a> 421 in place of EMIT? would not have suffered an 422 indefinite delay. If the device status is indeterminate, flag is true. 423 424 <p> 425 <code> 426 See: 427 <a href=dpansa10.htm#A.10.6.2.1325>A.10.6.2.1325 EMIT?</a> 428 </code> 429 <P> 430 431 432 <hr> 433 <A name=10.6.2.1905> 434 <code> 435 10.6.2.1905 <b>MS</b> 436 </code> 437 </a> 438 <BR> 439 FACILITY EXT 440 <BR> 441 <pre> 442 ( u -- ) 443 </pre> 444 <P> 445 446 Wait at least u milliseconds. 447 448 <p> 449 <b>Note:</b> The actual length and variability of the time period depends 450 upon the implementation-defined resolution of the system clock and 451 upon other system and computer characteristics beyond the scope of 452 this Standard. 453 454 455 <p> 456 <code> 457 See: 458 <a href=dpansa10.htm#A.10.6.2.1905>A.10.6.2.1905 MS</a> 459 </code> 460 <P> 461 462 463 <hr> 464 <A name=10.6.2.2292> 465 <code> 466 10.6.2.2292 <b>TIME&DATE</b> 467 </code> 468 </a> 469 <BR> 470 <B>time-and-date</B> FACILITY EXT 471 <BR> 472 <pre> 473 ( -- +n1 +n2 +n3 +n4 +n5 +n6 ) 474 </pre> 475 <P> 476 477 Return the current time and date. +n1 is the second {0...59}, +n2 is 478 the minute {0...59}, +n3 is the hour {0...23}, +n4 is the day {1...31} 479 +n5 is the month {1...12}, and +n6 is the year (e.g., 1991). 480 481 <p> 482 <code> 483 See: 484 <a href=dpansa10.htm#A.10.6.2.2292>A.10.6.2.2292 TIME&DATE</a> 485 </code> 486 <P> 487 488 489 490 <hr> 491 <A href=dpans.htm#toc><IMG src="up.gif" ></A> Table of Contents 492 <BR> 493 <A href=dpans11.htm><IMG src="right.gif" ></A> 494 Next Section 495 <P> 496 </BODY> 497 </HTML>