Next: Syntax of A++ including
Up: Contents
Previous: Examples of syntax of
Contents
Start
In order to interface with physical computer resources like the screen of the monitor, the printer and the storage devices it is necessary to introduce a few primitives into A++. Without these additional primiteve functions it would not be possible to display results on the screen, not would it be possible to load A++-code from mass-storage devices.
It will also be very helpful to introduce primitive functions that allow to use symbolic constants and strings of characters.
The following extensions to A++ have been kept to an absolute minimum to remain faithful to the purpose of A++. Further extensions will lead to a new language called ARS++, which is described in detail in the book 'Undiluted Programming'. The name ARS++ stands for 'ARS(A++) plus Scheme plus Extensions', indicating that this new language is composed of A++ as its nucleus with most of the primitive functions of Scheme and a few more, to equip ARS++ for programming tasks in the real world.
These extension are briefly described below:
- vmzero a reference to the number ``0'' in the machine.
- vmtrue a reference to the boolean value 'true'
in the interpreter.
- vmfalse a reference to the boolean value 'false'
in the interpreter.
- double-quoted-string This abstraction introduces
strings into A++. They are needed in the context of the ``load'' primitive
allowing to load A++ - code from a file.
- single-quoted-string This abstraction introduces
symbolic constants into A++. They are convenient in the context of
object oriented programming, when sending messages to objects..
- incr This primitive is used to increment a number in the
virtual machine by one.
- print This primitive displays a number or a boolean value
on the screen.
- load Primitive
allowing to load A++ - code from a file.
- equalx Primitive allowing to compare data items other than
Church Numerals (numbers directly derived from ARS).
- quit Function to terminate execution of program.
These primitive abstractions are used in the following
A++ - lambda abstractions:
- ndisp! displays a numerical value,
- bdisp! displays a boolean value,
- ldisp! displays a list.
Subsections
Next: Syntax of A++ including
Up: Contents
Previous: Examples of syntax of
Contents
Start
Georg P. Loczewski
2004-03-05