dos_compilers/Digital Research PLI-86 v1/CALL.PLI
2024-06-30 12:01:25 -07:00

35 lines
768 B
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

call:
procedure options(main);
declare
f(3) entry(float) returns(float) variable,
a entry(float) returns(float); */ entry constant */
declare
i fixed, x float;
f(1) = a;
f(2) = b;
f(3) = c;
do i = 1 to 3;
put skip list('Type x ');
get list(x);
put list('f(',i,')=',f(i)(x));
end;
stop;
b:
procedure(x) returns(float); /* internal procedure */
declare x float;
return (2*x + 1);
end b;
c:
procedure(x) returns(float); /* internal procedure */
declare x float;
return(sin(x));
end c;
end call;