«previous next»

Programming Aids & Other Features (continued)

Floating-point options

Floating-point options

Configuration of the floating-point math option is provided by a dialog box that is displayed the first time you load this option, and by using the Options > FPMath menu selection. The most important configuration option enables the use of the FPU's hardware stack, bringing a significant speed improvement to applications that can run entirely in the eight-element FPU stack.

CATCH-THROW exception handling has been extended to include restoration of the hardware floating-point stack.


Color-coded WORDS

The list of Forth words generated by WORDS can be set to display colors by the command COLORING ON (or select this option in the Preferences dialog box). The colors indicate certain categories, whose present decoding is given by this table:

Color

Category

Black
Blue
Red
Green
Cyan
Magenta
Dark yellow
Dark blue
Dark red
Dark green
Dark cyan
Dark magenta

Default (no recognized category)
Inline words (i.e., words expanded to inline code)
CONSTANTs
VARIABLEs
Menu items
Immediate words
User variables
VALUEs
Wordlists
WinProcs
Windows functions
Switches

You may, of course, double-click any of the words to see its source. Alternatively, you may display WORDS in a dialog box, with a number of selection options.

Watch points

Memory Watcher window

Up to eight live "watch points" (one cell each) may be monitored in a dialog box, with a selectable refresh rate.


Live memory window

Another dialog box may be set up as a live window into a memory region, with three different display formats and selectable refresh rates, as well as "freeze" and "refresh" buttons.

Files and pathnames

Source code may contain the file-loading instruction REQUIRES <filename> to unconditionally include, from a pre-defined list of directories, the first matching file. OPTIONAL <filename> (valid only while loading a file) will load filename only if it has not been loaded; if it is the first word on the first line of a file that is being loaded and filename is in the \Lib subdirectories, the file will be listed in a "Load Options" dialog box.

A directory stack allows one to save and restore a working directory via the words PUSHPATH and POPPATH.

Documentation and help

Included with every SwiftForth is a comprehensive ANS Forth glossary and a help file with the Windows API reference, which you may access interactively from the command window. The SwiftForth Reference Manual is supplied in PDF format (requires Adobe Reader), and may be launched from the Help menu.

«previous next»