«previous next»

SWIFTFORTH DETAILS

Overview

Windows Interface (a)

Windows Interface (b)

Windows Interface (c)

Programming Aids & Features (a)

Programming Aids & Features (b)

Programming Aids & Features (c)

Object-Oriented Programming (SWOOP)

Forth Implementation Features (a)

Forth Implementation Features (b)

Multitasking

Demo Programs

SwiftForth Programming References

Release History

Download Free Evaluation Version


Multitasking

Windows is an inherently multitasked environment, operating at several levels:

A window (or a dialog box, which is a kind of window) is an instance of a particular class of windows that the application has defined. Each has a handle. When an event occurs, the OS sends a message to the application, which dispatches it with the window's handle, and on receipt of the message the window's WNDPROC will execute. It's an entirely event-driven paradigm.

A SwiftForth program can support both multiple threads and multiple windows. A thread is in some respects similar to a pF/x or SwiftOS background task, in that it is given its own Forth stacks and user variables and is executing code from within SwiftForth's dictionary. However, since the Windows OS controls execution and "task switching," there is no equivalent of the PAUSE loop found in pF/x or SwiftOS. At this time SwiftForth does not support multiple users, where a user is a task with a private dictionary or individual interactive access via the text interpreter to the shared dictionary.

Just as you can launch multiple instances of Windows applications such as Word or Excel, you can also launch multiple instances of SwiftForth. These function as completely independent programs, each of which might have its own threads and/or windows. It is relatively easy for one SwiftForth program to send messages to another.

«previous next»