[Inquiry] Re: Theme One Program -- Commentary Notes
Jon Awbrey
jawbrey at oakland.edu
Tue Mar 18 22:58:05 CST 2003
o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o
TOP. Commentary Note 12
o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o
Anon.
Anon is a function from integers to integers
that outputs its argument incremented by one.
The argument is treated as a value parameter,
so only the functional value is upped by one.
function anon (what: numb): numb;
begin
inc (what); anon := what
end;
(5226)(7566)
o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o
Anew.
Anew is a function from integers to integers
that outputs its argument incremented by one.
The argument is cast as a variable parameter,
so its value is incremented as a side-effect.
function anew (var what: numb): numb;
begin
inc (what); anew := what
end;
(5227)(7567)
o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o
Alow.
Alow is a function from integers to integers
that outputs its argument decremented by one.
The argument is treated as a value parameter,
so only the functional value is decremented.
function alow (what: numb): numb;
begin
alow := what - 1
end;
(5228)(7568)
o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o
Abye.
Abye is a function from integers to integers
that outputs its argument decremented by one.
The argument is cast as a variable parameter,
so its value is decremented as a side-effect.
function abye (var what: numb): numb;
begin
what := what - 1; abye := what
end;
(5229)(7569)
o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o
More information about the Inquiry
mailing list