next up previous contents index
Next: Object I/O Up: Input and Output Previous: Input and Output   Contents   Index


Message I/O

A message is a contiguous region of memory, being a colon definition. This permits messages to be transmitted and received, or written to mass storage and read back at a later time.

This only works, however, if the addresses in the dictionary are the same when the message is input as they were when the message was output. If the addresses are different, assuming an address threaded Forth, such as indirect or direct threading, this scheme fails.

If a token threading system is used, the only requirement is that the same tokens be bound to the same behaviour, but if the behaviour that a token is bound to is different, the metaphor is still good: it is just that a different mechine may provide a different view of reality -- it is really a different dream.

If these requirements are not met, or even if different machines altogether are used, the message can still be transmitted by decompiling it back to source format (or storing it as a source text character string), and then sending it to the remote machine where the compiler on that machine can produce a representation of the message intelligible to that Forth system. Remember, a message is a command, expressed in Forth, either as source text or in compiled form.


next up previous contents index
Next: Object I/O Up: Input and Output Previous: Input and Output   Contents   Index
Robert J. Brown
1999-09-26