[Inquiry] Re: Theme One Program -- Commentary Notes

Jon Awbrey jawbrey at oakland.edu
Mon Mar 17 16:28:11 CST 2003


o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o

TOP.  Commentary Note 4

o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o

Flint.

function flint (this: idea): idea;
var here: idea;

This is the declaration head of the function Flint.
declaring it as a function from ideas to ideas and
declaring a local variable "here" of the type idea.

Flint is the main repeating block of the program.
What it does will be described much further below,
when we come to the corresponding definition body,
in Par 5520.

(5189)(7529)

o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o

Next comes a rather large number of low level input-output functions.
These have the form of "transformations of ideas with side-effects".
In other words, they are defined to have the type of functions from
ideas to ideas, but the main purpose of calling them is to perform
some other useful action in passing.

Hold.

function hold (this: idea): idea;
begin
 hold := this;  stop
end;

This is a function from ideas to ideas,
that acts as the identity on the input,
with a side-effect of calling the Stop
procedure, defined above, that prompts
the user for some keypress to continue.

(5190)(7530)

o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o

Wait.

function wait (this: idea): idea;
begin
 wait := this;  delay (256)
end;

This is a function from ideas to ideas,
that acts as the identity on the input,
with a side-effect to delay the action
for about a quarter of a second.

(5191)(7531)

o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o

Dim.

function dim (this: idea): idea;
begin
 dim := this;  video (moot)
end;

This is a function from ideas to ideas,
that acts as the identity on the input,
with a side-effect to "moot" the output.

(5192)(7532)

o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o

Vid.

function vid (this: idea): idea;
begin
 vid := this;  video (firm)
end;

This is a function from ideas to ideas,
that acts as the identity on the input,
with a side-effect to "firm" the output.

(5193)(7533)

o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o

Dash.

function dash (this: idea): idea;
begin
 dash := this;  clreol
end;

This is a function from ideas to ideas,
that acts as the identity on the input,
with a side-effect to clear the screen
from the cursor to the end of the line.

(5194)(7534)

o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o

Lash.

function lash (this: idea): idea;
begin
 lash := this;  write (enter)
end;

This is a function from ideas to ideas,
that acts as the identity on the input,
with a side-effect to write a carriage
return character.

(5195)(7535)

o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o

Quash.

function quash (this: idea): idea;
begin
 quash := dash (lash (this))
end;

This is a function from ideas to ideas,
that acts as the identity on the input,
with a side-effect to write a carriage
return character and then to clear the
screen to the end of the line of text.

(5196)(7536)

o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o




More information about the Inquiry mailing list