#include <perms.h>
// Edinburgh IMP77 Compiler - Version 8.4
//
// 1 %begin
int main(int argc, char **argv) { /*%begin*/
_imp_enter(main);
_imp_initialise(argc, argv);
// 2 %ownlongrealarray a(1:6)=0.99,1.0,1.01,0.99,1.0,1.01;
static double A[6] = {0.99, 1.0, 1.01, 0.99, 1.0, 1.01};
_imp_create_constdv(static, double, A, 1, 6);
// 3 %longreal x; %integer i
double X = __builtin_nan("");
int I = 0xFEFEFEFE;
// 4 %for i=1,1,3 %cycle
// %for I = 1, 1, 3 %cycle
{
I = 0;
L_0001:
if (I == 3) goto L_0002;
I += 1;
// 5 x=a(i)
X = A[I - 1];
// 6 %if x<1.0 %then printstring("less ")
if ((X) >= (1.0)) goto L_0004;
_imp_printf("%s", "less ");
L_0004:;
// 7 %if x=1.0 %then printstring("equal ")
if ((X) != (1.0)) goto L_0005;
_imp_printf("%s", "equal ");
L_0005:;
// 8 %if x>1.0 %then printstring("Greater ")
if ((X) <= (1.0)) goto L_0006;
_imp_printf("%s", "Greater ");
L_0006:;
// 9 %if x<=1.0 %then printstring(" less= ")
if ((X) > (1.0)) goto L_0007;
_imp_printf("%s", " less= ");
L_0007:;
// 10 %if x#1.0 %then printstring("noteq ")
if ((X) == (1.0)) goto L_0008;
_imp_printf("%s", "noteq ");
L_0008:;
// 11 %if x>=1.0 %then printstring("Greater= ")
if ((X) < (1.0)) goto L_0009;
_imp_printf("%s", "Greater= ");
L_0009:;
// 12 %if 1.0<x %then printstring("less ")
if ((1.0) >= (X)) goto L_000A;
_imp_printf("%s", "less ");
L_000A:;
// 13 %if 1.0=x %then printstring("equal ")
if ((1.0) != (X)) goto L_000B;
_imp_printf("%s", "equal ");
L_000B:;
// 14 %if 1.0>x %then printstring("Greater ")
if ((1.0) <= (X)) goto L_000C;
_imp_printf("%s", "Greater ");
L_000C:;
// 15 %if 1.0<=x %then printstring(" less= ")
if ((1.0) > (X)) goto L_000D;
_imp_printf("%s", " less= ");
L_000D:;
// 16 %if 1.0#x %then printstring("noteq ")
if ((1.0) == (X)) goto L_000E;
_imp_printf("%s", "noteq ");
L_000E:;
// 17 %if mod(1.0)>=x %then printstring("Greater=")
if ((_imp_MOD(1.0)) < (X)) goto L_000F;
_imp_printf("%s", "Greater=");
L_000F:;
// 18 newline
_imp_NEWLINE();
// 19 %repeat
goto L_0001;
}
L_0002:;
// 20 %endofprogram
_imp_stop(0);
end_0:;
_imp_begin_backtrace(main);
_imp_diagf("\n\nArguments:\n\n");
_imp_diagf("ARGC = %d\n", argc);
_imp_diagf("ARGV @[%p]\n", argv);
for (int i = 0; i < argc; i++) {
_imp_diagf(" ARGV(%d) = \"%s\"\n", i, argv[i]);
}
if (argv[argc] == 0) {
_imp_diagf(" ARGV(%d) = NULL\n", argc);
} else {
_imp_diagf(" ARGV(%d) = \"%s\"\n", argc, argv[argc]);
}
_imp_diagf("\nLocal Variables:\n\n");
_imp_bt_real(X);
_imp_bt_int(I);
_imp_end_backtrace();
_imp_stop(0);
}