 // This macro demonstrates how to use arrays and functions

  a1 = newArray(5);
  for (i=0; i<a1.length; i++)
      a1[i] = i;
  reverseArray(a1); printArray(a1);

  a2 = newArray(1.23, 4.56, 7.89);
  reverseArray(a2); printArray(a2);

  a3 = newArray("cat", "dog", "mouse", "rabbit");
  reverseArray(a3); printArray(a3);

  function reverseArray(a) {
      size = a.length;
      for (i=0; i<size/2; i++) {
          tmp = a[i];
          a[i] = a[size-i-1];
          a[size-i-1] = tmp;
       }
  }

  function printArray(a) {
      print("");
      for (i=0; i<a.length; i++)
          print(i+": "+a[i]);
  }
