#include <perms.h>
// Edinburgh IMP77 Compiler - Version 8.4
//
// 1 %begin
int main(int argc, char **argv) { /*%begin*/
_imp_initialise(argc, argv);
// 2 %routine calgol(%longreal c, %integerfn f(%integer p), %integername n)
void CALGOL(double C, int (*F)(int P), int *N) {
// 3 n = f(n)
*N = F(*N);
// 4 %end
return;
} /* end of CALGOL */
// ?C unused
// 5 %integerfn simple(%integer param)
int SIMPLE(int PARAM) {
// 6 printstring("Called"); newline
_imp_PRINTSTRING(_imp_str_literal("Called"));
_imp_NEWLINE();
// 7 %result = param
return PARAM;
// 8 %end
} /* end of SIMPLE */
// 9 %longreal a = 1.23
double A;
A = 1.23;
// 10 %integer num
int NUM;
// 11 num = 3
NUM = 3;
// 12 calgol(a, simple, num)
CALGOL(A, SIMPLE, /*?*/ &NUM);
// 13 %endofprogram
_imp_stop(0);
return 0;
end_0:;
}