Update of /cvsroot/win32forth/win32forth/doc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8330/win32forth/doc
Modified Files:
p-advanced.htm
Added Files:
p-module.htm
Log Message:
gah: Added documentation
--- NEW FILE: p-module.htm ---
<html>
<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta name="GENERATOR" content="dexh00">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>
W32F modules</title><style><!--
h1 { font-family: Tahoma; font-size: 24pt; font-weight: bold }
h2 { font-family: Tahoma; font-size: 18pt; font-weight: bold } -->
</style>
</head>
<body><h1 align="center">
<a href="mailto:win...@ya...?subject=DOC:Doc error in $Id: p-module.htm,v 1.1 2005/12/14 13:49:30 georgeahubert Exp $">
<img border="0" src="TELLUS.gif" align="left" width="32" height="32"></a>
<img border="0" src="FORTHPRO.gif"
width="32" height="32"> Win32Forth</h1>
<hr />
<h1>
Using the Module Wordset
</h1>
<hr />
<p>
Win32Forth implements the ANSI search-order wordset and extensions as well as it's
own set of words for constructing modules. Since the module wordset works by manipulating
the search order then care should be taken when using the module wordset and search order
wordset together. If the search order is changed with the search order words it should be
restored to it's previous state before any of the words INTERNAL EXTERNAL or MODULE are
executed. Similarly since the object compiler also manipulates the search order the same
criterion applies while building classes or objects (with :OBJECT). The words INTERNAL
EXTERNAL and MODULE should not be executed within a CLASS or OBJECT although they can
be used before and after the CLASS or OBJECT.
</p>
<h2>
Error Handling
</h2>
<p>
If an uncaught error occurs while building a module then the default error handler resets
the state of the module wordset as though the module had been finished correctly.
</p>
<h2>
Glossary
</h2>
<pre><b>
: (PRIVATE) ( xt-of-voc -- )
</b></pre>
<p>
Set the vocabulary for internal definitions for the next module to be built.
This is a non-parsing version of the word PRIVATE.
</p>
<pre><b>
: PRIVATE ( -<voc>- )
</b></pre>
<p>
Set the vocabulary for internal definitions for the next module to be built.
This is a parsing version of the word (PRIVATE).
</p>
<pre><b>
: INTERNAL ( -- )
</b></pre>
<p>
If a module hasn't yet been started or the internal vocabulary isn't the context
vocabulary add the internal vocabulary to the search order and save the current
vocabulary as the external vocabulary, then make the current vocabulary the internal
vocabulary. If a module is already being built then make the current vocabulary
the internal vocabulary.
</p>
<pre><b>
: EXTERNAL ( -- )
</b></pre>
<p>
Make the external vocabulary the current vocabulary.
</p>
<pre><b>
: MODULE ( -- )
</b></pre>
<p>
Complete the module by making the external vocabulary the current vocabulary,
removing the internal vocabulary from the search order if it's the context
vocabulary and resetting the internal vocabulary to hidden.
</p>
<hr><p>Document $Id: p-module.htm,v 1.1 2005/12/14 13:49:30 georgeahubert Exp $</p>
</body></html>
Index: p-advanced.htm
===================================================================
RCS file: /cvsroot/win32forth/win32forth/doc/p-advanced.htm,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** p-advanced.htm 16 May 2005 20:56:24 -0000 1.2
--- p-advanced.htm 14 Dec 2005 13:49:30 -0000 1.3
***************
*** 35,38 ****
--- 35,39 ----
<li><a href="p-windlls.htm">Calling Windows Procedures</a></li>
<li><a href="p-objects.htm">Object Oriented Programming</a></li>
+ <li><a href="p-module.htm">Using the Module Wordset</a></li>
<li><a href="p-random.htm">The Random Number Generator</a></li>
<li><a href="p-switch.htm">Using Switches</a></li>
|