When you start the Graphical Programming Server, it creates a window containing an input area and a command menu:
Languagebutton in the Commands menu and select the desired language from the menu. The available languages are Lisp, C, C++, Java, and Pascal.
First click on Language and select the desired language. Then click Program; position the box, then select ASSEMBLYC and PARTS. Position the small box to the left of the larger box. Click on the Acc button of the larger box, then select SUM and WEIGHT and position the box to the right of the larger box. Then click Done.
assemblycfor languages other than Lisp) has a
nameand a linked list of
partcfor languages other than Lisp) has a string
name, an integer
size, a float
weight, a Boolean flag
pretty, and a
linkpointing to another
partalso has a
It is also possible to define your own data structures, as described here. Click the mouse in the input area (the empty box), then enter the description of your data; the input editor is an Emacs subset. After the description of your data structure is complete, click the mouse outside the input area; the system will respond with a confirming message. Repeat the process as needed to define other data types.
After describing your data, you may want to make a view of your data structure as an abstract type; this is described here.
assemblyc) can be selected, or a user-defined type name can be entered.
After the inpuut type has been selected, the system will ask for
selection of the sequence over which to iterate. The
type has two sequences: the
name (a string, which is a
sequence of characters) and the
parts, a linked list of
assemblycas the input and
partsas the sequence, the screen image will look like this:
The next task is to select one or more accumulators to accumulate
something about the parts. Click on the
Acc button of
ITER_ACC box to add an accumulator. The system will
present a menu of accumulators. Many of the accumulators are fairly
obvious; Find-Update and some other accumulators are described below.
SUMis selected, the system will present a menu of things about a
PARTthat could be summed, such as the
It is also possible to accumulate the values of some expression,
similar to the process described below for specifying a test.
There may be other things about the accumulator that can be
specified, e.g. the
INITIAL-VALUE of a
WEIGHTonly when the
SIZEis greater than 3. To specify the test, click on the left button of the
SUMbox and select
TEST can be specified in several ways:
Specify fncan be used to specify a customized test:
FN-NAMEallows the user to specify the name of a function to perform the test.
CODEallows the user to specify a bit of code to perform the test. This code must be enclosed in parentheses; it can be in either Lisp prefix form or infix form. A property of the item is accessed as
self), for example:
( (size self) > 3 )
VIPwill use the VIP system to acquire the code graphically.
RECORDallows the user to specify a record to be accumulated.
Find-Updateis an accumulator that finds an item in a database (using the
KEYfeature of the item), inserting the item if it is not present in the database. Then the information related to that key (one or more accumulators) is updated.
Find-Update is selected, the system will first ask
KEY to be used; this key must be compatible with
the database that is chosen.
Accumulators can be added to the
Acc button of
Find-Update. In addition, a database must be selected
Storage button of the