Order SwiftForth™ for Windows, Mac OS X and Linux programming. Examples, source, documentation, more.
Mac and the Mac logo are trademarks of Apple Inc., registered in the U.S. and other countries.
When you type in the command window, SwiftForth will wait to process what you’ve typed until you press the Enter key. Before pressing Enter, you may backspace or use the left- and right-arrow keys to edit your command line. The up- and down-arrow keys page through a buffer of previous command lines.
The SwiftForth command-line processor also implements tab completion. Pressing the Tab key after typing a few characters repeatedly completes the line from matching patterns in the command history buffer.
You view the source for any word in the current search order by typing LOCATE <name>. This displays the line in the source on which the word appears, with several lines after it as well as the file in which the source is located and the line numbers of the lines displayed. Here's an example:
You may invoke your linked editor for the word whose source was most recently displayed by LOCATE word by typing EDIT. The editor will be launched and open with the correct source line selected.
Alternatively, you can type EDIT <name> to open the editor positioned at the line with the definition of name.
SwiftForth provides a cross-reference tool that enables you to find all references to a word. To find all the places a word is used, type:
This displays the first line of the definition of name, followed by each line of source code in which name is referenced in the currently loaded code. If there are multiple definitions with the same name, WHERE list each definition and the references to it separately. The shortcut:
does the same thing. This command is not the same as a source search; it is based on the code that is loaded right now. This means you will be spared any instances of name in files you aren’t using and can see redifinitions and their respective references.