#include <perms.h>

//          Edinburgh IMP77 Compiler - Version 8.4
//
//     1  ! convert with ./i2c -v -d -O --no-perms --icode test/3Darray.imp
//     2  %begin

int main(int argc, char **argv) { /*%begin*/
  _imp_initialise(argc, argv);

  //     3    %integer base1 = 50, base2 = 60, base3 = 70

  int BASE1;
  BASE1 = 50;
  int BASE2;
  BASE2 = 60;
  int BASE3;
  BASE3 = 70;

  //     4    %integer index1, index2, index3

  int INDEX1;
  int INDEX2;
  int INDEX3;

  //     5    %constinteger lim1 = 100, lim2 = 200, lim3 = 300
  //     6    %integerarray threed(base1:lim1, base2:lim2, base3:lim3)

  int THREED[100 - BASE1 + 1][200 - BASE2 + 1][300 - BASE3 + 1];

  //     7    %integer x

  int X;

  //     8
  //     9    index1 = 4; index2 = 5; index3 = 6

  INDEX1 = 4;
  INDEX2 = 5;
  INDEX3 = 6;

  //    10
  //    11    x = threed(index1, index2, index3)

  X = THREED[INDEX1 - BASE1][INDEX2 - BASE2][INDEX3 - BASE3];

  //    12
  //    13  %endofprogram

  _imp_stop(0);
  return 0;
end_0:;
}