Win32Forth Documentation

Win32Forth Documentation
There are several words in the Win32Forth system that start with a period. They give the state of affairs for the system. .DEFERED and .LOADED are two of them.

Win32Forth Documentation by users in lieu of payment.
When you release poorly documented freeware, you might ask users to document it for you, in lieu of payment. Then you could release the next version with their comments. They might run into places where they _need_ documentation and have trouble figuring it out. They'll add comments for their own use, and it wouldn't be a big effort for them to clean those up some and send them to you. (From: Jonah Thomas)

BYE updates the REGISTER with the size and location of the windows for the next bootup as well as the font etc.

With the help of Robert Ackerman and Bob Smith we found out that Tom Zimmer has already done some HTML implementation in the WinView editor! What a surprise. I like Forth because it is fun and when you need a word you usually can find it already in once some on tells you about it!

The WinView editor is HTML aware. There are two modes in Winview. Browse mode and Edit mode. To see the HTML tags you have to be in edit mode. To see the result of a tag (bold or color etc.) you have to be in Browse mode.

To see an example of the use of BOLD search for "<B>" in WINVIEW.F To search use the pull down menus or use CTL+F You can not view the words HTML: or "<B>" (Tell me, don't ask me!) Don't forget to toggle the editor in to browse mode (Shift F9) to see it work. Neat!

The location of some editor source files

Win32Forth Fan Club

Hyper linked source files VIEW a word or BROWSE a word. A file will open. Place the cursor over any word you are interested in. Your cursor should change in to a hand. A left mouse click will open the proper file and take you to line where the definition is defined. To go back use the F10 function key.

Load highlighted text
Copy from Forth window to a new file in the editor window.
Use CTL-L to load it.

Neat things

  1. INDEX your custom made files by using the pull down menu under HYPER and clicking on BUILD HYPER LINK INDEX FILE. This way there will be hypertext links for every word!
  2. FLOAD reports changes in stack depth.
  3. The system remembers the window sizes and locations.
  4. DEBUG steps through the source code in a second window.
  5. It gives a count of the number of WORDs in the Vlist. F83s does not do this. Maybe it was added in F-PC?

POSTFIX is wrong (Oops)
Tom Zimmer wrote on CLF I looked carefully at your example, and I still couldn't believe it, but what you say is true. Unfortunately this particular "feature" has been in the system for far too long to correct, so we will just have to understand that POSTFIX means that the operands come AFTER the instruction, and PREFIX means that the operands come BEFORE the instruction.

Release preparations
I am preparing for a new release of Win32Forth. The changes will primarily be documentation and additional functions in the editor, rather than changes to the system code. WinView will be renamed maybe WinView+ or WinviewSVF. A missing piece of information is a step by step instruction (or another volunteer) on how to make a self-extracting zip file.

We are hoping to add documentation and comments about what a word does for the system or user, not how it works!! You can usually see from the code what is going on but not always why and what for, and what problem it solves.

Typos and corrections: When you come across something in a Win32Forth file that needs to be corrected add you’re comments in bold and email it in.

Add descriptions: When you figure out what a word in the system does make a note in the file above or below the source. Any kind of explanation added in to the source file that could later used by a glossary extractor. We can use DFC to find your changes specially if you send in the original version with your new version.

You may also eMail portions of a file, with instructions as where to add the new comments but this will take more work to put it together and test it, unless it is just a correction of diction or spelling.

To put bold text in a Win32Forth file the hard way. Edit the file (not brows) and put this <B> where you want the bold to start and put this <\B> where you want it to stop. Notice the slash is a foreword slash not a back slash. When you switch to Browse mode you will see the bold text. This function has been in the system for a while, but not much use was made of it. An example is in the file that come up when you hit F1 See the Bold lettering?

Switch to the edit mode via SHIFT+F9 and you will see this. (P.S. In the new release of WinView will let you use F7 for this) If you want the file let me know. It has lots of HTML stuff to learn about in there.


Switch to Browse mode and you will see this:

It would be nice to know if you will send something later (should we wait) or even if you have nothing to send, just send a note. I am doing this for fun and I need some company.

Unlike the DOS based F83s, WinForth is works just fine in any sub directory. For testing your changes I recommend creating a new sub directory instead of renaming the files. For example I have these directories:

Win32For (The original)
Win32ForCG (My application)
Win32ForTZ (Tom's latest release)
Win32ForJP (My experiments)
Win32ForBS (Bob Smith's releases)

Until we figure out how to make new Icons you may not have enough different icons for all these versions. For now you can go to either a DOS box or the Start/Run window and copy something like the below for the one you want like this: C:\WIN32FORJP\\WIN32FOR

Use any Icon for your system This URL tells how, let me know that it is good.*&rnum=3&

Useful words
LOAD-LINE Load the current file from line n
#FLOAD load the current file from line n1
.FREE Display the amount of used and available program memory
.FILE The current file is . . .
FSAVE, TURNKEY and APPLICATION all create new programs on your hard drive. They differ, in the type of program they create.

WinSer.F is modem Communications

Words that work
BROWSE Filename
Shift-F9 is the Browse/eEdit toggle
EDIT file-name It assumes .F as the file extension.
F-12 is Auto load Save & Load (On the 505 machine it is Fn-F2)
Ctl-T deletes to the next word
Highlight text then F11 or is it Ctl L ?
Paragraph shifting Highlight text then use TAB or SHIFT-TAB
MACRO by Wil Baden
Cut text Ctrl-X
Mark all text Ctrl-A
Right mouse popup menu when over a subject pane. Select a vocabulary & see all the words in the voc line 1013 of Win32Forth.New

Words with new names that I suggest
Free for .Free "Dot free"
AT for AT-XY Use PAGE first or the screen will jump

Documentation Needs
Double blank lines at paragraph section headers
Baden's Glossary extractor.
In-line comments from users.

Virtual Blocks (Faking it)
A block editor has some advantages. The advantages can be retained in a modern system.

In a block based system each screen is usually designed to be a collection of Forth words that work together. This makes it easier to understand how the words work with each other. It is easier to concentrate on a block of code that is a family of words by knowing that they all go together.

We are experimenting with words named +SCR and -SCR and have added them to Shift+PageUp and Shift+PageDown, which were unused in WniView. (I would prefer to use Ctrl+PageUp and Ctrl+PageDown but they are in use).

When a file has been properly formatted with a set of double blank lines above each paragraph (as is this document) then the PAGE-DOWN key will show you a new screen full each time. (It only works after the custom changes are compiled in to WinView+)

The next step is to make the editor pad the end of the paragraph with gray space like it does at the end of a file. (Take a look at a file from WinView)

What about when the code in a paragraph is not enough to fill a screen? Will some text from the next paragraph popup and intrude in to the screen? Will this break the programmer’s concentration. I will not help! This is especially true when reviewing code written by others.

I suggest that the editor be programmed to pad the bottom of the screen with a gray area. When a new line is added the gray area will retreat towards the bottom of the screen. There is nothing to prevent a virtual screen from becoming longer than a visual screen full. Of course nothing prevents the programmer form breaking up a long screen in to smaller chunks there by encouraging factoring, which is generally agreed as a good thing.

| Home | Meeting | Contacts | Join | Other | Discuss | Events | Websites |