Files
LithosAnanke/docs/reference/standards/ans94/dpans10.htm
T
Claude 3de8427827 docs: the FORTH standards v4 is held to -- FORTH-79, FORTH-83, ANS Forth 1994 (#189)
Captain Bob, 2026-11-14: the standard first, in the order 79, 83, ANS, then v3; the texts in the repository
as references. FORTH-79 and FORTH-83 from the University of Vienna's FORTH archive (complang.tuwien.ac.at),
ANS Forth's final draft (dpANS) from Taygeta, as fetched, with their sources in
docs/reference/standards/README.md. Not pushed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
2026-11-14 03:16:13 +00:00

496 lines
8.6 KiB
HTML

<HTML><HEAD>
<TITLE>DPANS94</TITLE>
</HEAD>
<BODY>
<table width=100%>
<tr>
<td align=left>
<a href=dpans9.htm><img src=left.gif
width=26 height=26 align=ALIGN border=0></a>
<a href=dpans13.htm><img src=right.gif
width=26 height=26 align=ALIGN border=0></a>
</td>
<td align=right>
<a href=dpans.htm#toc><img src=up.gif
width=26 height=26 align=ALIGN border=0></a>
<a name=10.>Table of Contents</a>
</td>
</tr>
</table>
<p>
<hr size=4>
<H1>10. The optional Facility word set</H1>
<hr>
<A name=10.1>
<H2>10.1 Introduction</H2>
</a>
<hr>
<A name=10.2>
<H2>10.2 Additional terms and notation</H2>
</a>
None.
<P>
<hr>
<A name=10.3>
<H2>10.3 Additional usage requirements</H2>
</a>
<hr>
<A name=10.3.1>
<H3>10.3.1 Character types</H3>
</a>
Programs that use more than seven bits of a character by
<a href=dpans10.htm#10.6.2.1305>10.6.2.1305</a>
EKEY have an environmental dependency.
<P>
<code>
See:
<A href=dpans3.htm#3.1.2>3.1.2</a> Character types
</code>
<P>
<hr>
<A name=10.3.2>
<H3>10.3.2 Environmental queries</H3>
</a>
Append table 10.1 to table 3.5.
<P>
<code>
See:
<a href=dpans3.htm#3.2.6>3.2.6</a> Environmental queries
</code>
<P>
Table 10.1 - Environmental query strings
<PRE>
String Value data type Constant? Meaning
------ --------------- --------- -------
FACILITY flag no facility word set present
FACILITY-EXT flag no facility extensions word set present
</PRE>
<P>
<hr>
<A name=10.4>
<H2>10.4 Additional documentation requirements</H2>
</a>
<hr>
<A name=10.4.1>
<H3>10.4.1 System documentation</H3>
</a>
<hr>
<A name=10.4.1.1>
<H4>10.4.1.1 Implementation-defined options</H4>
</a>
<UL>
<LI>encoding of keyboard events
(<a href=dpans10.htm#10.6.2.1305>10.6.2.1305</a> EKEY);
<LI>duration of a system clock tick;
<LI>repeatability to be expected from execution of
<a href=dpans10.htm#10.6.2.1905>10.6.2.1905</a> MS.
</UL>
<P>
<hr>
<A name=10.4.1.2>
<H4>10.4.1.2 Ambiguous conditions</H4>
</a>
<UL>
<LI><a href=dpans10.htm#10.6.1.0742>10.6.1.0742</a> AT-XY
operation can't be performed on user output device.
</UL>
<P>
<hr>
<A name=10.4.1.3>
<H4>10.4.1.3 Other system documentation</H4>
</a>
<UL>
<LI>no additional requirements.
</UL>
<P>
<hr>
<A name=10.4.2>
<H3>10.4.2 Program documentation</H3>
</a>
<hr>
<A name=10.4.2.1>
<H4>10.4.2.1 Environmental dependencies</H4>
</a>
<UL>
<LI>using more than seven bits of a character in
<a href=dpans10.htm#10.6.2.1305>10.6.2.1305</a> EKEY.
</UL>
<P>
<hr>
<A name=10.4.2.2>
<H4>10.4.2.2 Other program documentation</H4>
</a>
<UL>
<LI>no additional requirements.
</UL>
<P>
<hr>
<A name=10.5>
<H2>10.5 Compliance and labeling</H2>
</a>
<hr>
<A name=10.5.1>
<H3>10.5.1 ANS Forth systems</H3>
</a>
The phrase <B>Providing the Facility word set</B> shall be appended to
the label of any Standard System that provides all of the Facility word
set.
<P>
The phrase <B>Providing name(s) from the Facility Extensions word
set</B> shall be appended to the label of any Standard System that
provides portions of the Facility Extensions word set.
<P>
The phrase <B>Providing the Facility Extensions word set</B> shall be
appended to the label of any Standard System that provides all of the
Facility and Facility Extensions word sets.
<P>
<hr>
<A name=10.5.2>
<H3>10.5.2 ANS Forth programs</H3>
</a>
The phrase <B>Requiring the Facility word set</B> shall be appended to
the label of Standard Programs that require the system to provide the
Facility word set.
<P>
The phrase <B>Requiring name(s) from the Facility Extensions word
set</B> shall be appended to the label of Standard Programs that require
the system to provide portions of the Facility Extensions word set.
<P>
The phrase <B>Requiring the Facility Extensions word set</B> shall be
appended to the label of Standard Programs that require the system to
provide all of the Facility and Facility Extensions word sets.
<P>
<hr>
<A name=10.6>
<H2>10.6 Glossary</H2>
</a>
<hr>
<A name=10.6.1>
<H3>10.6.1 Facility words</H3>
</a>
<hr>
<A name=10.6.1.0742>
<code>
10.6.1.0742 <b>AT-XY</b>
</code>
</a>
<BR>
<B>at-x-y</B> FACILITY
<BR>
<pre>
( u1 u2 -- )
</pre>
<P>
Perform implementation-dependent steps so that the next character
displayed will appear in column u1, row u2 of the user output device,
the upper left corner of which is column zero, row zero. An ambiguous
condition exists if the operation cannot be performed on the user output
device with the specified parameters.
<p>
<code>
See:
<a href=dpansa10.htm#A.10.6.1.0742>A.10.6.1.0742 AT-XY</a>
</code>
<P>
<hr>
<A name=10.6.1.1755>
<code>
10.6.1.1755 <b>KEY?</b>
</code>
</a>
<BR>
<B>key-question</B> FACILITY
<BR>
<pre>
( -- flag )
</pre>
<P>
If a character is available, return true. Otherwise, return false. If
non-character keyboard events are available before the first valid
character, they are discarded and are subsequently unavailable. The
character shall be returned by the next execution of
<a href=dpans6.htm#6.1.1750>KEY</a>.
<P>
After KEY? returns with a value of true, subsequent executions of KEY?
prior to the execution of KEY or
<a href=dpans10.htm#10.6.2.1305>EKEY</a> also return true, without
discarding keyboard events.
<p>
<code>
See:
<a href=dpansa10.htm#A.10.6.1.1755>A.10.6.1.1755 KEY?</a>
</code>
<P>
<hr>
<A name=10.6.1.2005>
<code>
10.6.1.2005 <b>PAGE</b>
</code>
</a>
<BR>
FACILITY
<BR>
<pre>
( -- )
</pre>
<P>
Move to another page for output. Actual function depends on the output
device. On a terminal, PAGE clears the screen and resets the cursor
position to the upper left corner. On a printer, PAGE performs a form
feed.
<P>
<hr>
<A name=10.6.2>
<H3>10.6.2 Facility extension words</H3>
</a>
<hr>
<A name=10.6.2.1305>
<code>
10.6.2.1305 <b>EKEY</b>
</code>
</a>
<BR>
<B>e-key</B> FACILITY EXT
<BR>
<pre>
( -- u )
</pre>
<P>
Receive one keyboard event u. The encoding of keyboard events is
implementation defined.
<P>
<code>
See:
<A href=dpans10.htm#10.6.1.1755>10.6.1.1755 KEY?</a> ,
<A href=dpans6.htm#6.1.1750>6.1.1750 KEY</a> ,
<a href=dpansa10.htm#A.10.6.2.1305>A.10.6.2.1305 EKEY</a>
</code>
<P>
<hr>
<A name=10.6.2.1306>
<code>
10.6.2.1306 <b>EKEY&gt;CHAR</b>
</code>
</a>
<BR>
<B>e-key-to-char</B> FACILITY EXT
<BR>
<pre>
( u -- u false | char true )
</pre>
<P>
If the keyboard event u corresponds to a character in the
implementation-defined character set, return that character and true.
Otherwise return u and false.
<p>
<code>
See:
<a href=dpansa10.htm#A.10.6.2.1306>A.10.6.2.1306 EKEY&gt;CHAR</a>
</code>
<P>
<hr>
<A name=10.6.2.1307>
<code>
10.6.2.1307 <b>EKEY?</b>
</code>
</a>
<BR>
<B>e-key-question</B> FACILITY EXT
<BR>
<pre>
( -- flag )
</pre>
<P>
If a keyboard event is available, return true. Otherwise return false.
The event shall be returned by the next execution of
<a href=dpans10.htm#10.6.2.1305>EKEY</a>.
<P>
After EKEY? returns with a value of true, subsequent executions of EKEY?
prior to the execution of
<a href=dpans6.htm#6.1.1750>KEY</a>,
<a href=dpans10.htm#10.6.1.1755>KEY?</a>
or EKEY also return true, referring
to the same event.
<P>
<hr>
<A name=10.6.2.1325>
<code>
10.6.2.1325 <b>EMIT?</b>
</code>
</a>
<BR>
<B>emit-question</B> FACILITY EXT
<BR>
<pre>
( -- flag )
</pre>
<P>
flag is true if the user output device is ready to accept data and the
execution of
<a href=dpans6.htm#6.1.1320>EMIT</a>
in place of EMIT? would not have suffered an
indefinite delay. If the device status is indeterminate, flag is true.
<p>
<code>
See:
<a href=dpansa10.htm#A.10.6.2.1325>A.10.6.2.1325 EMIT?</a>
</code>
<P>
<hr>
<A name=10.6.2.1905>
<code>
10.6.2.1905 <b>MS</b>
</code>
</a>
<BR>
FACILITY EXT
<BR>
<pre>
( u -- )
</pre>
<P>
Wait at least u milliseconds.
<p>
<b>Note:</b> The actual length and variability of the time period depends
upon the implementation-defined resolution of the system clock and
upon other system and computer characteristics beyond the scope of
this Standard.
<p>
<code>
See:
<a href=dpansa10.htm#A.10.6.2.1905>A.10.6.2.1905 MS</a>
</code>
<P>
<hr>
<A name=10.6.2.2292>
<code>
10.6.2.2292 <b>TIME&DATE</b>
</code>
</a>
<BR>
<B>time-and-date</B> FACILITY EXT
<BR>
<pre>
( -- +n1 +n2 +n3 +n4 +n5 +n6 )
</pre>
<P>
Return the current time and date. +n1 is the second {0...59}, +n2 is
the minute {0...59}, +n3 is the hour {0...23}, +n4 is the day {1...31}
+n5 is the month {1...12}, and +n6 is the year (e.g., 1991).
<p>
<code>
See:
<a href=dpansa10.htm#A.10.6.2.2292>A.10.6.2.2292 TIME&DATE</a>
</code>
<P>
<hr>
<A href=dpans.htm#toc><IMG src="up.gif" ></A> Table of Contents
<BR>
<A href=dpans11.htm><IMG src="right.gif" ></A>
Next Section
<P>
</BODY>
</HTML>