Chapter 10. Interactive Development and Debugging

Table of Contents
10.1. Interactive Mode Implementation
10.2. Getting On-Line Help for Functions
10.3. Examining Variables in a Class or Instance
10.4. Using the Debug Prompt
10.5. Debugging a program

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.

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