Table of Contents
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 [quot ] interactive mode [quot ] by executing a Gamma script file with a variation of this code that is entered when the file is loaded.
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.