HELP ACTIVE                                            R.Evans June 1983
                                               Updated A.Sloman Nov 1986

Lib ACTIVE enhances lib TURTLE by providing an 'active' turtle picture
on the screen which is updated whenever a turtle command is given. It
leaves an area below the picture to use for commands. This area is
scrolled automatically.

For details of LIB TURTLE, see TEACH *TURTLE. HELP *TURTLE gives a very
brief summary of available commands.

   [N.B The "active" operator has been re-named as "startactive" to
   prevent a clash with the new syntax word "active" used in defining
   active variables.
   For information on "active" variables, see HELP * ACTIVE_VARIABLES ]

ACTIVE makes use of LIB * V200GRAPH, which works on VT-52/VISUAL 200
terminals only. To make LIB ACTIVE work on another terminal, copy
V200GRAPH.P (using <ENTER> SHOWLIB v200graph), then redefine the
facilities to work on the terminal. Alternatively, use  VTURTLE,
which works within VED to provide similar, though less efficient,
facilities. See HELP * VTURTLE, LIB * VTURTLE

LIB ACTIVE
divides the screen into two parts - the picture in the upper portion and
a normal scrolling window (like the whole screen is normally) in the
lower portion. The size of the portions depends on the size of the
turtle picture - which shouldn't be larger than 79 by 22 and to be
comfortable, not larger than 79 by about 18.

To load the library type

    lib active

and as it loads you will get the messages:

    ;;; LOADING LIB v200graph

    DO CTRL-C or 'ACTIVE;' TO SET UP ACTIVE TURTLE

(also, if you're not in ved, the prompt ':' will be at the end of the latter
message, not on the next line as usual)

Typing CTRL-C will put you into ACTIVE mode (ie split the screen into two
halves), but that's not the recommended way - it's better to do

    startactive;

You probably won't see any difference at first, but hit <RETURN> a few
times and you will see that the text disappears half way up the screen,
rather than off the top as usual. Give a turtle command like

    drawto(5,5);

and drawing will happen immediately on the top half of your screen. (You
don't have to do display(); as you do in turtle).

To get out of ACTIVE mode type

    endactive;

Again, you probably won't see any difference, but if you hit <RETURN>
the whole screen will scroll up, not just the lower half - it's gone
back to normal.

If you're in ACTIVE mode and you get a mishap, a new message appears at
the end of the mishap message:

    TYPE CTRL-C TO CONTINUE:

It is wisest to do as it says - type CTRL-C - even though it sometimes
works properly even if you don't.


In ACTIVE mode, you can use all the turtle commands exactly as you would
using lib TURTLE, except, of course, that you won't have to keep typing
display(); all the time to see what's happening.


USING ACTIVE MODE IN PROGRAMS
-----------------------------

    It is often nice to use ACTIVE mode in a program - for example for
the display of a game etc. As the library stands there can be a few
problems:

1) the library tries to put you into ACTIVE mode straightaway. In a
   program this isn't usually what you want - you want to be in ordinary
   mode until (and after) you run your 'main' procedure.
2) Using lib turtle is useful for doing write-ups etc since you can print
   out the result (you can't with ACTIVE). But turtle needs all those
   display(); calls which slow down ACTIVE a lot since it refreshes the
   WHOLE picture every time!

So here is how to cope with all this! In your main program file, near the
top you probably have the command

    lib turtle

(or "uses turtle" - which would be better).

To use lib active, insert the following commands AFTER the 'lib turtle' line

    loadlib("active");
    identfn -> popsetpop;
    identfn -> display;

The first loads lib active, the second stops it trying to go into active
mode straight away and the third stops display from getting in the way.

NB It is no longer possible to load lib active with the command
    uses active;

This is because "active" is now a syntax word, used in defining active
variables.

    Doing all that won't actually put you into active mode. To do that
you can type 'active' and 'endactive' before you run your program, but a
neater way is provided by the macro ACTIVEMODE. All you have to do is
insert

    activemode;

in your main procedure up at the top (ie with your VARS statements etc.)
For example, suppose your main procedure is called GO, then it might
look like this:

    define go();
        vars foo baz;
        activemode;
        ...
        ...
    enddefine;


Typing

    go();

in this form is about the same as typing

    active;
    go();
    endactive;

for the old version of GO (without the activemode in it), but it's
tidier, and you don't have to remember the 'endactive' afterwards.

-----<Copyright University of Sussex 1986.  All rights reserved.>-------
