WIN32FORTH USERS MANUAL AND HELP DOCUMENTATON 
Author Message
 WIN32FORTH USERS MANUAL AND HELP DOCUMENTATON

WIN32FORTH USERS MANUAL AND HELP   8-19-2001 JP
================================

PS This document is supposed to be in rich text format (I hope) so if
you see funny characters you may need a newer reader.

This file has been edited; deleted, added to, spell checked, snipped
colored bolded and changed for clarity, by John A. Peters.  Most of
the text is by and with thanks to Tom Zimmer.  If I (JP) had to take
the time and effort to try the impossible task of maintaining credit
and giving notice to all the various authors, I would never have
started this editorial project, but I do thank you all.  If you like
it let me know, or better yet fix it and republished it on Google
Groups.  To do that you have to sign in on the home page that you see
before you start reading articles.  Look for where it says Post a new
message to Comp.lang.forth  (underlined)

SELF-DOCUMENTING - Contrary to the comments about Forth being an
undocumented language actually forth is self-documenting to a great
extent.  Most of this document was pulled from comp.lang.forth section
of Google Groups by searching for Win32Forth Help.  Please place
corrections and additions there by appending it to this thread or
better yet, downloading it (copy from your browser and paste in to a
word processor) edit it and then upload it again for us all.

DOCUMENTATION - Words like VIEW, SEE, LOCATE and DEBUG, DUMP, are
provided as the best means to discover what any particular word does
and how it works.

HELP KEY - Documentation for Win32Forth is included with the system.
Look under the Help menu of the console window.  The sources for
Win32Forth are also included and they get installed when you install
Win32Forth. The demonstration programs that are included with
Win32Forth are listed here.

Win32Forth EDITOR COMMANDS
Edit/Browse toggle              SHIFT F9
Save file                       Ctl+S
Load the old version from disk  Ctrl+L
Load the file after saving it   F12
Display Debug Button bar        Ctl+D
Undo is                         Ctrl+Z
Copy & Paste in to Win32 Forth      F11     (Please explain)
Open Highlighted file           Ctrl+Shft+O
Open file                       Ctl+O
New file                        Ctl+N
Close File Window               Ctrl+W

Useful Words

ANEW            Define a new marker.   (We need a better explanation here)
LineLoad                Load the current file from line n1
#fload          Load file "name" from line n1, 1 based
.FREE                   Display the amount of used and available program memory
.FILE                   The current file is . . .
FSAVE           and    
TURNKEY         and
APPLICATION     All create new programs on your hard drive. They differ
in the type of program they create.
                ( We could use some help above)
IMAGE-SAVE      ( -<name>- )  bl word count "image-save ;

Toolbox Words

.DEFERRED       Display the deferred words and they&#8217;re current
function  along with the default function.

MENU POPUPS & TOOL TIPS - Hold your mouse cursor over one of the
buttons in the toolbar at the top of  the window to see a "tooltip"
popup telling you what the button does.

MULTI TASKING - You can have one window for the command line and
another for the file you are editing.  Isn't Multi-tasking wonderful.

SETTING UP A PRODUCTIVE DESKTOP  - Win32Forth can be resized in to two
windows, and it will remember the sizes and locations the next time!
To change the size of a window use the mouse to drag the borders or
the lower right corner just like any other windows program.

EDIT WINDOW - When you first execute Win32Forth and tap the F1 key, a
window will open to a file called startup.txt. That window can be
dragged up to the top of the monitor by placing the mouse on the blue
border at the top and holding down the left mouse button.  Now move
the lower border up a bit more to leave about one forth of the monitor
display for the lower window.

CONSOLE WINDOW - Now size the lower console window to fit the
remaining one-forth of the monitor.  This will feel like home if you
are used to the traditional command line.  A history of all command
line activity as well as a log of error reports will appear here.  The
history will scroll up as it is used.  It can be scrolled down and
back up at will, until you exit the program.  If you wan to save it is
in the file CONSOLE.TXT for the duration of the session. Also you
could copy and paste a section.

LOST THE OK PROMPT? - It you loose the ok prompt it may be off the
bottom of the console window.  Bring that window to the front, drag it
up to the top and raise the lower border to shrink it down to 4 or 5
lines.  Then slide the window back down to the bottom again to leave
room for the source code editor above.

THE USUAL WINDOWS ACTIVITIES - Of course you can click anywhere in
either window to bring it to the front.  Of course you can maximize
either window with the three little squares in the upper right or do
any of the other things you expect with windows like cut and paste
etc.  If you have trouble making a window smaller you may have to jam
the window up tight against the top of the screen in order to reveal
the bottom border that you need to hover over to move it up.  You
might even have to lower or hide the tray.

EXPLORING - Forth is a command line oriented interactive environment.
It is nice to have menus, but most of what we do while programming an
application requires typing and some mousing.  If you like typing,
then you may be in the right line of work (or hobby). As Tom says
&#8220;This is also probably a good time to mention that Win32Forth
was written to match my his style of development, that is it includes
tools for searching, browsing and exploring.&#8221;  If you are an
explorer as well as a reader, then you will have little trouble with
Win32Forth, since there are many ways to explore it, and exploring and
discovering both are fun!

UTILITY WORDS &#8211; Here are some utility words to help you get a
feel for what using Win32Forth is like.  If you want to see the
details of how to invoke a particular word type in VIEW WORD-NAME from
the console and you will be whisked to the source file where you can
look at the stack comments and any other notes you find there.

WORDS           aka VLIST       List the words in the dictionary  (See also VOCS)
SEE                     aka DECOMPILE Disassemble the word in question back to the
source.
ORDER           List the order in which the dictionary is searched.
VOCS                    Present a list of all the vocabularies
V                       Short for VIEW as in let&#8217;s view the file where the source
can be browsed.  The cursor will end up in the source file.  If you
move it over a word it will turn in to a hand.  If you click the mouse
while over a work you will be presented with the source for the word.
To get back to where you were tap the F10 function key.  To get back
to the console and the command line move the cursor to the console
window with the mouse.  There should be a better way to get back to
the command line like the ESC key; does any one know how?

E                       Short for edit.
EDIT                    Edit a file.

The first word you need to know in Forth is;

WORDS <substring> <substring>
WORDS displays all or a set of words from the Forth dictionary. Since
Win32Forth has over 5000 functions and constants available, you can't
hope to remember the names and functions of all of them, so WORDS
allows you to select a set of those words by specifying one or two
substrings (partial words) following the WORDS command on the Forth
command line.

UPPER CASE - You needn't worry about upper or lower case, Win32Forth
is case InSeNsItIvE.

Go to the Forth console window and type; WORDS ! <enter>

Forth will display a list of all the words in all vocabularies that
contain the substring "!". You will see the words "BEEP!" and "+!"
listed in the FORTH vocabulary. Go to the Forth window and type; SEE
BEEP! <enter> and then; SEE +! <enter> You will see that BEEP! is a
":" (colon) definition and "+!" is a CODE word that gets disassembled.

DECOMPILER - As you can see above, the decompiler and disassembler
display information in a form that is close to being re-compilable. If
you were to save the console buffer, you could later edit CONSOLE.TXT
and extract code for editing and re-compilation.

WORDS shows the vocabulary where a word is located, and you must make
sure the correct vocabulary is selected before using SEE to decompile
it. The word that displays the current vocabulary search order is
ORDER, type;

ORDER <enter> A list of the vocabularies in the search order is
displayed. The Context list is the list of vocabularies that is
searched, and the Current vocabulary is the vocabulary where new
definitions are compiled. So to for example, if you were to type;
WORDS CODE <enter> You would see a list of word display, including the
word .CODE (pronounced dot code) in the HIDDEN vocabulary. To see
.CODE, you would type; HIDDEN SEE .CODE <enter> To select the hidden
vocabulary and then decompile the word .CODE. If you then type ORDER,
you will see that the top (left most) entry of the vocabulary search
order is HIDDEN. Lets try another example of WORDS that you may find
useful someday, type; WORDS WM_ <enter> You should have seen all of
the windows message constants listed. These are all of the messages
windows can send to an application. Don't worry, most of these are
handled automatically, you only need to handle the ones your
application needs to handle in a special way. All of the window
constants are kept in the WINCON vocabulary.

Notice that the scroll bar at the right of the console window allows
you to scroll back to the last 500 lines displayed in the console
window. This can be very handy for looking back at the output of a
long debugging session.

VOCABULARIES - Since we are talking about vocabularies, type; VOCS
<enter> VOCS will display some statistics on all of the vocabularies
in Win32Forth. <SNIP> Implementation details remain in the file
startup.txt  <snip>

NOTE: in the following section, you will be told to view and edit the
source for various words in the Win32Forth dictionary.

START HERE
VIEW - You can View the source for any word in the dictionary, with
the word 'V' or 'VIEW', ...

read more »



Fri, 06 Feb 2004 05:45:49 GMT  
 WIN32FORTH USERS MANUAL AND HELP DOCUMENTATON


Quote:
>P.S.  I see that the colors are not presented here.  How is the best
>way to do that?

Personally I could do without color, but you might convert the text into
an HTML file.


Thu, 12 Feb 2004 04:19:18 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Help- where get Primetime user's manual

2. I need a Win32Forth Manual

3. Win32Forth Manual?

4. HELP: HELP: HELP: HELP: Online-manual on Expect

5. Defining an user variable in Win32Forth

6. Documentaton for the dpANS word THEN

7. jdup (p. 201 J2 User Manual)

8. User Manuals

9. End User Manual for Fomin Report Builder

10. LOGO-L> User guide/manual

11. User guide/manual

 

 
Powered by phpBB® Forum Software