Interactive Development and Debugging

Gamma: Version 4.0
Prev |  | Next

# Chapter 10. Interactive Development and Debugging

# 10.1. Interactive Mode Implementation

The implementation of Gamma's interactive mode provides an interesting example of the how to use the concise power of the language. Interactive mode is implemented with the following few lines of Gamma:

        princ("Gamma> ");
        flush(stdout);
        while ((x = read( stdin)) != _eof_)
        {
            princ( eval( x));
            terpri();
            princ("Gamma> ");
            flush(stdout);
        }

An application can easily provide its own customized " interactive mode " by executing a Gamma script file with a variation of this code that is entered when the file is loaded.

Prev | Home | Next
Tutorial III | Up | Getting On-Line Help for Functions

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.