prelude.c

     
   1  //! @file prelude.c
   2  //! @author J. Marcel van der Veer
   3  
   4  //! @section Copyright
   5  //!
   6  //! This file is part of Algol68G - an Algol 68 compiler-interpreter.
   7  //! Copyright 2001-2024 J. Marcel van der Veer [algol68g@xs4all.nl].
   8  
   9  //! @section License
  10  //!
  11  //! This program is free software; you can redistribute it and/or modify it 
  12  //! under the terms of the GNU General Public License as published by the 
  13  //! Free Software Foundation; either version 3 of the License, or 
  14  //! (at your option) any later version.
  15  //!
  16  //! This program is distributed in the hope that it will be useful, but 
  17  //! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
  18  //! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 
  19  //! more details. You should have received a copy of the GNU General Public 
  20  //! License along with this program. If not, see [http://www.gnu.org/licenses/].
  21  
  22  //! @section Synopsis
  23  //!
  24  //! Standard prelude definitions.
  25  
  26  #include "a68g.h"
  27  #include "a68g-prelude.h"
  28  #include "a68g-prelude-mathlib.h"
  29  #include "a68g-prelude-gsl.h"
  30  #include "a68g-transput.h"
  31  #include "a68g-mp.h"
  32  #include "a68g-parser.h"
  33  #include "a68g-double.h"
  34  
  35  #define A68_STD A68_TRUE
  36  #define A68_EXT A68_FALSE
  37  
  38  //! @brief Standard_environ_proc_name.
  39  
  40  char *standard_environ_proc_name (GPROC f)
  41  {
  42    for (TAG_T *i = IDENTIFIERS (A68_STANDENV); i != NO_TAG; FORWARD (i)) {
  43      if (PROCEDURE (i) == f) {
  44        return NSYMBOL (NODE (i));
  45      }
  46    }
  47    return NO_TEXT;
  48  }
  49  
  50  //! @brief Enter tag in standenv symbol table.
  51  
  52  void add_a68_standenv (BOOL_T portable, int a, NODE_T * n, char *c, MOID_T * m, int p, GPROC * q)
  53  {
  54  #define INSERT_TAG(l, n) {\
  55    NEXT (n) = *(l);\
  56    *(l) = (n);\
  57    }
  58    TAG_T *new_one = new_tag ();
  59    PROCEDURE_LEVEL (INFO (n)) = 0;
  60    USE (new_one) = A68_FALSE;
  61    HEAP (new_one) = HEAP_SYMBOL;
  62    TAG_TABLE (new_one) = A68_STANDENV;
  63    NODE (new_one) = n;
  64    VALUE (new_one) = (c != NO_TEXT ? TEXT (add_token (&A68 (top_token), c)) : NO_TEXT);
  65    PRIO (new_one) = p;
  66    PROCEDURE (new_one) = q;
  67    A68_STANDENV_PROC (new_one) = (BOOL_T) (q != NO_GPROC);
  68    UNIT (new_one) = NULL;
  69    PORTABLE (new_one) = portable;
  70    MOID (new_one) = m;
  71    NEXT (new_one) = NO_TAG;
  72    if (a == IDENTIFIER) {
  73      INSERT_TAG (&IDENTIFIERS (A68_STANDENV), new_one);
  74    } else if (a == OP_SYMBOL) {
  75      INSERT_TAG (&OPERATORS (A68_STANDENV), new_one);
  76    } else if (a == PRIO_SYMBOL) {
  77      INSERT_TAG (&PRIO (A68_STANDENV), new_one);
  78    } else if (a == INDICANT) {
  79      INSERT_TAG (&INDICANTS (A68_STANDENV), new_one);
  80    } else if (a == LABEL) {
  81      INSERT_TAG (&LABELS (A68_STANDENV), new_one);
  82    }
  83  #undef INSERT_TAG
  84  }
  85  
  86  //! @brief Compose PROC moid from arguments - first result, than arguments.
  87  
  88  MOID_T *a68_proc (MOID_T * m, ...)
  89  {
  90    va_list attribute;
  91    va_start (attribute, m);
  92    PACK_T *p = NO_PACK, *q = NO_PACK;
  93    MOID_T *y;
  94    while ((y = va_arg (attribute, MOID_T *)) != NO_MOID) {
  95      PACK_T *new_one = new_pack ();
  96      MOID (new_one) = y;
  97      TEXT (new_one) = NO_TEXT;
  98      NEXT (new_one) = NO_PACK;
  99      if (q != NO_PACK) {
 100        NEXT (q) = new_one;
 101      } else {
 102        p = new_one;
 103      }
 104      q = new_one;
 105    }
 106    va_end (attribute);
 107    return add_mode (&TOP_MOID (&A68_JOB), PROC_SYMBOL, count_pack_members (p), NO_NODE, m, p);
 108  }
 109  
 110  //! @brief Enter an identifier in standenv.
 111  
 112  void a68_idf (BOOL_T portable, char *n, MOID_T * m, GPROC * q)
 113  {
 114    add_a68_standenv (portable, IDENTIFIER, some_node (TEXT (add_token (&A68 (top_token), n))), NO_TEXT, m, 0, q);
 115  }
 116  
 117  void a68_id2 (BOOL_T portable, char *n1, char *n2, MOID_T * m, GPROC * q)
 118  {
 119    add_a68_standenv (portable, IDENTIFIER, some_node (TEXT (add_token (&A68 (top_token), n1))), NO_TEXT, m, 0, q);
 120    add_a68_standenv (A68_EXT, IDENTIFIER, some_node (TEXT (add_token (&A68 (top_token), n2))), NO_TEXT, m, 0, q);
 121  }
 122  
 123  //! @brief Enter a moid in standenv.
 124  
 125  void a68_mode (int p, char *t, MOID_T ** m)
 126  {
 127    (*m) = add_mode (&TOP_MOID (&A68_JOB), STANDARD, p, some_node (TEXT (find_keyword (A68 (top_keyword), t))), NO_MOID, NO_PACK);
 128  }
 129  
 130  //! @brief Enter a priority in standenv.
 131  
 132  void a68_prio (char *p, int b)
 133  {
 134    add_a68_standenv (A68_TRUE, PRIO_SYMBOL, some_node (TEXT (add_token (&A68 (top_token), p))), NO_TEXT, NO_MOID, b, NO_GPROC);
 135  }
 136  
 137  //! @brief Enter operator in standenv.
 138  
 139  void a68_op (BOOL_T portable, char *n, MOID_T * m, GPROC * q)
 140  {
 141    add_a68_standenv (portable, OP_SYMBOL, some_node (TEXT (add_token (&A68 (top_token), n))), NO_TEXT, m, 0, q);
 142  }
 143  
 144  //! @brief Enter standard modes in standenv.
 145  
 146  void stand_moids (void)
 147  {
 148  // Primitive A68 moids.
 149    a68_mode (0, "VOID", &M_VOID);
 150  // Standard precision.
 151    a68_mode (0, "INT", &M_INT);
 152    a68_mode (0, "REAL", &M_REAL);
 153    a68_mode (0, "COMPLEX", &M_COMPLEX);
 154    a68_mode (0, "COMPL", &M_COMPL);
 155    a68_mode (0, "BITS", &M_BITS);
 156    a68_mode (0, "BYTES", &M_BYTES);
 157  // Multiple precision.
 158    a68_mode (1, "INT", &M_LONG_INT);
 159    a68_mode (1, "REAL", &M_LONG_REAL);
 160    a68_mode (1, "COMPLEX", &M_LONG_COMPLEX);
 161    a68_mode (1, "COMPL", &M_LONG_COMPL);
 162    a68_mode (1, "BITS", &M_LONG_BITS);
 163    a68_mode (1, "BYTES", &M_LONG_BYTES);
 164    a68_mode (2, "REAL", &M_LONG_LONG_REAL);
 165    a68_mode (2, "INT", &M_LONG_LONG_INT);
 166    a68_mode (2, "COMPLEX", &M_LONG_LONG_COMPLEX);
 167    a68_mode (2, "COMPL", &M_LONG_LONG_COMPL);
 168  // Other.
 169    a68_mode (0, "BOOL", &M_BOOL);
 170    a68_mode (0, "CHAR", &M_CHAR);
 171    a68_mode (0, "STRING", &M_STRING);
 172    a68_mode (0, "FILE", &M_FILE);
 173    a68_mode (0, "CHANNEL", &M_CHANNEL);
 174    a68_mode (0, "PIPE", &M_PIPE);
 175    a68_mode (0, "FORMAT", &M_FORMAT);
 176    a68_mode (0, "SEMA", &M_SEMA);
 177    a68_mode (0, "SOUND", &M_SOUND);
 178    PORTABLE (M_PIPE) = A68_FALSE;
 179    HAS_ROWS (M_SOUND) = A68_TRUE;
 180    PORTABLE (M_SOUND) = A68_FALSE;
 181  // ROWS.
 182    M_ROWS = add_mode (&TOP_MOID (&A68_JOB), ROWS_SYMBOL, 0, NO_NODE, NO_MOID, NO_PACK);
 183  // REFs.
 184    M_REF_INT = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_INT, NO_PACK);
 185    M_REF_REAL = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_REAL, NO_PACK);
 186    M_REF_COMPLEX = M_REF_COMPL = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_COMPLEX, NO_PACK);
 187    M_REF_BITS = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_BITS, NO_PACK);
 188    M_REF_BYTES = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_BYTES, NO_PACK);
 189    M_REF_FORMAT = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_FORMAT, NO_PACK);
 190    M_REF_PIPE = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_PIPE, NO_PACK);
 191  // Multiple precision.
 192    M_REF_LONG_INT = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_LONG_INT, NO_PACK);
 193    M_REF_LONG_REAL = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_LONG_REAL, NO_PACK);
 194    M_REF_LONG_COMPLEX = M_REF_LONG_COMPL = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_LONG_COMPLEX, NO_PACK);
 195    M_REF_LONG_LONG_INT = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_LONG_LONG_INT, NO_PACK);
 196    M_REF_LONG_LONG_REAL = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_LONG_LONG_REAL, NO_PACK);
 197    M_REF_LONG_LONG_COMPLEX = M_REF_LONG_LONG_COMPL = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_LONG_LONG_COMPLEX, NO_PACK);
 198    M_REF_LONG_BITS = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_LONG_BITS, NO_PACK);
 199    M_REF_LONG_BYTES = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_LONG_BYTES, NO_PACK);
 200  // Other.
 201    M_REF_BOOL = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_BOOL, NO_PACK);
 202    M_REF_CHAR = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_CHAR, NO_PACK);
 203    M_REF_FILE = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_FILE, NO_PACK);
 204    M_REF_REF_FILE = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_REF_FILE, NO_PACK);
 205    M_REF_SOUND = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_SOUND, NO_PACK);
 206  // [] INT.
 207    M_ROW_INT = add_mode (&TOP_MOID (&A68_JOB), ROW_SYMBOL, 1, NO_NODE, M_INT, NO_PACK);
 208    HAS_ROWS (M_ROW_INT) = A68_TRUE;
 209    SLICE (M_ROW_INT) = M_INT;
 210    M_REF_ROW_INT = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_ROW_INT, NO_PACK);
 211    NAME (M_REF_ROW_INT) = M_REF_INT;
 212  // [] REAL.
 213    M_ROW_REAL = add_mode (&TOP_MOID (&A68_JOB), ROW_SYMBOL, 1, NO_NODE, M_REAL, NO_PACK);
 214    HAS_ROWS (M_ROW_REAL) = A68_TRUE;
 215    SLICE (M_ROW_REAL) = M_REAL;
 216    M_REF_ROW_REAL = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_ROW_REAL, NO_PACK);
 217    NAME (M_REF_ROW_REAL) = M_REF_REAL;
 218  // [,] REAL.
 219    M_ROW_ROW_REAL = add_mode (&TOP_MOID (&A68_JOB), ROW_SYMBOL, 2, NO_NODE, M_REAL, NO_PACK);
 220    HAS_ROWS (M_ROW_ROW_REAL) = A68_TRUE;
 221    SLICE (M_ROW_ROW_REAL) = M_ROW_REAL;
 222    M_REF_ROW_ROW_REAL = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_ROW_ROW_REAL, NO_PACK);
 223    NAME (M_REF_ROW_ROW_REAL) = M_REF_ROW_REAL;
 224  // [] COMPLEX.
 225    M_ROW_COMPLEX = add_mode (&TOP_MOID (&A68_JOB), ROW_SYMBOL, 1, NO_NODE, M_COMPLEX, NO_PACK);
 226    HAS_ROWS (M_ROW_COMPLEX) = A68_TRUE;
 227    SLICE (M_ROW_COMPLEX) = M_COMPLEX;
 228    M_REF_ROW_COMPLEX = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_ROW_COMPLEX, NO_PACK);
 229    NAME (M_REF_ROW_COMPLEX) = M_REF_COMPLEX;
 230  // [,] COMPLEX.
 231    M_ROW_ROW_COMPLEX = add_mode (&TOP_MOID (&A68_JOB), ROW_SYMBOL, 2, NO_NODE, M_COMPLEX, NO_PACK);
 232    HAS_ROWS (M_ROW_ROW_COMPLEX) = A68_TRUE;
 233    SLICE (M_ROW_ROW_COMPLEX) = M_ROW_COMPLEX;
 234    M_REF_ROW_ROW_COMPLEX = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_ROW_ROW_COMPLEX, NO_PACK);
 235    NAME (M_REF_ROW_ROW_COMPLEX) = M_REF_ROW_COMPLEX;
 236  // [] BOOL.
 237    M_ROW_BOOL = add_mode (&TOP_MOID (&A68_JOB), ROW_SYMBOL, 1, NO_NODE, M_BOOL, NO_PACK);
 238    HAS_ROWS (M_ROW_BOOL) = A68_TRUE;
 239    SLICE (M_ROW_BOOL) = M_BOOL;
 240  // FLEX [] BOOL.
 241    MOID_T *m = add_mode (&TOP_MOID (&A68_JOB), FLEX_SYMBOL, 0, NO_NODE, M_ROW_BOOL, NO_PACK);
 242    HAS_ROWS (m) = A68_TRUE;
 243    M_FLEX_ROW_BOOL = m;
 244  // [] BITS.
 245    M_ROW_BITS = add_mode (&TOP_MOID (&A68_JOB), ROW_SYMBOL, 1, NO_NODE, M_BITS, NO_PACK);
 246    HAS_ROWS (M_ROW_BITS) = A68_TRUE;
 247    SLICE (M_ROW_BITS) = M_BITS;
 248  // [] LONG BITS.
 249    M_ROW_LONG_BITS = add_mode (&TOP_MOID (&A68_JOB), ROW_SYMBOL, 1, NO_NODE, M_LONG_BITS, NO_PACK);
 250    HAS_ROWS (M_ROW_LONG_BITS) = A68_TRUE;
 251    SLICE (M_ROW_LONG_BITS) = M_LONG_BITS;
 252  // [] CHAR.
 253    M_ROW_CHAR = add_mode (&TOP_MOID (&A68_JOB), ROW_SYMBOL, 1, NO_NODE, M_CHAR, NO_PACK);
 254    HAS_ROWS (M_ROW_CHAR) = A68_TRUE;
 255    SLICE (M_ROW_CHAR) = M_CHAR;
 256  // [][] CHAR.
 257    M_ROW_ROW_CHAR = add_mode (&TOP_MOID (&A68_JOB), ROW_SYMBOL, 1, NO_NODE, M_ROW_CHAR, NO_PACK);
 258    HAS_ROWS (M_ROW_ROW_CHAR) = A68_TRUE;
 259    SLICE (M_ROW_ROW_CHAR) = M_ROW_CHAR;
 260  // MODE STRING = FLEX [] CHAR.
 261    m = add_mode (&TOP_MOID (&A68_JOB), FLEX_SYMBOL, 0, NO_NODE, M_ROW_CHAR, NO_PACK);
 262    HAS_ROWS (m) = A68_TRUE;
 263    M_FLEX_ROW_CHAR = m;
 264    EQUIVALENT (M_STRING) = m;
 265  // REF [] CHAR.
 266    M_REF_ROW_CHAR = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_ROW_CHAR, NO_PACK);
 267    NAME (M_REF_ROW_CHAR) = M_REF_CHAR;
 268  // PROC [] CHAR.
 269    M_PROC_ROW_CHAR = add_mode (&TOP_MOID (&A68_JOB), PROC_SYMBOL, 0, NO_NODE, M_ROW_CHAR, NO_PACK);
 270  // REF STRING = REF FLEX [] CHAR.
 271    M_REF_STRING = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, EQUIVALENT (M_STRING), NO_PACK);
 272    NAME (M_REF_STRING) = M_REF_CHAR;
 273    DEFLEXED (M_REF_STRING) = M_REF_ROW_CHAR;
 274  // [] STRING.
 275    M_ROW_STRING = add_mode (&TOP_MOID (&A68_JOB), ROW_SYMBOL, 1, NO_NODE, M_STRING, NO_PACK);
 276    HAS_ROWS (M_ROW_STRING) = A68_TRUE;
 277    SLICE (M_ROW_STRING) = M_STRING;
 278    DEFLEXED (M_ROW_STRING) = M_ROW_ROW_CHAR;
 279  // PROC STRING.
 280    M_PROC_STRING = add_mode (&TOP_MOID (&A68_JOB), PROC_SYMBOL, 0, NO_NODE, M_STRING, NO_PACK);
 281    DEFLEXED (M_PROC_STRING) = M_PROC_ROW_CHAR;
 282  // COMPLEX.
 283    PACK_T *z = NO_PACK;
 284    (void) add_mode_to_pack (&z, M_REAL, TEXT (add_token (&A68 (top_token), "im")), NO_NODE);
 285    (void) add_mode_to_pack (&z, M_REAL, TEXT (add_token (&A68 (top_token), "re")), NO_NODE);
 286    m = add_mode (&TOP_MOID (&A68_JOB), STRUCT_SYMBOL, count_pack_members (z), NO_NODE, NO_MOID, z);
 287    EQUIVALENT (M_COMPLEX) = EQUIVALENT (M_COMPL) = m;
 288    z = NO_PACK;
 289    (void) add_mode_to_pack (&z, M_REF_REAL, TEXT (add_token (&A68 (top_token), "im")), NO_NODE);
 290    (void) add_mode_to_pack (&z, M_REF_REAL, TEXT (add_token (&A68 (top_token), "re")), NO_NODE);
 291    m = add_mode (&TOP_MOID (&A68_JOB), STRUCT_SYMBOL, count_pack_members (z), NO_NODE, NO_MOID, z);
 292    NAME (M_REF_COMPLEX) = NAME (M_REF_COMPL) = m;
 293  // LONG COMPLEX.
 294    z = NO_PACK;
 295    (void) add_mode_to_pack (&z, M_LONG_REAL, TEXT (add_token (&A68 (top_token), "im")), NO_NODE);
 296    (void) add_mode_to_pack (&z, M_LONG_REAL, TEXT (add_token (&A68 (top_token), "re")), NO_NODE);
 297    m = add_mode (&TOP_MOID (&A68_JOB), STRUCT_SYMBOL, count_pack_members (z), NO_NODE, NO_MOID, z);
 298    EQUIVALENT (M_LONG_COMPLEX) = EQUIVALENT (M_LONG_COMPL) = m;
 299    z = NO_PACK;
 300    (void) add_mode_to_pack (&z, M_REF_LONG_REAL, TEXT (add_token (&A68 (top_token), "im")), NO_NODE);
 301    (void) add_mode_to_pack (&z, M_REF_LONG_REAL, TEXT (add_token (&A68 (top_token), "re")), NO_NODE);
 302    m = add_mode (&TOP_MOID (&A68_JOB), STRUCT_SYMBOL, count_pack_members (z), NO_NODE, NO_MOID, z);
 303    NAME (M_REF_LONG_COMPLEX) = NAME (M_REF_LONG_COMPL) = m;
 304  // LONG_LONG COMPLEX.
 305    z = NO_PACK;
 306    (void) add_mode_to_pack (&z, M_LONG_LONG_REAL, TEXT (add_token (&A68 (top_token), "im")), NO_NODE);
 307    (void) add_mode_to_pack (&z, M_LONG_LONG_REAL, TEXT (add_token (&A68 (top_token), "re")), NO_NODE);
 308    m = add_mode (&TOP_MOID (&A68_JOB), STRUCT_SYMBOL, count_pack_members (z), NO_NODE, NO_MOID, z);
 309    EQUIVALENT (M_LONG_LONG_COMPLEX) = EQUIVALENT (M_LONG_LONG_COMPL) = m;
 310    z = NO_PACK;
 311    (void) add_mode_to_pack (&z, M_REF_LONG_LONG_REAL, TEXT (add_token (&A68 (top_token), "im")), NO_NODE);
 312    (void) add_mode_to_pack (&z, M_REF_LONG_LONG_REAL, TEXT (add_token (&A68 (top_token), "re")), NO_NODE);
 313    m = add_mode (&TOP_MOID (&A68_JOB), STRUCT_SYMBOL, count_pack_members (z), NO_NODE, NO_MOID, z);
 314    NAME (M_REF_LONG_LONG_COMPLEX) = NAME (M_REF_LONG_LONG_COMPL) = m;
 315  // NUMBER.
 316    z = NO_PACK;
 317    (void) add_mode_to_pack (&z, M_INT, NO_TEXT, NO_NODE);
 318    (void) add_mode_to_pack (&z, M_LONG_INT, NO_TEXT, NO_NODE);
 319    (void) add_mode_to_pack (&z, M_LONG_LONG_INT, NO_TEXT, NO_NODE);
 320    (void) add_mode_to_pack (&z, M_REAL, NO_TEXT, NO_NODE);
 321    (void) add_mode_to_pack (&z, M_LONG_REAL, NO_TEXT, NO_NODE);
 322    (void) add_mode_to_pack (&z, M_LONG_LONG_REAL, NO_TEXT, NO_NODE);
 323    M_NUMBER = add_mode (&TOP_MOID (&A68_JOB), UNION_SYMBOL, count_pack_members (z), NO_NODE, NO_MOID, z);
 324  // HEX_NUMBER.
 325    z = NO_PACK;
 326    (void) add_mode_to_pack (&z, M_BOOL, NO_TEXT, NO_NODE);
 327    (void) add_mode_to_pack (&z, M_CHAR, NO_TEXT, NO_NODE);
 328    (void) add_mode_to_pack (&z, M_INT, NO_TEXT, NO_NODE);
 329    (void) add_mode_to_pack (&z, M_LONG_INT, NO_TEXT, NO_NODE);
 330    (void) add_mode_to_pack (&z, M_REAL, NO_TEXT, NO_NODE);
 331    (void) add_mode_to_pack (&z, M_LONG_REAL, NO_TEXT, NO_NODE);
 332    (void) add_mode_to_pack (&z, M_BITS, NO_TEXT, NO_NODE);
 333    (void) add_mode_to_pack (&z, M_LONG_BITS, NO_TEXT, NO_NODE);
 334    M_HEX_NUMBER = add_mode (&TOP_MOID (&A68_JOB), UNION_SYMBOL, count_pack_members (z), NO_NODE, NO_MOID, z);
 335  // SEMA.
 336    z = NO_PACK;
 337    (void) add_mode_to_pack (&z, M_REF_INT, NO_TEXT, NO_NODE);
 338    EQUIVALENT (M_SEMA) = add_mode (&TOP_MOID (&A68_JOB), STRUCT_SYMBOL, count_pack_members (z), NO_NODE, NO_MOID, z);
 339  // PROC VOID.
 340    z = NO_PACK;
 341    M_PROC_VOID = add_mode (&TOP_MOID (&A68_JOB), PROC_SYMBOL, count_pack_members (z), NO_NODE, M_VOID, z);
 342  // PROC (REAL) REAL.
 343    z = NO_PACK;
 344    (void) add_mode_to_pack (&z, M_REAL, NO_TEXT, NO_NODE);
 345    M_PROC_REAL_REAL = add_mode (&TOP_MOID (&A68_JOB), PROC_SYMBOL, count_pack_members (z), NO_NODE, M_REAL, z);
 346  // PROC (LONG_REAL) LONG_REAL.
 347    z = NO_PACK;
 348    (void) add_mode_to_pack (&z, M_LONG_REAL, NO_TEXT, NO_NODE);
 349    M_PROC_LONG_REAL_LONG_REAL = add_mode (&TOP_MOID (&A68_JOB), PROC_SYMBOL, count_pack_members (z), NO_NODE, M_LONG_REAL, z);
 350  // IO: PROC (REF FILE) BOOL.
 351    z = NO_PACK;
 352    (void) add_mode_to_pack (&z, M_REF_FILE, NO_TEXT, NO_NODE);
 353    M_PROC_REF_FILE_BOOL = add_mode (&TOP_MOID (&A68_JOB), PROC_SYMBOL, count_pack_members (z), NO_NODE, M_BOOL, z);
 354  // IO: PROC (REF FILE) VOID.
 355    z = NO_PACK;
 356    (void) add_mode_to_pack (&z, M_REF_FILE, NO_TEXT, NO_NODE);
 357    M_PROC_REF_FILE_VOID = add_mode (&TOP_MOID (&A68_JOB), PROC_SYMBOL, count_pack_members (z), NO_NODE, M_VOID, z);
 358  // IO: SIMPLIN and SIMPLOUT.
 359    M_SIMPLIN = add_mode (&TOP_MOID (&A68_JOB), IN_TYPE_MODE, 0, NO_NODE, NO_MOID, NO_PACK);
 360    M_ROW_SIMPLIN = add_mode (&TOP_MOID (&A68_JOB), ROW_SYMBOL, 1, NO_NODE, M_SIMPLIN, NO_PACK);
 361    SLICE (M_ROW_SIMPLIN) = M_SIMPLIN;
 362    M_SIMPLOUT = add_mode (&TOP_MOID (&A68_JOB), OUT_TYPE_MODE, 0, NO_NODE, NO_MOID, NO_PACK);
 363    M_ROW_SIMPLOUT = add_mode (&TOP_MOID (&A68_JOB), ROW_SYMBOL, 1, NO_NODE, M_SIMPLOUT, NO_PACK);
 364    SLICE (M_ROW_SIMPLOUT) = M_SIMPLOUT;
 365  // PIPE.
 366    z = NO_PACK;
 367    (void) add_mode_to_pack (&z, M_INT, TEXT (add_token (&A68 (top_token), "pid")), NO_NODE);
 368    (void) add_mode_to_pack (&z, M_REF_FILE, TEXT (add_token (&A68 (top_token), "write")), NO_NODE);
 369    (void) add_mode_to_pack (&z, M_REF_FILE, TEXT (add_token (&A68 (top_token), "read")), NO_NODE);
 370    EQUIVALENT (M_PIPE) = add_mode (&TOP_MOID (&A68_JOB), STRUCT_SYMBOL, count_pack_members (z), NO_NODE, NO_MOID, z);
 371    z = NO_PACK;
 372    (void) add_mode_to_pack (&z, M_REF_INT, TEXT (add_token (&A68 (top_token), "pid")), NO_NODE);
 373    (void) add_mode_to_pack (&z, M_REF_REF_FILE, TEXT (add_token (&A68 (top_token), "write")), NO_NODE);
 374    (void) add_mode_to_pack (&z, M_REF_REF_FILE, TEXT (add_token (&A68 (top_token), "read")), NO_NODE);
 375    NAME (M_REF_PIPE) = add_mode (&TOP_MOID (&A68_JOB), STRUCT_SYMBOL, count_pack_members (z), NO_NODE, NO_MOID, z);
 376  }
 377  
 378  //! @brief Set up standenv - general RR but not transput.
 379  
 380  void stand_prelude (void)
 381  {
 382  // Identifiers.
 383    a68_idf (A68_STD, "intlengths", M_INT, genie_int_lengths);
 384    a68_idf (A68_STD, "intshorths", M_INT, genie_int_shorths);
 385    a68_idf (A68_STD, "infinity", M_REAL, genie_infinity_real);
 386    a68_idf (A68_STD, "minusinfinity", M_REAL, genie_minus_infinity_real);
 387    a68_idf (A68_STD, "inf", M_REAL, genie_infinity_real);
 388    a68_idf (A68_STD, "mininf", M_REAL, genie_minus_infinity_real);
 389    a68_idf (A68_STD, "maxint", M_INT, genie_max_int);
 390    a68_idf (A68_STD, "mpradix", M_INT, genie_mp_radix);
 391    a68_idf (A68_STD, "maxreal", M_REAL, genie_max_real);
 392    a68_idf (A68_STD, "minreal", M_REAL, genie_min_real);
 393    a68_idf (A68_STD, "smallreal", M_REAL, genie_small_real);
 394    a68_idf (A68_STD, "reallengths", M_INT, genie_real_lengths);
 395    a68_idf (A68_STD, "realshorths", M_INT, genie_real_shorths);
 396    a68_idf (A68_STD, "compllengths", M_INT, genie_complex_lengths);
 397    a68_idf (A68_STD, "complshorths", M_INT, genie_complex_shorths);
 398    a68_idf (A68_STD, "bitslengths", M_INT, genie_bits_lengths);
 399    a68_idf (A68_STD, "bitsshorths", M_INT, genie_bits_shorths);
 400    a68_idf (A68_STD, "bitswidth", M_INT, genie_bits_width);
 401    a68_idf (A68_STD, "longbitswidth", M_INT, genie_long_bits_width);
 402    a68_idf (A68_STD, "maxbits", M_BITS, genie_max_bits);
 403    a68_idf (A68_STD, "byteslengths", M_INT, genie_bytes_lengths);
 404    a68_idf (A68_STD, "bytesshorths", M_INT, genie_bytes_shorths);
 405    a68_idf (A68_STD, "byteswidth", M_INT, genie_bytes_width);
 406    a68_idf (A68_STD, "maxabschar", M_INT, genie_max_abs_char);
 407    a68_idf (A68_STD, "pi", M_REAL, genie_pi);
 408    a68_id2 (A68_STD, "longlongpi", "qpi", M_LONG_LONG_REAL, genie_pi_mp);
 409    a68_idf (A68_STD, "intwidth", M_INT, genie_int_width);
 410    a68_idf (A68_STD, "realwidth", M_INT, genie_real_width);
 411    a68_idf (A68_STD, "expwidth", M_INT, genie_exp_width);
 412    a68_idf (A68_STD, "longintwidth", M_INT, genie_long_int_width);
 413    a68_idf (A68_STD, "longlongintwidth", M_INT, genie_long_mp_int_width);
 414    a68_idf (A68_STD, "longrealwidth", M_INT, genie_long_real_width);
 415    a68_idf (A68_STD, "longlongrealwidth", M_INT, genie_long_mp_real_width);
 416    a68_idf (A68_STD, "longexpwidth", M_INT, genie_long_exp_width);
 417    a68_idf (A68_STD, "longlongexpwidth", M_INT, genie_long_mp_exp_width);
 418    a68_idf (A68_STD, "longlongmaxint", M_LONG_LONG_INT, genie_long_mp_max_int);
 419    a68_idf (A68_STD, "longlongsmallreal", M_LONG_LONG_REAL, genie_long_mp_small_real);
 420    a68_idf (A68_STD, "longlongmaxreal", M_LONG_LONG_REAL, genie_long_mp_max_real);
 421    a68_idf (A68_STD, "longlongminreal", M_LONG_LONG_REAL, genie_long_mp_min_real);
 422    a68_idf (A68_STD, "longlonginfinity", M_LONG_LONG_REAL, genie_infinity_mp);
 423    a68_idf (A68_STD, "longlongminusinfinity", M_LONG_LONG_REAL, genie_minus_infinity_mp);
 424    a68_idf (A68_STD, "longlonginf", M_LONG_LONG_REAL, genie_infinity_mp);
 425    a68_idf (A68_STD, "longlongmininf", M_LONG_LONG_REAL, genie_minus_infinity_mp);
 426    a68_idf (A68_STD, "longbyteswidth", M_INT, genie_long_bytes_width);
 427    a68_idf (A68_EXT, "seconds", M_REAL, genie_cputime);
 428    a68_idf (A68_EXT, "clock", M_REAL, genie_cputime);
 429    a68_idf (A68_EXT, "cputime", M_REAL, genie_cputime);
 430    MOID_T *m = a68_proc (M_VOID, A68_MCACHE (proc_void), NO_MOID);
 431    a68_idf (A68_EXT, "blocks", A68_MCACHE (proc_int), genie_block);
 432    a68_idf (A68_EXT, "collections", A68_MCACHE (proc_int), genie_garbage_collections);
 433    a68_idf (A68_EXT, "collectseconds", A68_MCACHE (proc_real), genie_garbage_seconds);
 434    a68_idf (A68_EXT, "garbage", A68_MCACHE (proc_int), genie_garbage_freed);
 435    a68_idf (A68_EXT, "garbagecollections", A68_MCACHE (proc_int), genie_garbage_collections);
 436    a68_idf (A68_EXT, "garbagefreed", A68_MCACHE (proc_int), genie_garbage_freed);
 437    a68_idf (A68_EXT, "garbagerefused", A68_MCACHE (proc_int), genie_garbage_refused);
 438    a68_idf (A68_EXT, "garbageseconds", A68_MCACHE (proc_real), genie_garbage_seconds);
 439    a68_idf (A68_EXT, "ongcevent", m, genie_on_gc_event);
 440    a68_idf (A68_EXT, "sweeps", A68_MCACHE (proc_int), genie_garbage_collections);
 441    a68_idf (A68_EXT, "sweepsrefused", A68_MCACHE (proc_int), genie_garbage_refused);
 442    a68_idf (A68_EXT, "stackpointer", M_INT, genie_stack_pointer);
 443    a68_idf (A68_EXT, "systemstackpointer", M_INT, genie_system_stack_pointer);
 444    a68_idf (A68_EXT, "systemstacksize", M_INT, genie_system_stack_size);
 445    a68_idf (A68_EXT, "actualstacksize", M_INT, genie_stack_pointer);
 446    a68_idf (A68_EXT, "heappointer", M_INT, genie_system_heap_pointer);
 447    a68_idf (A68_EXT, "systemheappointer", M_INT, genie_system_heap_pointer);
 448    a68_idf (A68_EXT, "gcheap", A68_MCACHE (proc_void), genie_gc_heap);
 449    a68_idf (A68_EXT, "sweepheap", A68_MCACHE (proc_void), genie_gc_heap);
 450    a68_idf (A68_EXT, "preemptivegc", A68_MCACHE (proc_void), genie_preemptive_gc_heap);
 451    a68_idf (A68_EXT, "preemptivesweep", A68_MCACHE (proc_void), genie_preemptive_gc_heap);
 452    a68_idf (A68_EXT, "preemptivesweepheap", A68_MCACHE (proc_void), genie_preemptive_gc_heap);
 453    a68_idf (A68_EXT, "backtrace", A68_MCACHE (proc_void), genie_backtrace);
 454    a68_idf (A68_EXT, "break", A68_MCACHE (proc_void), genie_break);
 455    a68_idf (A68_EXT, "debug", A68_MCACHE (proc_void), genie_debug);
 456    a68_idf (A68_EXT, "monitor", A68_MCACHE (proc_void), genie_debug);
 457    m = a68_proc (M_VOID, M_STRING, NO_MOID);
 458    a68_idf (A68_EXT, "abend", m, genie_abend);
 459    m = a68_proc (M_STRING, M_STRING, NO_MOID);
 460    a68_idf (A68_EXT, "evaluate", m, genie_evaluate);
 461    m = a68_proc (M_INT, M_STRING, NO_MOID);
 462    a68_idf (A68_EXT, "system", m, genie_system);
 463    m = A68_MCACHE (proc_int_int);
 464    a68_idf (A68_EXT, "sleep", m, genie_sleep);
 465  // Machine environ parameters.
 466    a68_idf (A68_EXT, "i32mach", A68_MCACHE (proc_int_int), genie_i32mach);
 467    a68_idf (A68_EXT, "r64mach", A68_MCACHE (proc_int_real), genie_i32mach);
 468  #if (A68_LEVEL >= 3)
 469    m = a68_proc (M_LONG_INT, M_INT, NO_MOID);
 470    a68_idf (A68_EXT, "i64mach", m, genie_i64mach);
 471    m = a68_proc (M_LONG_REAL, M_INT, NO_MOID);
 472    a68_idf (A68_EXT, "r128mach", m, genie_r128mach);
 473  #endif
 474  // BITS procedures.
 475    m = a68_proc (M_BITS, M_ROW_BOOL, NO_MOID);
 476    a68_idf (A68_STD, "bitspack", m, genie_bits_pack);
 477  // RNG procedures.
 478    m = a68_proc (M_VOID, M_INT, NO_MOID);
 479    a68_idf (A68_STD, "firstrandom", m, genie_first_random);
 480    m = A68_MCACHE (proc_real);
 481    a68_idf (A68_STD, "nextrandom", m, genie_next_random);
 482    a68_idf (A68_STD, "random", m, genie_next_random);
 483    a68_idf (A68_STD, "rnd", m, genie_next_rnd);
 484    m = a68_proc (M_LONG_LONG_REAL, NO_MOID);
 485    a68_idf (A68_STD, "longlongnextrandom", m, genie_long_next_random);
 486    a68_idf (A68_STD, "longlongrandom", m, genie_long_next_random);
 487  // Priorities.
 488    a68_prio ("+:=", 1);
 489    a68_prio ("-:=", 1);
 490    a68_prio ("*:=", 1);
 491    a68_prio ("/:=", 1);
 492    a68_prio ("%:=", 1);
 493    a68_prio ("%*:=", 1);
 494    a68_prio ("+=:", 1);
 495    a68_prio ("PLUSAB", 1);
 496    a68_prio ("MINUSAB", 1);
 497    a68_prio ("TIMESAB", 1);
 498    a68_prio ("DIVAB", 1);
 499    a68_prio ("OVERAB", 1);
 500    a68_prio ("MODAB", 1);
 501    a68_prio ("PLUSTO", 1);
 502    a68_prio ("OR", 2);
 503    a68_prio ("AND", 3);
 504    a68_prio ("&", 3);
 505    a68_prio ("XOR", 3);
 506    a68_prio ("=", 4);
 507    a68_prio ("/=", 4);
 508    a68_prio ("~=", 4);
 509    a68_prio ("^=", 4);
 510    a68_prio ("<", 5);
 511    a68_prio ("<=", 5);
 512    a68_prio (">", 5);
 513    a68_prio (">=", 5);
 514    a68_prio ("EQ", 4);
 515    a68_prio ("NE", 4);
 516    a68_prio ("LT", 5);
 517    a68_prio ("LE", 5);
 518    a68_prio ("GT", 5);
 519    a68_prio ("GE", 5);
 520    a68_prio ("+", 6);
 521    a68_prio ("-", 6);
 522    a68_prio ("*", 7);
 523    a68_prio ("/", 7);
 524    a68_prio ("OVER", 7);
 525    a68_prio ("%", 7);
 526    a68_prio ("MOD", 7);
 527    a68_prio ("%*", 7);
 528    a68_prio ("ELEM", 7);
 529    a68_prio ("SET", 7);
 530    a68_prio ("CLEAR", 7);
 531    a68_prio ("**", 8);
 532    a68_prio ("SHL", 8);
 533    a68_prio ("SHR", 8);
 534    a68_prio ("ROL", 8);
 535    a68_prio ("ROR", 8);
 536    a68_prio ("UP", 8);
 537    a68_prio ("DOWN", 8);
 538    a68_prio ("^", 8);
 539    a68_prio ("ELEMS", 8);
 540    a68_prio ("LWB", 8);
 541    a68_prio ("UPB", 8);
 542    a68_prio ("SORT", 8);
 543    a68_prio ("I", 9);
 544    a68_prio ("+*", 9);
 545  // INT ops.
 546    m = a68_proc (M_INT, M_INT, NO_MOID);
 547    a68_op (A68_STD, "+", m, genie_idle);
 548    a68_op (A68_STD, "-", m, genie_minus_int);
 549    a68_op (A68_STD, "ABS", m, genie_abs_int);
 550    a68_op (A68_STD, "SIGN", m, genie_sign_int);
 551    m = a68_proc (M_BOOL, M_INT, NO_MOID);
 552    a68_op (A68_STD, "ODD", m, genie_odd_int);
 553    m = a68_proc (M_BOOL, M_INT, M_INT, NO_MOID);
 554    a68_op (A68_STD, "=", m, genie_eq_int);
 555    a68_op (A68_STD, "/=", m, genie_ne_int);
 556    a68_op (A68_STD, "~=", m, genie_ne_int);
 557    a68_op (A68_STD, "^=", m, genie_ne_int);
 558    a68_op (A68_STD, "<", m, genie_lt_int);
 559    a68_op (A68_STD, "<=", m, genie_le_int);
 560    a68_op (A68_STD, ">", m, genie_gt_int);
 561    a68_op (A68_STD, ">=", m, genie_ge_int);
 562    a68_op (A68_STD, "EQ", m, genie_eq_int);
 563    a68_op (A68_STD, "NE", m, genie_ne_int);
 564    a68_op (A68_STD, "LT", m, genie_lt_int);
 565    a68_op (A68_STD, "LE", m, genie_le_int);
 566    a68_op (A68_STD, "GT", m, genie_gt_int);
 567    a68_op (A68_STD, "GE", m, genie_ge_int);
 568    m = a68_proc (M_INT, M_INT, M_INT, NO_MOID);
 569    a68_op (A68_STD, "+", m, genie_add_int);
 570    a68_op (A68_STD, "-", m, genie_sub_int);
 571    a68_op (A68_STD, "*", m, genie_mul_int);
 572    a68_op (A68_STD, "OVER", m, genie_over_int);
 573    a68_op (A68_STD, "%", m, genie_over_int);
 574    a68_op (A68_STD, "MOD", m, genie_mod_int);
 575    a68_op (A68_STD, "%*", m, genie_mod_int);
 576    a68_op (A68_STD, "**", m, genie_pow_int);
 577    a68_op (A68_STD, "UP", m, genie_pow_int);
 578    a68_op (A68_STD, "^", m, genie_pow_int);
 579    m = a68_proc (M_REAL, M_INT, M_INT, NO_MOID);
 580    a68_op (A68_STD, "/", m, genie_div_int);
 581    m = a68_proc (M_REF_INT, M_REF_INT, M_INT, NO_MOID);
 582    a68_op (A68_STD, "+:=", m, genie_plusab_int);
 583    a68_op (A68_STD, "-:=", m, genie_minusab_int);
 584    a68_op (A68_STD, "*:=", m, genie_timesab_int);
 585    a68_op (A68_STD, "%:=", m, genie_overab_int);
 586    a68_op (A68_STD, "%*:=", m, genie_modab_int);
 587    a68_op (A68_STD, "PLUSAB", m, genie_plusab_int);
 588    a68_op (A68_STD, "MINUSAB", m, genie_minusab_int);
 589    a68_op (A68_STD, "TIMESAB", m, genie_timesab_int);
 590    a68_op (A68_STD, "OVERAB", m, genie_overab_int);
 591    a68_op (A68_STD, "MODAB", m, genie_modab_int);
 592  // REAL ops.
 593    m = A68_MCACHE (proc_real_real);
 594    a68_op (A68_STD, "+", m, genie_idle);
 595    a68_op (A68_STD, "-", m, genie_minus_real);
 596    a68_op (A68_STD, "ABS", m, genie_abs_real);
 597    m = a68_proc (M_INT, M_REAL, NO_MOID);
 598    a68_op (A68_STD, "SIGN", m, genie_sign_real);
 599    a68_op (A68_STD, "ROUND", m, genie_round_real);
 600    a68_op (A68_STD, "ENTIER", m, genie_entier_real);
 601    m = a68_proc (M_BOOL, M_REAL, M_REAL, NO_MOID);
 602    a68_op (A68_STD, "=", m, genie_eq_real);
 603    a68_op (A68_STD, "/=", m, genie_ne_real);
 604    a68_op (A68_STD, "~=", m, genie_ne_real);
 605    a68_op (A68_STD, "^=", m, genie_ne_real);
 606    a68_op (A68_STD, "<", m, genie_lt_real);
 607    a68_op (A68_STD, "<=", m, genie_le_real);
 608    a68_op (A68_STD, ">", m, genie_gt_real);
 609    a68_op (A68_STD, ">=", m, genie_ge_real);
 610    a68_op (A68_STD, "EQ", m, genie_eq_real);
 611    a68_op (A68_STD, "NE", m, genie_ne_real);
 612    a68_op (A68_STD, "LT", m, genie_lt_real);
 613    a68_op (A68_STD, "LE", m, genie_le_real);
 614    a68_op (A68_STD, "GT", m, genie_gt_real);
 615    a68_op (A68_STD, "GE", m, genie_ge_real);
 616    m = A68_MCACHE (proc_real_real_real);
 617    a68_op (A68_STD, "+", m, genie_add_real);
 618    a68_op (A68_STD, "-", m, genie_sub_real);
 619    a68_op (A68_STD, "*", m, genie_mul_real);
 620    a68_op (A68_STD, "/", m, genie_div_real);
 621    a68_op (A68_STD, "**", m, genie_pow_real);
 622    a68_op (A68_STD, "UP", m, genie_pow_real);
 623    a68_op (A68_STD, "^", m, genie_pow_real);
 624    m = a68_proc (M_REAL, M_REAL, M_INT, NO_MOID);
 625    a68_op (A68_STD, "**", m, genie_pow_real_int);
 626    a68_op (A68_STD, "UP", m, genie_pow_real_int);
 627    a68_op (A68_STD, "^", m, genie_pow_real_int);
 628    m = a68_proc (M_REF_REAL, M_REF_REAL, M_REAL, NO_MOID);
 629    a68_op (A68_STD, "+:=", m, genie_plusab_real);
 630    a68_op (A68_STD, "-:=", m, genie_minusab_real);
 631    a68_op (A68_STD, "*:=", m, genie_timesab_real);
 632    a68_op (A68_STD, "/:=", m, genie_divab_real);
 633    a68_op (A68_STD, "PLUSAB", m, genie_plusab_real);
 634    a68_op (A68_STD, "MINUSAB", m, genie_minusab_real);
 635    a68_op (A68_STD, "TIMESAB", m, genie_timesab_real);
 636    a68_op (A68_STD, "DIVAB", m, genie_divab_real);
 637  // Procedures
 638    m = A68_MCACHE (proc_real_real);
 639    a68_id2 (A68_EXT, "arccosdg", "acosdg", m, genie_acosdg_real);
 640    a68_id2 (A68_EXT, "arccosh", "acosh", m, genie_acosh_real);
 641    a68_id2 (A68_EXT, "arccot", "acot", m, genie_acot_real);
 642    a68_id2 (A68_EXT, "arccotdg", "acotdg", m, genie_acotdg_real);
 643    a68_id2 (A68_EXT, "arccsc", "acsc", m, genie_acsc_real);
 644    a68_id2 (A68_EXT, "arccscdg", "acscdg", m, genie_acscdg_real);
 645    a68_id2 (A68_EXT, "arcsec", "asec", m, genie_asec_real);
 646    a68_id2 (A68_EXT, "arcsecdg", "asecdg", m, genie_asecdg_real);
 647    a68_id2 (A68_EXT, "arcsindg", "asindg", m, genie_asindg_real);
 648    a68_id2 (A68_EXT, "arcsinh", "asinh", m, genie_asinh_real);
 649    a68_id2 (A68_EXT, "arctandg", "atandg", m, genie_atandg_real);
 650    a68_id2 (A68_EXT, "arctanh", "atanh", m, genie_atanh_real);
 651    a68_id2 (A68_STD, "arccos", "acos", m, genie_acos_real);
 652    a68_id2 (A68_STD, "arcsin", "asin", m, genie_asin_real);
 653    a68_id2 (A68_STD, "arctan", "atan", m, genie_atan_real);
 654    a68_idf (A68_EXT, "cas", m, genie_cas_real);
 655    a68_idf (A68_EXT, "cbrt", m, genie_curt_real);
 656    a68_idf (A68_EXT, "cosdg", m, genie_cosdg_real);
 657    a68_idf (A68_EXT, "cosh", m, genie_cosh_real);
 658    a68_idf (A68_EXT, "cospi", m, genie_cospi_real);
 659    a68_idf (A68_EXT, "cotdg", m, genie_cotdg_real);
 660    a68_idf (A68_EXT, "cot", m, genie_cot_real);
 661    a68_idf (A68_EXT, "cotpi", m, genie_cotpi_real);
 662    a68_idf (A68_EXT, "cscdg", m, genie_cscdg_real);
 663    a68_idf (A68_EXT, "csc", m, genie_csc_real);
 664    a68_idf (A68_EXT, "curt", m, genie_curt_real);
 665    a68_idf (A68_EXT, "erfc", m, genie_erfc_real);
 666    a68_idf (A68_EXT, "erf", m, genie_erf_real);
 667    a68_idf (A68_EXT, "gamma", m, genie_gamma_real);
 668    a68_idf (A68_EXT, "inverfc", m, genie_inverfc_real);
 669    a68_idf (A68_EXT, "inverf", m, genie_inverf_real);
 670    a68_idf (A68_EXT, "inverseerfc", m, genie_inverfc_real);
 671    a68_idf (A68_EXT, "inverseerf", m, genie_inverf_real);
 672    a68_idf (A68_EXT, "ln1p", m, genie_ln1p_real);
 673    a68_idf (A68_EXT, "lngamma", m, genie_ln_gamma_real);
 674    a68_idf (A68_EXT, "secdg", m, genie_secdg_real);
 675    a68_idf (A68_EXT, "sec", m, genie_sec_real);
 676    a68_idf (A68_EXT, "sindg", m, genie_sindg_real);
 677    a68_idf (A68_EXT, "sinh", m, genie_sinh_real);
 678    a68_idf (A68_EXT, "sinpi", m, genie_sinpi_real);
 679    a68_idf (A68_EXT, "tandg", m, genie_tandg_real);
 680    a68_idf (A68_EXT, "tanh", m, genie_tanh_real);
 681    a68_idf (A68_EXT, "tanpi", m, genie_tanpi_real);
 682    a68_idf (A68_STD, "cos", m, genie_cos_real);
 683    a68_idf (A68_STD, "exp", m, genie_exp_real);
 684    a68_idf (A68_STD, "ln", m, genie_ln_real);
 685    a68_idf (A68_STD, "log", m, genie_log_real);
 686    a68_idf (A68_STD, "sin", m, genie_sin_real);
 687    a68_idf (A68_STD, "sqrt", m, genie_sqrt_real);
 688    a68_idf (A68_STD, "tan", m, genie_tan_real);
 689  // Miscellaneous.
 690    a68_id2 (A68_EXT, "arctan2", "atan2", A68_MCACHE (proc_real_real_real), genie_atan2_real);
 691    a68_id2 (A68_EXT, "arctan2dg", "atan2dg", A68_MCACHE (proc_real_real_real), genie_atan2dg_real);
 692    a68_idf (A68_EXT, "beta", A68_MCACHE (proc_real_real_real), genie_beta_real);
 693    a68_idf (A68_EXT, "betainc", A68_MCACHE (proc_real_real_real_real), genie_beta_inc_cf_real);
 694    a68_idf (A68_EXT, "choose", A68_MCACHE (proc_int_int_real), genie_choose_real);
 695    a68_idf (A68_EXT, "fact", A68_MCACHE (proc_int_real), genie_fact_real);
 696    a68_idf (A68_EXT, "gammainc", A68_MCACHE (proc_real_real_real), genie_gamma_inc_h_real);
 697    a68_idf (A68_EXT, "gammaincf", A68_MCACHE (proc_real_real_real), genie_gamma_inc_f_real);
 698    a68_idf (A68_EXT, "gammaincg", A68_MCACHE (proc_real_real_real_real_real), genie_gamma_inc_g_real);
 699    a68_idf (A68_EXT, "gammaincgf", A68_MCACHE (proc_real_real_real), genie_gamma_inc_gf_real);
 700    a68_idf (A68_EXT, "lje126", A68_MCACHE (proc_real_real_real_real), genie_lj_e_12_6);
 701    a68_idf (A68_EXT, "ljf126", A68_MCACHE (proc_real_real_real_real), genie_lj_f_12_6);
 702    a68_idf (A68_EXT, "lnbeta", A68_MCACHE (proc_real_real_real), genie_ln_beta_real);
 703    a68_idf (A68_EXT, "lnchoose", A68_MCACHE (proc_int_int_real), genie_ln_choose_real);
 704    a68_idf (A68_EXT, "lnfact", A68_MCACHE (proc_int_real), genie_ln_fact_real);
 705  // COMPLEX ops.
 706    m = a68_proc (M_COMPLEX, M_REAL, M_REAL, NO_MOID);
 707    a68_op (A68_STD, "I", m, genie_i_complex);
 708    a68_op (A68_STD, "+*", m, genie_i_complex);
 709    m = a68_proc (M_COMPLEX, M_INT, M_INT, NO_MOID);
 710    a68_op (A68_STD, "I", m, genie_i_int_complex);
 711    a68_op (A68_STD, "+*", m, genie_i_int_complex);
 712    m = a68_proc (M_REAL, M_COMPLEX, NO_MOID);
 713    a68_op (A68_STD, "RE", m, genie_re_complex);
 714    a68_op (A68_STD, "IM", m, genie_im_complex);
 715    a68_op (A68_STD, "ABS", m, genie_abs_complex);
 716    a68_op (A68_STD, "ARG", m, genie_arg_complex);
 717    m = A68_MCACHE (proc_complex_complex);
 718    a68_op (A68_STD, "+", m, genie_idle);
 719    a68_op (A68_STD, "-", m, genie_minus_complex);
 720    a68_op (A68_STD, "CONJ", m, genie_conj_complex);
 721    m = a68_proc (M_BOOL, M_COMPLEX, M_COMPLEX, NO_MOID);
 722    a68_op (A68_STD, "=", m, genie_eq_complex);
 723    a68_op (A68_STD, "/=", m, genie_ne_complex);
 724    a68_op (A68_STD, "~=", m, genie_ne_complex);
 725    a68_op (A68_STD, "^=", m, genie_ne_complex);
 726    a68_op (A68_STD, "EQ", m, genie_eq_complex);
 727    a68_op (A68_STD, "NE", m, genie_ne_complex);
 728    m = a68_proc (M_COMPLEX, M_COMPLEX, M_COMPLEX, NO_MOID);
 729    a68_op (A68_STD, "+", m, genie_add_complex);
 730    a68_op (A68_STD, "-", m, genie_sub_complex);
 731    a68_op (A68_STD, "*", m, genie_mul_complex);
 732    a68_op (A68_STD, "/", m, genie_div_complex);
 733    m = a68_proc (M_COMPLEX, M_COMPLEX, M_INT, NO_MOID);
 734    a68_op (A68_STD, "**", m, genie_pow_complex_int);
 735    a68_op (A68_STD, "UP", m, genie_pow_complex_int);
 736    a68_op (A68_STD, "^", m, genie_pow_complex_int);
 737    m = a68_proc (M_REF_COMPLEX, M_REF_COMPLEX, M_COMPLEX, NO_MOID);
 738    a68_op (A68_STD, "+:=", m, genie_plusab_complex);
 739    a68_op (A68_STD, "-:=", m, genie_minusab_complex);
 740    a68_op (A68_STD, "*:=", m, genie_timesab_complex);
 741    a68_op (A68_STD, "/:=", m, genie_divab_complex);
 742    a68_op (A68_STD, "PLUSAB", m, genie_plusab_complex);
 743    a68_op (A68_STD, "MINUSAB", m, genie_minusab_complex);
 744    a68_op (A68_STD, "TIMESAB", m, genie_timesab_complex);
 745    a68_op (A68_STD, "DIVAB", m, genie_divab_complex);
 746    m = A68_MCACHE (proc_complex_complex);
 747    a68_id2 (A68_EXT, "complexarccosh", "cacosh", m, genie_acosh_complex);
 748    a68_id2 (A68_EXT, "complexarccos", "cacos", m, genie_acos_complex);
 749    a68_id2 (A68_EXT, "complexarcsinh", "casinh", m, genie_asinh_complex);
 750    a68_id2 (A68_EXT, "complexarcsin", "casin", m, genie_asin_complex);
 751    a68_id2 (A68_EXT, "complexarctanh", "catanh", m, genie_atanh_complex);
 752    a68_id2 (A68_EXT, "complexarctan", "catan", m, genie_atan_complex);
 753    a68_id2 (A68_EXT, "complexcosh", "ccosh", m, genie_cosh_complex);
 754    a68_id2 (A68_EXT, "complexcos", "ccos", m, genie_cos_complex);
 755    a68_id2 (A68_EXT, "complexexp", "cexp", m, genie_exp_complex);
 756    a68_id2 (A68_EXT, "complexln", "cln", m, genie_ln_complex);
 757    a68_id2 (A68_EXT, "complexsinh", "csinh", m, genie_sinh_complex);
 758    a68_id2 (A68_EXT, "complexsin", "csin", m, genie_sin_complex);
 759    a68_id2 (A68_EXT, "complexsqrt", "csqrt", m, genie_sqrt_complex);
 760    a68_id2 (A68_EXT, "complextanh", "ctanh", m, genie_tanh_complex);
 761    a68_id2 (A68_EXT, "complextan", "ctan", m, genie_tan_complex);
 762  // BOOL ops.
 763    m = a68_proc (M_BOOL, M_BOOL, NO_MOID);
 764    a68_op (A68_STD, "NOT", m, genie_not_bool);
 765    a68_op (A68_STD, "~", m, genie_not_bool);
 766    m = a68_proc (M_INT, M_BOOL, NO_MOID);
 767    a68_op (A68_STD, "ABS", m, genie_abs_bool);
 768    m = a68_proc (M_BOOL, M_BOOL, M_BOOL, NO_MOID);
 769    a68_op (A68_STD, "OR", m, genie_or_bool);
 770    a68_op (A68_STD, "AND", m, genie_and_bool);
 771    a68_op (A68_STD, "&", m, genie_and_bool);
 772    a68_op (A68_EXT, "XOR", m, genie_xor_bool);
 773    a68_op (A68_STD, "=", m, genie_eq_bool);
 774    a68_op (A68_STD, "/=", m, genie_ne_bool);
 775    a68_op (A68_STD, "~=", m, genie_ne_bool);
 776    a68_op (A68_STD, "^=", m, genie_ne_bool);
 777    a68_op (A68_STD, "EQ", m, genie_eq_bool);
 778    a68_op (A68_STD, "NE", m, genie_ne_bool);
 779  // CHAR ops.
 780    m = a68_proc (M_BOOL, M_CHAR, M_CHAR, NO_MOID);
 781    a68_op (A68_STD, "=", m, genie_eq_char);
 782    a68_op (A68_STD, "/=", m, genie_ne_char);
 783    a68_op (A68_STD, "~=", m, genie_ne_char);
 784    a68_op (A68_STD, "^=", m, genie_ne_char);
 785    a68_op (A68_STD, "<", m, genie_lt_char);
 786    a68_op (A68_STD, "<=", m, genie_le_char);
 787    a68_op (A68_STD, ">", m, genie_gt_char);
 788    a68_op (A68_STD, ">=", m, genie_ge_char);
 789    a68_op (A68_STD, "EQ", m, genie_eq_char);
 790    a68_op (A68_STD, "NE", m, genie_ne_char);
 791    a68_op (A68_STD, "LT", m, genie_lt_char);
 792    a68_op (A68_STD, "LE", m, genie_le_char);
 793    a68_op (A68_STD, "GT", m, genie_gt_char);
 794    a68_op (A68_STD, "GE", m, genie_ge_char);
 795    m = a68_proc (M_INT, M_CHAR, NO_MOID);
 796    a68_op (A68_STD, "ABS", m, genie_abs_char);
 797    m = a68_proc (M_CHAR, M_INT, NO_MOID);
 798    a68_op (A68_STD, "REPR", m, genie_repr_char);
 799    m = a68_proc (M_BOOL, M_CHAR, NO_MOID);
 800    a68_idf (A68_EXT, "isalnum", m, genie_is_alnum);
 801    a68_idf (A68_EXT, "isalpha", m, genie_is_alpha);
 802    a68_idf (A68_EXT, "iscntrl", m, genie_is_cntrl);
 803    a68_idf (A68_EXT, "isdigit", m, genie_is_digit);
 804    a68_idf (A68_EXT, "isgraph", m, genie_is_graph);
 805    a68_idf (A68_EXT, "islower", m, genie_is_lower);
 806    a68_idf (A68_EXT, "isprint", m, genie_is_print);
 807    a68_idf (A68_EXT, "ispunct", m, genie_is_punct);
 808    a68_idf (A68_EXT, "isspace", m, genie_is_space);
 809    a68_idf (A68_EXT, "isupper", m, genie_is_upper);
 810    a68_idf (A68_EXT, "isxdigit", m, genie_is_xdigit);
 811    m = a68_proc (M_CHAR, M_CHAR, NO_MOID);
 812    a68_idf (A68_EXT, "tolower", m, genie_to_lower);
 813    a68_idf (A68_EXT, "toupper", m, genie_to_upper);
 814  // BITS ops.
 815    m = a68_proc (M_INT, M_BITS, NO_MOID);
 816    a68_op (A68_STD, "ABS", m, genie_abs_bits);
 817    m = a68_proc (M_BITS, M_INT, NO_MOID);
 818    a68_op (A68_STD, "BIN", m, genie_bin_int);
 819    m = a68_proc (M_BITS, M_BITS, NO_MOID);
 820    a68_op (A68_STD, "NOT", m, genie_not_bits);
 821    a68_op (A68_STD, "~", m, genie_not_bits);
 822    m = a68_proc (M_BOOL, M_BITS, M_BITS, NO_MOID);
 823    a68_op (A68_STD, "=", m, genie_eq_bits);
 824    a68_op (A68_STD, "/=", m, genie_ne_bits);
 825    a68_op (A68_STD, "~=", m, genie_ne_bits);
 826    a68_op (A68_STD, "^=", m, genie_ne_bits);
 827    a68_op (A68_STD, "<=", m, genie_le_bits);
 828    a68_op (A68_STD, ">=", m, genie_ge_bits);
 829    a68_op (A68_STD, "EQ", m, genie_eq_bits);
 830    a68_op (A68_STD, "NE", m, genie_ne_bits);
 831    a68_op (A68_STD, "LE", m, genie_le_bits);
 832    a68_op (A68_STD, "GE", m, genie_ge_bits);
 833  #if (A68_LEVEL >= 3)
 834    a68_op (A68_EXT, "<", m, genie_lt_bits);
 835    a68_op (A68_EXT, ">", m, genie_gt_bits);
 836    a68_op (A68_EXT, "LT", m, genie_lt_bits);
 837    a68_op (A68_EXT, "GT", m, genie_gt_bits);
 838  #endif
 839    m = a68_proc (M_BITS, M_BITS, M_BITS, NO_MOID);
 840    a68_op (A68_STD, "AND", m, genie_and_bits);
 841    a68_op (A68_STD, "&", m, genie_and_bits);
 842    a68_op (A68_STD, "OR", m, genie_or_bits);
 843    a68_op (A68_EXT, "XOR", m, genie_xor_bits);
 844    a68_op (A68_EXT, "+", m, genie_add_bits);
 845    a68_op (A68_EXT, "-", m, genie_sub_bits);
 846    a68_op (A68_EXT, "*", m, genie_times_bits);
 847    a68_op (A68_EXT, "OVER", m, genie_over_bits);
 848    a68_op (A68_EXT, "MOD", m, genie_over_bits);
 849    m = a68_proc (M_BITS, M_BITS, M_INT, NO_MOID);
 850    a68_op (A68_STD, "SHL", m, genie_shl_bits);
 851    a68_op (A68_STD, "UP", m, genie_shl_bits);
 852    a68_op (A68_STD, "SHR", m, genie_shr_bits);
 853    a68_op (A68_STD, "DOWN", m, genie_shr_bits);
 854    a68_op (A68_EXT, "ROL", m, genie_rol_bits);
 855    a68_op (A68_EXT, "ROR", m, genie_ror_bits);
 856    m = a68_proc (M_BOOL, M_INT, M_BITS, NO_MOID);
 857    a68_op (A68_STD, "ELEM", m, genie_elem_bits);
 858    m = a68_proc (M_BITS, M_INT, M_BITS, NO_MOID);
 859    a68_op (A68_STD, "SET", m, genie_set_bits);
 860    a68_op (A68_STD, "CLEAR", m, genie_clear_bits);
 861  // LONG LONG INT in software
 862    m = a68_proc (M_LONG_LONG_INT, M_LONG_LONG_INT, NO_MOID);
 863    a68_op (A68_STD, "+", m, genie_idle);
 864    a68_op (A68_STD, "-", m, genie_minus_mp);
 865    a68_op (A68_STD, "ABS", m, genie_abs_mp);
 866    m = a68_proc (M_INT, M_LONG_LONG_INT, NO_MOID);
 867    a68_op (A68_STD, "SIGN", m, genie_sign_mp);
 868    m = a68_proc (M_BOOL, M_LONG_LONG_INT, NO_MOID);
 869    a68_op (A68_STD, "ODD", m, genie_odd_mp);
 870    m = a68_proc (M_LONG_LONG_INT, M_LONG_LONG_REAL, NO_MOID);
 871    a68_op (A68_STD, "ENTIER", m, genie_entier_mp);
 872    a68_op (A68_STD, "ROUND", m, genie_round_mp);
 873    m = a68_proc (M_LONG_LONG_INT, M_LONG_LONG_INT, M_LONG_LONG_INT, NO_MOID);
 874    a68_op (A68_STD, "+", m, genie_add_mp_int);
 875    a68_op (A68_STD, "-", m, genie_sub_mp_int);
 876    a68_op (A68_STD, "*", m, genie_mul_mp_int);
 877    a68_op (A68_STD, "OVER", m, genie_over_mp);
 878    a68_op (A68_STD, "%", m, genie_over_mp);
 879    a68_op (A68_STD, "MOD", m, genie_mod_mp);
 880    a68_op (A68_STD, "%*", m, genie_mod_mp);
 881    m = a68_proc (M_REF_LONG_LONG_INT, M_REF_LONG_LONG_INT, M_LONG_LONG_INT, NO_MOID);
 882    a68_op (A68_STD, "+:=", m, genie_plusab_mp_int);
 883    a68_op (A68_STD, "-:=", m, genie_minusab_mp_int);
 884    a68_op (A68_STD, "*:=", m, genie_timesab_mp_int);
 885    a68_op (A68_STD, "%:=", m, genie_overab_mp);
 886    a68_op (A68_STD, "%*:=", m, genie_modab_mp);
 887    a68_op (A68_STD, "PLUSAB", m, genie_plusab_mp_int);
 888    a68_op (A68_STD, "MINUSAB", m, genie_minusab_mp_int);
 889    a68_op (A68_STD, "TIMESAB", m, genie_timesab_mp_int);
 890    a68_op (A68_STD, "OVERAB", m, genie_overab_mp);
 891    a68_op (A68_STD, "MODAB", m, genie_modab_mp);
 892    m = a68_proc (M_LONG_LONG_REAL, M_LONG_LONG_INT, M_LONG_LONG_INT, NO_MOID);
 893    a68_op (A68_STD, "/", m, genie_div_mp);
 894    m = a68_proc (M_BOOL, M_LONG_LONG_INT, M_LONG_LONG_INT, NO_MOID);
 895    a68_op (A68_STD, "EQ", m, genie_eq_mp);
 896    a68_op (A68_STD, "NE", m, genie_ne_mp);
 897    a68_op (A68_STD, "GE", m, genie_ge_mp);
 898    a68_op (A68_STD, "GT", m, genie_gt_mp);
 899    a68_op (A68_STD, "LE", m, genie_le_mp);
 900    a68_op (A68_STD, "LT", m, genie_lt_mp);
 901    a68_op (A68_STD, "=", m, genie_eq_mp);
 902    a68_op (A68_STD, ">=", m, genie_ge_mp);
 903    a68_op (A68_STD, ">", m, genie_gt_mp);
 904    a68_op (A68_STD, "<=", m, genie_le_mp);
 905    a68_op (A68_STD, "<", m, genie_lt_mp);
 906    a68_op (A68_STD, "/=", m, genie_ne_mp);
 907    a68_op (A68_STD, "^=", m, genie_ne_mp);
 908    a68_op (A68_STD, "~=", m, genie_ne_mp);
 909    m = a68_proc (M_LONG_LONG_INT, M_LONG_LONG_INT, M_INT, NO_MOID);
 910    a68_op (A68_STD, "**", m, genie_pow_mp_int_int);
 911    a68_op (A68_STD, "^", m, genie_pow_mp_int_int);
 912    m = a68_proc (M_LONG_LONG_COMPLEX, M_LONG_LONG_INT, M_LONG_LONG_INT, NO_MOID);
 913    a68_op (A68_STD, "I", m, genie_idle);
 914    a68_op (A68_STD, "+*", m, genie_idle);
 915  // LONG LONG REAL in software
 916    m = a68_proc (M_LONG_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
 917    a68_op (A68_STD, "ABS", m, genie_abs_mp);
 918    a68_op (A68_STD, "+", m, genie_idle);
 919    a68_op (A68_STD, "-", m, genie_minus_mp);
 920    m = a68_proc (M_INT, M_LONG_LONG_REAL, NO_MOID);
 921    a68_op (A68_STD, "SIGN", m, genie_sign_mp);
 922    m = a68_proc (M_LONG_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
 923    a68_id2 (A68_EXT, "longlongarccosdg", "qacosdg", m, genie_acosdg_mp);
 924    a68_id2 (A68_EXT, "longlongarccosh", "qacosh", m, genie_acosh_mp);
 925    a68_id2 (A68_EXT, "longlongarccotdg", "qacotdg", m, genie_acotdg_mp);
 926    a68_id2 (A68_EXT, "longlongarccot", "qacot", m, genie_acot_mp);
 927    a68_id2 (A68_EXT, "longlongarccscdg", "qacscdg", m, genie_acscdg_mp);
 928    a68_id2 (A68_EXT, "longlongarccsc", "qacsc", m, genie_acsc_mp);
 929    a68_id2 (A68_EXT, "longlongarcsecdg", "qasecdg", m, genie_asecdg_mp);
 930    a68_id2 (A68_EXT, "longlongarcsec", "qasec", m, genie_asec_mp);
 931    a68_id2 (A68_EXT, "longlongarcsindg", "qasindg", m, genie_asindg_mp);
 932    a68_id2 (A68_EXT, "longlongarcsinh", "qasinh", m, genie_asinh_mp);
 933    a68_id2 (A68_EXT, "longlongarctandg", "qatandg", m, genie_atandg_mp);
 934    a68_id2 (A68_EXT, "longlongarctanh", "qatanh", m, genie_atanh_mp);
 935    a68_id2 (A68_EXT, "longlongcas", "qcas", m, genie_cas_mp);
 936    a68_id2 (A68_EXT, "longlongcbrt", "qcbrt", m, genie_curt_mp);
 937    a68_id2 (A68_EXT, "longlongcosdg", "qcosdg", m, genie_cosdg_mp);
 938    a68_id2 (A68_EXT, "longlongcosh", "qcosh", m, genie_cosh_mp);
 939    a68_id2 (A68_EXT, "longlongcospi", "qcospi", m, genie_cospi_mp);
 940    a68_id2 (A68_EXT, "longlongcotdg", "qcotdg", m, genie_cotdg_mp);
 941    a68_id2 (A68_EXT, "longlongcotpi", "qcotpi", m, genie_cotpi_mp);
 942    a68_id2 (A68_EXT, "longlongcot", "qcot", m, genie_cot_mp);
 943    a68_id2 (A68_EXT, "longlongcscdg", "qcscdg", m, genie_cscdg_mp);
 944    a68_id2 (A68_EXT, "longlongcsc", "qcsc", m, genie_csc_mp);
 945    a68_id2 (A68_EXT, "longlongcurt", "qcurt", m, genie_curt_mp);
 946    a68_id2 (A68_EXT, "longlongerfc", "qerfc", m, genie_erfc_mp);
 947    a68_id2 (A68_EXT, "longlongerf", "qerf", m, genie_erf_mp);
 948    a68_id2 (A68_EXT, "longlonggamma", "qgamma", m, genie_gamma_mp);
 949    a68_id2 (A68_EXT, "longlonginverfc", "qinverfc", m, genie_inverfc_mp);
 950    a68_id2 (A68_EXT, "longlonginverf", "qinverf", m, genie_inverf_mp);
 951    a68_id2 (A68_EXT, "longlonglngamma", "qlngamma", m, genie_lngamma_mp);
 952    a68_id2 (A68_EXT, "longlongsecdg", "qsecdg", m, genie_secdg_mp);
 953    a68_id2 (A68_EXT, "longlongsec", "qsec", m, genie_sec_mp);
 954    a68_id2 (A68_EXT, "longlongsindg", "qsindg", m, genie_sindg_mp);
 955    a68_id2 (A68_EXT, "longlongsinh", "qsinh", m, genie_sinh_mp);
 956    a68_id2 (A68_EXT, "longlongsinpi", "qsinpi", m, genie_sinpi_mp);
 957    a68_id2 (A68_EXT, "longlongtandg", "qtandg", m, genie_tandg_mp);
 958    a68_id2 (A68_EXT, "longlongtanh", "qtanh", m, genie_tanh_mp);
 959    a68_id2 (A68_EXT, "longlongtanpi", "qtanpi", m, genie_tanpi_mp);
 960    a68_id2 (A68_STD, "longlongarccos", "qacos", m, genie_acos_mp);
 961    a68_id2 (A68_STD, "longlongarcsin", "qasin", m, genie_asin_mp);
 962    a68_id2 (A68_STD, "longlongarctan", "qatan", m, genie_atan_mp);
 963    a68_id2 (A68_STD, "longlongcos", "qcos", m, genie_cos_mp);
 964    a68_id2 (A68_STD, "longlongexp", "qexp", m, genie_exp_mp);
 965    a68_id2 (A68_STD, "longlongln", "qln", m, genie_ln_mp);
 966    a68_id2 (A68_STD, "longlonglog", "qlog", m, genie_log_mp);
 967    a68_id2 (A68_STD, "longlongsin", "qsin", m, genie_sin_mp);
 968    a68_id2 (A68_STD, "longlongsqrt", "qsqrt", m, genie_sqrt_mp);
 969    a68_id2 (A68_STD, "longlongtan", "qtan", m, genie_tan_mp);
 970    m = a68_proc (M_LONG_LONG_REAL, M_LONG_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
 971    a68_id2 (A68_EXT, "longlongarctan2dg", "qatan2dg", m, genie_atan2dg_mp);
 972    a68_id2 (A68_EXT, "longlongarctan2", "qatan2", m, genie_atan2_mp);
 973    a68_id2 (A68_EXT, "longlongbeta", "qbeta", m, genie_beta_mp);
 974    a68_id2 (A68_EXT, "longlonggammaincf", "qgammaincf", m, genie_gamma_inc_f_mp);
 975    a68_id2 (A68_EXT, "longlonggammaincgf", "qgammaincgf", m, genie_gamma_inc_gf_mp);
 976    a68_id2 (A68_EXT, "longlonggammainc", "qgammainc", m, genie_gamma_inc_h_mp);
 977    a68_id2 (A68_EXT, "longlonglnbeta", "qlnbeta", m, genie_lnbeta_mp);
 978    m = a68_proc (M_LONG_LONG_REAL, M_LONG_LONG_REAL, M_LONG_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
 979    a68_id2 (A68_EXT, "longlongbetainc", "qbetainc", m, genie_beta_inc_mp);
 980    m = a68_proc (M_LONG_LONG_REAL, M_LONG_LONG_REAL, M_LONG_LONG_REAL, M_LONG_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
 981    a68_id2 (A68_EXT, "longlonggammaincg", "qgammaincg", m, genie_gamma_inc_g_mp);
 982    m = a68_proc (M_LONG_LONG_REAL, M_LONG_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
 983    a68_op (A68_STD, "+", m, genie_add_mp);
 984    a68_op (A68_STD, "-", m, genie_sub_mp);
 985    a68_op (A68_STD, "*", m, genie_mul_mp);
 986    a68_op (A68_STD, "/", m, genie_div_mp);
 987    a68_op (A68_STD, "**", m, genie_pow_mp);
 988    a68_op (A68_STD, "UP", m, genie_pow_mp);
 989    a68_op (A68_STD, "^", m, genie_pow_mp);
 990    m = a68_proc (M_REF_LONG_LONG_REAL, M_REF_LONG_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
 991    a68_op (A68_STD, "+:=", m, genie_plusab_mp);
 992    a68_op (A68_STD, "-:=", m, genie_minusab_mp);
 993    a68_op (A68_STD, "*:=", m, genie_timesab_mp);
 994    a68_op (A68_STD, "/:=", m, genie_divab_mp);
 995    a68_op (A68_STD, "PLUSAB", m, genie_plusab_mp);
 996    a68_op (A68_STD, "MINUSAB", m, genie_minusab_mp);
 997    a68_op (A68_STD, "TIMESAB", m, genie_timesab_mp);
 998    a68_op (A68_STD, "DIVAB", m, genie_divab_mp);
 999    m = a68_proc (M_BOOL, M_LONG_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
1000    a68_op (A68_STD, "=", m, genie_eq_mp);
1001    a68_op (A68_STD, "EQ", m, genie_eq_mp);
1002    a68_op (A68_STD, "/=", m, genie_ne_mp);
1003    a68_op (A68_STD, "~=", m, genie_ne_mp);
1004    a68_op (A68_STD, "^=", m, genie_ne_mp);
1005    a68_op (A68_STD, "NE", m, genie_ne_mp);
1006    a68_op (A68_STD, "<", m, genie_lt_mp);
1007    a68_op (A68_STD, "LT", m, genie_lt_mp);
1008    a68_op (A68_STD, "<=", m, genie_le_mp);
1009    a68_op (A68_STD, "LE", m, genie_le_mp);
1010    a68_op (A68_STD, ">", m, genie_gt_mp);
1011    a68_op (A68_STD, "GT", m, genie_gt_mp);
1012    a68_op (A68_STD, ">=", m, genie_ge_mp);
1013    a68_op (A68_STD, "GE", m, genie_ge_mp);
1014    m = a68_proc (M_LONG_LONG_REAL, M_LONG_LONG_REAL, M_INT, NO_MOID);
1015    a68_op (A68_STD, "**", m, genie_pow_mp_int);
1016    a68_op (A68_STD, "UP", m, genie_pow_mp_int);
1017    a68_op (A68_STD, "^", m, genie_pow_mp_int);
1018    m = a68_proc (M_LONG_LONG_COMPLEX, M_LONG_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
1019    a68_op (A68_STD, "I", m, genie_idle);
1020    a68_op (A68_STD, "+*", m, genie_idle);
1021  // LONG LONG COMPLEX in software
1022    m = a68_proc (M_LONG_LONG_REAL, M_LONG_LONG_COMPLEX, NO_MOID);
1023    a68_op (A68_STD, "RE", m, genie_re_mp_complex);
1024    a68_op (A68_STD, "IM", m, genie_im_mp_complex);
1025    a68_op (A68_STD, "ARG", m, genie_arg_mp_complex);
1026    a68_op (A68_STD, "ABS", m, genie_abs_mp_complex);
1027    m = a68_proc (M_LONG_LONG_COMPLEX, M_LONG_LONG_COMPLEX, NO_MOID);
1028    a68_op (A68_STD, "+", m, genie_idle);
1029    a68_op (A68_STD, "-", m, genie_minus_mp_complex);
1030    a68_op (A68_STD, "CONJ", m, genie_conj_mp_complex);
1031    m = a68_proc (M_LONG_LONG_COMPLEX, M_LONG_LONG_COMPLEX, M_LONG_LONG_COMPLEX, NO_MOID);
1032    a68_op (A68_STD, "+", m, genie_add_mp_complex);
1033    a68_op (A68_STD, "-", m, genie_sub_mp_complex);
1034    a68_op (A68_STD, "*", m, genie_mul_mp_complex);
1035    a68_op (A68_STD, "/", m, genie_div_mp_complex);
1036    m = a68_proc (M_LONG_LONG_COMPLEX, M_LONG_LONG_COMPLEX, M_INT, NO_MOID);
1037    a68_op (A68_STD, "**", m, genie_pow_mp_complex_int);
1038    a68_op (A68_STD, "UP", m, genie_pow_mp_complex_int);
1039    a68_op (A68_STD, "^", m, genie_pow_mp_complex_int);
1040    m = a68_proc (M_BOOL, M_LONG_LONG_COMPLEX, M_LONG_LONG_COMPLEX, NO_MOID);
1041    a68_op (A68_STD, "=", m, genie_eq_mp_complex);
1042    a68_op (A68_STD, "EQ", m, genie_eq_mp_complex);
1043    a68_op (A68_STD, "/=", m, genie_ne_mp_complex);
1044    a68_op (A68_STD, "~=", m, genie_ne_mp_complex);
1045    a68_op (A68_STD, "^=", m, genie_ne_mp_complex);
1046    a68_op (A68_STD, "NE", m, genie_ne_mp_complex);
1047    m = a68_proc (M_REF_LONG_LONG_COMPLEX, M_REF_LONG_LONG_COMPLEX, M_LONG_LONG_COMPLEX, NO_MOID);
1048    a68_op (A68_STD, "+:=", m, genie_plusab_mp_complex);
1049    a68_op (A68_STD, "-:=", m, genie_minusab_mp_complex);
1050    a68_op (A68_STD, "*:=", m, genie_timesab_mp_complex);
1051    a68_op (A68_STD, "/:=", m, genie_divab_mp_complex);
1052    a68_op (A68_STD, "PLUSAB", m, genie_plusab_mp_complex);
1053    a68_op (A68_STD, "MINUSAB", m, genie_minusab_mp_complex);
1054    a68_op (A68_STD, "TIMESAB", m, genie_timesab_mp_complex);
1055    a68_op (A68_STD, "DIVAB", m, genie_divab_mp_complex);
1056    m = a68_proc (M_LONG_LONG_COMPLEX, M_LONG_LONG_COMPLEX, NO_MOID);
1057    a68_id2 (A68_EXT, "longlongcomplexarccosh", "qcacosh", m, genie_acosh_mp_complex);
1058    a68_id2 (A68_EXT, "longlongcomplexarccos", "qcacos", m, genie_acos_mp_complex);
1059    a68_id2 (A68_EXT, "longlongcomplexarcsinh", "qcasinh", m, genie_asinh_mp_complex);
1060    a68_id2 (A68_EXT, "longlongcomplexarcsin", "qcasin", m, genie_asin_mp_complex);
1061    a68_id2 (A68_EXT, "longlongcomplexarctanh", "qcatanh", m, genie_atanh_mp_complex);
1062    a68_id2 (A68_EXT, "longlongcomplexarctan", "qcatan", m, genie_atan_mp_complex);
1063    a68_id2 (A68_EXT, "longlongcomplexcosh", "qccosh", m, genie_cosh_mp_complex);
1064    a68_id2 (A68_EXT, "longlongcomplexcos", "qccos", m, genie_cos_mp_complex);
1065    a68_id2 (A68_EXT, "longlongcomplexexp", "qcexp", m, genie_exp_mp_complex);
1066    a68_id2 (A68_EXT, "longlongcomplexln", "qcln", m, genie_ln_mp_complex);
1067    a68_id2 (A68_EXT, "longlongcomplexsinh", "qcsinh", m, genie_sinh_mp_complex);
1068    a68_id2 (A68_EXT, "longlongcomplexsin", "qcsin", m, genie_sin_mp_complex);
1069    a68_id2 (A68_EXT, "longlongcomplexsqrt", "qcsqrt", m, genie_sqrt_mp_complex);
1070    a68_id2 (A68_EXT, "longlongcomplextanh", "qctanh", m, genie_tanh_mp_complex);
1071    a68_id2 (A68_EXT, "longlongcomplextan", "qctan", m, genie_tan_mp_complex);
1072  // BYTES ops.
1073    m = a68_proc (M_BYTES, M_STRING, NO_MOID);
1074    a68_idf (A68_STD, "bytespack", m, genie_bytespack);
1075    m = a68_proc (M_CHAR, M_INT, M_BYTES, NO_MOID);
1076    a68_op (A68_STD, "ELEM", m, genie_elem_bytes);
1077    m = a68_proc (M_BYTES, M_BYTES, M_BYTES, NO_MOID);
1078    a68_op (A68_STD, "+", m, genie_add_bytes);
1079    m = a68_proc (M_REF_BYTES, M_REF_BYTES, M_BYTES, NO_MOID);
1080    a68_op (A68_STD, "+:=", m, genie_plusab_bytes);
1081    a68_op (A68_STD, "PLUSAB", m, genie_plusab_bytes);
1082    m = a68_proc (M_REF_BYTES, M_BYTES, M_REF_BYTES, NO_MOID);
1083    a68_op (A68_STD, "+=:", m, genie_plusto_bytes);
1084    a68_op (A68_STD, "PLUSTO", m, genie_plusto_bytes);
1085    m = a68_proc (M_BOOL, M_BYTES, M_BYTES, NO_MOID);
1086    a68_op (A68_STD, "=", m, genie_eq_bytes);
1087    a68_op (A68_STD, "/=", m, genie_ne_bytes);
1088    a68_op (A68_STD, "~=", m, genie_ne_bytes);
1089    a68_op (A68_STD, "^=", m, genie_ne_bytes);
1090    a68_op (A68_STD, "<", m, genie_lt_bytes);
1091    a68_op (A68_STD, "<=", m, genie_le_bytes);
1092    a68_op (A68_STD, ">", m, genie_gt_bytes);
1093    a68_op (A68_STD, ">=", m, genie_ge_bytes);
1094    a68_op (A68_STD, "EQ", m, genie_eq_bytes);
1095    a68_op (A68_STD, "NE", m, genie_ne_bytes);
1096    a68_op (A68_STD, "LT", m, genie_lt_bytes);
1097    a68_op (A68_STD, "LE", m, genie_le_bytes);
1098    a68_op (A68_STD, "GT", m, genie_gt_bytes);
1099    a68_op (A68_STD, "GE", m, genie_ge_bytes);
1100  // LONG BYTES ops.
1101    m = a68_proc (M_LONG_BYTES, M_BYTES, NO_MOID);
1102    a68_op (A68_STD, "LENG", m, genie_leng_bytes);
1103    m = a68_proc (M_BYTES, M_LONG_BYTES, NO_MOID);
1104    a68_idf (A68_STD, "SHORTEN", m, genie_shorten_bytes);
1105    m = a68_proc (M_LONG_BYTES, M_STRING, NO_MOID);
1106    a68_idf (A68_STD, "longbytespack", m, genie_long_bytespack);
1107    m = a68_proc (M_CHAR, M_INT, M_LONG_BYTES, NO_MOID);
1108    a68_op (A68_STD, "ELEM", m, genie_elem_long_bytes);
1109    m = a68_proc (M_LONG_BYTES, M_LONG_BYTES, M_LONG_BYTES, NO_MOID);
1110    a68_op (A68_STD, "+", m, genie_add_long_bytes);
1111    m = a68_proc (M_REF_LONG_BYTES, M_REF_LONG_BYTES, M_LONG_BYTES, NO_MOID);
1112    a68_op (A68_STD, "+:=", m, genie_plusab_long_bytes);
1113    a68_op (A68_STD, "PLUSAB", m, genie_plusab_long_bytes);
1114    m = a68_proc (M_REF_LONG_BYTES, M_LONG_BYTES, M_REF_LONG_BYTES, NO_MOID);
1115    a68_op (A68_STD, "+=:", m, genie_plusto_long_bytes);
1116    a68_op (A68_STD, "PLUSTO", m, genie_plusto_long_bytes);
1117    m = a68_proc (M_BOOL, M_LONG_BYTES, M_LONG_BYTES, NO_MOID);
1118    a68_op (A68_STD, "=", m, genie_eq_long_bytes);
1119    a68_op (A68_STD, "/=", m, genie_ne_long_bytes);
1120    a68_op (A68_STD, "~=", m, genie_ne_long_bytes);
1121    a68_op (A68_STD, "^=", m, genie_ne_long_bytes);
1122    a68_op (A68_STD, "<", m, genie_lt_long_bytes);
1123    a68_op (A68_STD, "<=", m, genie_le_long_bytes);
1124    a68_op (A68_STD, ">", m, genie_gt_long_bytes);
1125    a68_op (A68_STD, ">=", m, genie_ge_long_bytes);
1126    a68_op (A68_STD, "EQ", m, genie_eq_long_bytes);
1127    a68_op (A68_STD, "NE", m, genie_ne_long_bytes);
1128    a68_op (A68_STD, "LT", m, genie_lt_long_bytes);
1129    a68_op (A68_STD, "LE", m, genie_le_long_bytes);
1130    a68_op (A68_STD, "GT", m, genie_gt_long_bytes);
1131    a68_op (A68_STD, "GE", m, genie_ge_long_bytes);
1132  // STRING ops.
1133    m = a68_proc (M_BOOL, M_STRING, M_STRING, NO_MOID);
1134    a68_op (A68_STD, "=", m, genie_eq_string);
1135    a68_op (A68_STD, "/=", m, genie_ne_string);
1136    a68_op (A68_STD, "~=", m, genie_ne_string);
1137    a68_op (A68_STD, "^=", m, genie_ne_string);
1138    a68_op (A68_STD, "<", m, genie_lt_string);
1139    a68_op (A68_STD, "<=", m, genie_le_string);
1140    a68_op (A68_STD, ">=", m, genie_ge_string);
1141    a68_op (A68_STD, ">", m, genie_gt_string);
1142    a68_op (A68_STD, "EQ", m, genie_eq_string);
1143    a68_op (A68_STD, "NE", m, genie_ne_string);
1144    a68_op (A68_STD, "LT", m, genie_lt_string);
1145    a68_op (A68_STD, "LE", m, genie_le_string);
1146    a68_op (A68_STD, "GE", m, genie_ge_string);
1147    a68_op (A68_STD, "GT", m, genie_gt_string);
1148    m = a68_proc (M_STRING, M_CHAR, M_CHAR, NO_MOID);
1149    a68_op (A68_STD, "+", m, genie_add_char);
1150    m = a68_proc (M_STRING, M_STRING, M_STRING, NO_MOID);
1151    a68_op (A68_STD, "+", m, genie_add_string);
1152    m = a68_proc (M_REF_STRING, M_REF_STRING, M_STRING, NO_MOID);
1153    a68_op (A68_STD, "+:=", m, genie_plusab_string);
1154    a68_op (A68_STD, "PLUSAB", m, genie_plusab_string);
1155    m = a68_proc (M_REF_STRING, M_REF_STRING, M_INT, NO_MOID);
1156    a68_op (A68_STD, "*:=", m, genie_timesab_string);
1157    a68_op (A68_STD, "TIMESAB", m, genie_timesab_string);
1158    m = a68_proc (M_REF_STRING, M_STRING, M_REF_STRING, NO_MOID);
1159    a68_op (A68_STD, "+=:", m, genie_plusto_string);
1160    a68_op (A68_STD, "PLUSTO", m, genie_plusto_string);
1161    m = a68_proc (M_STRING, M_STRING, M_INT, NO_MOID);
1162    a68_op (A68_STD, "*", m, genie_times_string_int);
1163    m = a68_proc (M_STRING, M_INT, M_STRING, NO_MOID);
1164    a68_op (A68_STD, "*", m, genie_times_int_string);
1165    m = a68_proc (M_STRING, M_INT, M_CHAR, NO_MOID);
1166    a68_op (A68_STD, "*", m, genie_times_int_char);
1167    m = a68_proc (M_STRING, M_CHAR, M_INT, NO_MOID);
1168    a68_op (A68_STD, "*", m, genie_times_char_int);
1169    m = a68_proc (M_CHAR, M_INT, M_ROW_CHAR, NO_MOID);
1170    a68_op (A68_STD, "ELEM", m, genie_elem_string);
1171    m = a68_proc (M_STRING, M_STRING, NO_MOID);
1172    a68_idf (A68_EXT, "realpath", m, genie_realpath);
1173  // SEMA ops.
1174  #if defined (BUILD_PARALLEL_CLAUSE)
1175    m = a68_proc (M_SEMA, M_INT, NO_MOID);
1176    a68_op (A68_STD, "LEVEL", m, genie_level_sema_int);
1177    m = a68_proc (M_INT, M_SEMA, NO_MOID);
1178    a68_op (A68_STD, "LEVEL", m, genie_level_int_sema);
1179    m = a68_proc (M_VOID, M_SEMA, NO_MOID);
1180    a68_op (A68_STD, "UP", m, genie_up_sema);
1181    a68_op (A68_STD, "DOWN", m, genie_down_sema);
1182  #else
1183    m = a68_proc (M_SEMA, M_INT, NO_MOID);
1184    a68_op (A68_STD, "LEVEL", m, genie_unimplemented);
1185    m = a68_proc (M_INT, M_SEMA, NO_MOID);
1186    a68_op (A68_STD, "LEVEL", m, genie_unimplemented);
1187    m = a68_proc (M_VOID, M_SEMA, NO_MOID);
1188    a68_op (A68_STD, "UP", m, genie_unimplemented);
1189    a68_op (A68_STD, "DOWN", m, genie_unimplemented);
1190  #endif
1191  // ROWS ops.
1192    m = a68_proc (M_INT, M_ROWS, NO_MOID);
1193    a68_op (A68_EXT, "ELEMS", m, genie_monad_elems);
1194    a68_op (A68_STD, "LWB", m, genie_monad_lwb);
1195    a68_op (A68_STD, "UPB", m, genie_monad_upb);
1196    m = a68_proc (M_INT, M_INT, M_ROWS, NO_MOID);
1197    a68_op (A68_EXT, "ELEMS", m, genie_dyad_elems);
1198    a68_op (A68_STD, "LWB", m, genie_dyad_lwb);
1199    a68_op (A68_STD, "UPB", m, genie_dyad_upb);
1200    m = a68_proc (M_ROW_STRING, M_ROW_STRING, NO_MOID);
1201    a68_op (A68_EXT, "SORT", m, genie_sort_row_string);
1202  // Some "terminators" to handle the mapping of very short or very long modes.
1203  // This allows you to write SHORT REAL z = SHORTEN pi while everything is
1204  // silently mapped onto REAL.
1205    m = a68_proc (M_LONG_LONG_INT, M_LONG_LONG_INT, NO_MOID);
1206    a68_op (A68_STD, "LENG", m, genie_idle);
1207    m = a68_proc (M_LONG_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
1208    a68_op (A68_STD, "LENG", m, genie_idle);
1209    m = a68_proc (M_LONG_LONG_COMPLEX, M_LONG_LONG_COMPLEX, NO_MOID);
1210    a68_op (A68_STD, "LENG", m, genie_idle);
1211    m = a68_proc (M_INT, M_INT, NO_MOID);
1212    a68_op (A68_STD, "SHORTEN", m, genie_idle);
1213    m = a68_proc (M_REAL, M_REAL, NO_MOID);
1214    a68_op (A68_STD, "SHORTEN", m, genie_idle);
1215    m = a68_proc (M_COMPLEX, M_COMPLEX, NO_MOID);
1216    a68_op (A68_STD, "SHORTEN", m, genie_idle);
1217    m = a68_proc (M_BITS, M_BITS, NO_MOID);
1218    a68_op (A68_STD, "SHORTEN", m, genie_idle);
1219  // SOUND/RIFF procs.
1220    m = a68_proc (M_SOUND, M_INT, M_INT, M_INT, M_INT, NO_MOID);
1221    a68_idf (A68_EXT, "newsound", m, genie_new_sound);
1222    m = a68_proc (M_INT, M_SOUND, M_INT, M_INT, NO_MOID);
1223    a68_idf (A68_EXT, "getsound", m, genie_get_sound);
1224    m = a68_proc (M_VOID, M_SOUND, M_INT, M_INT, M_INT, NO_MOID);
1225    a68_idf (A68_EXT, "setsound", m, genie_set_sound);
1226    m = a68_proc (M_INT, M_SOUND, NO_MOID);
1227    a68_op (A68_EXT, "RESOLUTION", m, genie_sound_resolution);
1228    a68_op (A68_EXT, "CHANNELS", m, genie_sound_channels);
1229    a68_op (A68_EXT, "RATE", m, genie_sound_rate);
1230    a68_op (A68_EXT, "SAMPLES", m, genie_sound_samples);
1231  }
1232  
1233  //! @brief Set up standenv - transput.
1234  
1235  void stand_mp_level_2 (void)
1236  {
1237  #if (A68_LEVEL <= 2)
1238    a68_id2 (A68_STD, "longpi", "dpi", M_LONG_REAL, genie_pi_mp);
1239    a68_idf (A68_STD, "longmaxbits", M_LONG_BITS, genie_long_max_bits);
1240    a68_idf (A68_STD, "longmaxint", M_LONG_INT, genie_long_max_int);
1241    a68_idf (A68_STD, "longsmallreal", M_LONG_REAL, genie_long_small_real);
1242    a68_idf (A68_STD, "longmaxreal", M_LONG_REAL, genie_long_max_real);
1243    a68_idf (A68_STD, "longminreal", M_LONG_REAL, genie_long_min_real);
1244    a68_idf (A68_STD, "longinfinity", M_LONG_REAL, genie_infinity_mp);
1245    a68_idf (A68_STD, "longminusinfinity", M_LONG_REAL, genie_minus_infinity_mp);
1246    a68_idf (A68_STD, "longinf", M_LONG_REAL, genie_infinity_mp);
1247    a68_idf (A68_STD, "longmininf", M_LONG_REAL, genie_minus_infinity_mp);
1248  // LONG INT in software
1249    MOID_T *m = a68_proc (M_LONG_INT, M_LONG_INT, NO_MOID);
1250    a68_op (A68_STD, "+", m, genie_idle);
1251    a68_op (A68_STD, "-", m, genie_minus_mp);
1252    a68_op (A68_STD, "ABS", m, genie_abs_mp);
1253    m = a68_proc (M_LONG_INT, M_INT, NO_MOID);
1254    a68_op (A68_STD, "LENG", m, genie_lengthen_int_to_mp);
1255    m = a68_proc (M_INT, M_LONG_INT, NO_MOID);
1256    a68_op (A68_STD, "SHORTEN", m, genie_shorten_mp_to_int);
1257    a68_op (A68_STD, "SIGN", m, genie_sign_mp);
1258    m = a68_proc (M_LONG_LONG_REAL, M_LONG_REAL, NO_MOID);
1259    a68_op (A68_STD, "LENG", m, genie_lengthen_mp_to_long_mp);
1260    m = a68_proc (M_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
1261    a68_op (A68_STD, "SHORTEN", m, genie_shorten_long_mp_to_mp);
1262    m = a68_proc (M_LONG_LONG_INT, M_LONG_INT, NO_MOID);
1263    a68_op (A68_STD, "LENG", m, genie_lengthen_mp_to_long_mp);
1264    m = a68_proc (M_LONG_INT, M_LONG_LONG_INT, NO_MOID);
1265    a68_op (A68_STD, "SHORTEN", m, genie_shorten_long_mp_to_mp);
1266    m = a68_proc (M_BOOL, M_LONG_INT, NO_MOID);
1267    a68_op (A68_STD, "ODD", m, genie_odd_mp);
1268    m = a68_proc (M_LONG_INT, M_LONG_REAL, NO_MOID);
1269    a68_op (A68_STD, "ENTIER", m, genie_entier_mp);
1270    a68_op (A68_STD, "ROUND", m, genie_round_mp);
1271    m = a68_proc (M_LONG_INT, M_LONG_INT, M_LONG_INT, NO_MOID);
1272    a68_op (A68_STD, "+", m, genie_add_mp_int);
1273    a68_op (A68_STD, "-", m, genie_sub_mp_int);
1274    a68_op (A68_STD, "*", m, genie_mul_mp_int);
1275    a68_op (A68_STD, "OVER", m, genie_over_mp);
1276    a68_op (A68_STD, "%", m, genie_over_mp);
1277    a68_op (A68_STD, "MOD", m, genie_mod_mp);
1278    a68_op (A68_STD, "%*", m, genie_mod_mp);
1279    m = a68_proc (M_REF_LONG_INT, M_REF_LONG_INT, M_LONG_INT, NO_MOID);
1280    a68_op (A68_STD, "+:=", m, genie_plusab_mp_int);
1281    a68_op (A68_STD, "-:=", m, genie_minusab_mp_int);
1282    a68_op (A68_STD, "*:=", m, genie_timesab_mp_int);
1283    a68_op (A68_STD, "%:=", m, genie_overab_mp);
1284    a68_op (A68_STD, "%*:=", m, genie_modab_mp);
1285    a68_op (A68_STD, "PLUSAB", m, genie_plusab_mp_int);
1286    a68_op (A68_STD, "MINUSAB", m, genie_minusab_mp_int);
1287    a68_op (A68_STD, "TIMESAB", m, genie_timesab_mp_int);
1288    a68_op (A68_STD, "OVERAB", m, genie_overab_mp);
1289    a68_op (A68_STD, "MODAB", m, genie_modab_mp);
1290    m = a68_proc (M_BOOL, M_LONG_INT, M_LONG_INT, NO_MOID);
1291    a68_op (A68_STD, "=", m, genie_eq_mp);
1292    a68_op (A68_STD, "EQ", m, genie_eq_mp);
1293    a68_op (A68_STD, "/=", m, genie_ne_mp);
1294    a68_op (A68_STD, "~=", m, genie_ne_mp);
1295    a68_op (A68_STD, "^=", m, genie_ne_mp);
1296    a68_op (A68_STD, "NE", m, genie_ne_mp);
1297    a68_op (A68_STD, "<", m, genie_lt_mp);
1298    a68_op (A68_STD, "LT", m, genie_lt_mp);
1299    a68_op (A68_STD, "<=", m, genie_le_mp);
1300    a68_op (A68_STD, "LE", m, genie_le_mp);
1301    a68_op (A68_STD, ">", m, genie_gt_mp);
1302    a68_op (A68_STD, "GT", m, genie_gt_mp);
1303    a68_op (A68_STD, ">=", m, genie_ge_mp);
1304    a68_op (A68_STD, "GE", m, genie_ge_mp);
1305    m = a68_proc (M_LONG_REAL, M_LONG_INT, M_LONG_INT, NO_MOID);
1306    a68_op (A68_STD, "/", m, genie_div_mp);
1307    m = a68_proc (M_LONG_INT, M_LONG_INT, M_INT, NO_MOID);
1308    a68_op (A68_STD, "**", m, genie_pow_mp_int_int);
1309    a68_op (A68_STD, "^", m, genie_pow_mp_int_int);
1310    m = a68_proc (M_LONG_COMPLEX, M_LONG_INT, M_LONG_INT, NO_MOID);
1311    a68_op (A68_STD, "I", m, genie_idle);
1312    a68_op (A68_STD, "+*", m, genie_idle);
1313    m = a68_proc (M_LONG_REAL, M_REAL, NO_MOID);
1314    a68_op (A68_STD, "LENG", m, genie_lengthen_real_to_mp);
1315    m = a68_proc (M_REAL, M_LONG_REAL, NO_MOID);
1316    a68_op (A68_STD, "SHORTEN", m, genie_shorten_mp_to_real);
1317  // LONG REAL in software
1318    m = a68_proc (M_LONG_REAL, M_LONG_REAL, NO_MOID);
1319    a68_op (A68_STD, "+", m, genie_idle);
1320    a68_op (A68_STD, "-", m, genie_minus_mp);
1321    a68_op (A68_STD, "ABS", m, genie_abs_mp);
1322    m = a68_proc (M_LONG_REAL, M_LONG_REAL, NO_MOID);
1323    a68_id2 (A68_EXT, "longarccosdg", "dacosdg", m, genie_acosdg_mp);
1324    a68_id2 (A68_EXT, "longarccosh", "dacosh", m, genie_acosh_mp);
1325    a68_id2 (A68_EXT, "longarccot", "dacot", m, genie_acot_mp);
1326    a68_id2 (A68_EXT, "longarccotdg", "dacotdg", m, genie_acosdg_mp);
1327    a68_id2 (A68_EXT, "longarccsc", "dacsc", m, genie_acsc_mp);
1328    a68_id2 (A68_EXT, "longarccscdg", "dacscdg", m, genie_acscdg_mp);
1329    a68_id2 (A68_EXT, "longarcsec", "dasec", m, genie_asec_mp);
1330    a68_id2 (A68_EXT, "longarcsecdg", "dasecdg", m, genie_asecdg_mp);
1331    a68_id2 (A68_EXT, "longarcsindg", "dasindg", m, genie_asindg_mp);
1332    a68_id2 (A68_EXT, "longarcsinh", "dasinh", m, genie_asinh_mp);
1333    a68_id2 (A68_EXT, "longarctandg", "datandg", m, genie_atandg_mp);
1334    a68_id2 (A68_EXT, "longarctanh", "datanh", m, genie_atanh_mp);
1335    a68_id2 (A68_EXT, "longcas", "dcas", m, genie_cas_mp);
1336    a68_id2 (A68_EXT, "longcbrt", "dcbrt", m, genie_curt_mp);
1337    a68_id2 (A68_EXT, "longcosdg", "dcosdg", m, genie_cosdg_mp);
1338    a68_id2 (A68_EXT, "longcosh", "dcosh", m, genie_cosh_mp);
1339    a68_id2 (A68_EXT, "longcospi", "dcospi", m, genie_cospi_mp);
1340    a68_id2 (A68_EXT, "longcot", "dcot", m, genie_cot_mp);
1341    a68_id2 (A68_EXT, "longcotdg", "dcotdg", m, genie_cotdg_mp);
1342    a68_id2 (A68_EXT, "longcotpi", "dcotpi", m, genie_cotpi_mp);
1343    a68_id2 (A68_EXT, "longcsc", "dcsc", m, genie_csc_mp);
1344    a68_id2 (A68_EXT, "longcscdg", "dcscdg", m, genie_cscdg_mp);
1345    a68_id2 (A68_EXT, "longcurt", "dcurt", m, genie_curt_mp);
1346    a68_id2 (A68_EXT, "longerfc", "derfc", m, genie_erfc_mp);
1347    a68_id2 (A68_EXT, "longerf", "derf", m, genie_erf_mp);
1348    a68_id2 (A68_EXT, "longgamma", "dgamma", m, genie_gamma_mp);
1349    a68_id2 (A68_EXT, "longinverfc", "dinverfc", m, genie_inverfc_mp);
1350    a68_id2 (A68_EXT, "longinverf", "dinverf", m, genie_inverf_mp);
1351    a68_id2 (A68_EXT, "longlngamma", "dlngamma", m, genie_lngamma_mp);
1352    a68_id2 (A68_EXT, "longsecdg", "dsecdg", m, genie_secdg_mp);
1353    a68_id2 (A68_EXT, "longsec", "dsec", m, genie_sec_mp);
1354    a68_id2 (A68_EXT, "longsindg", "dsindg", m, genie_sindg_mp);
1355    a68_id2 (A68_EXT, "longsinh", "dsinh", m, genie_sinh_mp);
1356    a68_id2 (A68_EXT, "longsinpi", "dsinpi", m, genie_sinpi_mp);
1357    a68_id2 (A68_EXT, "longtandg", "dtandg", m, genie_tandg_mp);
1358    a68_id2 (A68_EXT, "longtanh", "dtanh", m, genie_tanh_mp);
1359    a68_id2 (A68_EXT, "longtanpi", "dtanpi", m, genie_tanpi_mp);
1360  // RR.
1361    a68_id2 (A68_STD, "longarccos", "dacos", m, genie_acos_mp);
1362    a68_id2 (A68_STD, "longarcsin", "dasin", m, genie_asin_mp);
1363    a68_id2 (A68_STD, "longarctan", "datan", m, genie_atan_mp);
1364    a68_id2 (A68_STD, "longcos", "dcos", m, genie_cos_mp);
1365    a68_id2 (A68_STD, "longexp", "dexp", m, genie_exp_mp);
1366    a68_id2 (A68_STD, "longln", "dln", m, genie_ln_mp);
1367    a68_id2 (A68_STD, "longlog", "dlog", m, genie_log_mp);
1368    a68_id2 (A68_STD, "longsin", "dsin", m, genie_sin_mp);
1369    a68_id2 (A68_STD, "longsqrt", "dsqrt", m, genie_sqrt_mp);
1370    a68_id2 (A68_STD, "longtan", "dtan", m,  genie_tan_mp);
1371    m = a68_proc (M_LONG_REAL, NO_MOID);
1372    a68_idf (A68_STD, "longnextrandom", m, genie_long_next_random);
1373    a68_idf (A68_STD, "longrandom", m, genie_long_next_random);
1374    m = a68_proc (M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, NO_MOID);
1375    a68_id2 (A68_EXT, "longarctan2", "datan2", m, genie_atan2_mp);
1376    a68_id2 (A68_EXT, "longarctan2dg", "datan2dg", m, genie_atan2dg_mp);
1377    a68_id2 (A68_EXT, "longbeta", "dbeta", m, genie_beta_mp);
1378    a68_id2 (A68_EXT, "longgammainc", "dgammainc", m, genie_gamma_inc_h_mp);
1379    a68_id2 (A68_EXT, "longgammaincf", "dgammaincf", m, genie_gamma_inc_f_mp);
1380    a68_id2 (A68_EXT, "longgammaincgf", "dgammaincgf", m, genie_gamma_inc_gf_mp);
1381    a68_id2 (A68_EXT, "longlnbeta", "dlnbeta", m, genie_lnbeta_mp);
1382    m = a68_proc (M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, NO_MOID);
1383    a68_id2 (A68_EXT, "longbetainc", "dbetainc", m, genie_beta_inc_mp);
1384    m = a68_proc (M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, NO_MOID);
1385    a68_id2 (A68_EXT, "longgammaincg", "dgammaincg", m, genie_gamma_inc_g_mp);
1386    m = a68_proc (M_INT, M_LONG_REAL, NO_MOID);
1387    a68_op (A68_STD, "SIGN", m, genie_sign_mp);
1388    m = a68_proc (M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, NO_MOID);
1389    a68_op (A68_STD, "+", m, genie_add_mp);
1390    a68_op (A68_STD, "-", m, genie_sub_mp);
1391    a68_op (A68_STD, "*", m, genie_mul_mp);
1392    a68_op (A68_STD, "/", m, genie_div_mp);
1393    a68_op (A68_STD, "**", m, genie_pow_mp);
1394    a68_op (A68_STD, "UP", m, genie_pow_mp);
1395    a68_op (A68_STD, "^", m, genie_pow_mp);
1396    m = a68_proc (M_REF_LONG_REAL, M_REF_LONG_REAL, M_LONG_REAL, NO_MOID);
1397    a68_op (A68_STD, "+:=", m, genie_plusab_mp);
1398    a68_op (A68_STD, "-:=", m, genie_minusab_mp);
1399    a68_op (A68_STD, "*:=", m, genie_timesab_mp);
1400    a68_op (A68_STD, "/:=", m, genie_divab_mp);
1401    a68_op (A68_STD, "PLUSAB", m, genie_plusab_mp);
1402    a68_op (A68_STD, "MINUSAB", m, genie_minusab_mp);
1403    a68_op (A68_STD, "TIMESAB", m, genie_timesab_mp);
1404    a68_op (A68_STD, "DIVAB", m, genie_divab_mp);
1405    m = a68_proc (M_BOOL, M_LONG_REAL, M_LONG_REAL, NO_MOID);
1406    a68_op (A68_STD, "=", m, genie_eq_mp);
1407    a68_op (A68_STD, "EQ", m, genie_eq_mp);
1408    a68_op (A68_STD, "/=", m, genie_ne_mp);
1409    a68_op (A68_STD, "~=", m, genie_ne_mp);
1410    a68_op (A68_STD, "^=", m, genie_ne_mp);
1411    a68_op (A68_STD, "NE", m, genie_ne_mp);
1412    a68_op (A68_STD, "<", m, genie_lt_mp);
1413    a68_op (A68_STD, "LT", m, genie_lt_mp);
1414    a68_op (A68_STD, "<=", m, genie_le_mp);
1415    a68_op (A68_STD, "LE", m, genie_le_mp);
1416    a68_op (A68_STD, ">", m, genie_gt_mp);
1417    a68_op (A68_STD, "GT", m, genie_gt_mp);
1418    a68_op (A68_STD, ">=", m, genie_ge_mp);
1419    a68_op (A68_STD, "GE", m, genie_ge_mp);
1420    m = a68_proc (M_LONG_REAL, M_LONG_REAL, M_INT, NO_MOID);
1421    a68_op (A68_STD, "**", m, genie_pow_mp_int);
1422    a68_op (A68_STD, "UP", m, genie_pow_mp_int);
1423    a68_op (A68_STD, "^", m, genie_pow_mp_int);
1424    m = a68_proc (M_LONG_COMPLEX, M_LONG_REAL, M_LONG_REAL, NO_MOID);
1425    a68_op (A68_STD, "I", m, genie_idle);
1426    a68_op (A68_STD, "+*", m, genie_idle);
1427  // LONG COMPLEX in software
1428    m = a68_proc (M_LONG_LONG_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1429    a68_op (A68_STD, "LENG", m, genie_lengthen_mp_complex_to_long_mp_complex);
1430    m = a68_proc (M_LONG_COMPLEX, M_LONG_LONG_COMPLEX, NO_MOID);
1431    a68_op (A68_STD, "SHORTEN", m, genie_shorten_long_mp_complex_to_mp_complex);
1432    m = a68_proc (M_LONG_COMPLEX, M_COMPLEX, NO_MOID);
1433    a68_op (A68_STD, "LENG", m, genie_lengthen_complex_to_mp_complex);
1434    m = a68_proc (M_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1435    a68_op (A68_STD, "SHORTEN", m, genie_shorten_mp_complex_to_complex);
1436    m = a68_proc (M_LONG_REAL, M_LONG_COMPLEX, NO_MOID);
1437    a68_op (A68_STD, "RE", m, genie_re_mp_complex);
1438    a68_op (A68_STD, "IM", m, genie_im_mp_complex);
1439    a68_op (A68_STD, "ARG", m, genie_arg_mp_complex);
1440    a68_op (A68_STD, "ABS", m, genie_abs_mp_complex);
1441    m = a68_proc (M_LONG_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1442    a68_op (A68_STD, "+", m, genie_idle);
1443    a68_op (A68_STD, "-", m, genie_minus_mp_complex);
1444    a68_op (A68_STD, "CONJ", m, genie_conj_mp_complex);
1445    m = a68_proc (M_LONG_COMPLEX, M_LONG_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1446    a68_op (A68_STD, "+", m, genie_add_mp_complex);
1447    a68_op (A68_STD, "-", m, genie_sub_mp_complex);
1448    a68_op (A68_STD, "*", m, genie_mul_mp_complex);
1449    a68_op (A68_STD, "/", m, genie_div_mp_complex);
1450    m = a68_proc (M_LONG_COMPLEX, M_LONG_COMPLEX, M_INT, NO_MOID);
1451    a68_op (A68_STD, "**", m, genie_pow_mp_complex_int);
1452    a68_op (A68_STD, "UP", m, genie_pow_mp_complex_int);
1453    a68_op (A68_STD, "^", m, genie_pow_mp_complex_int);
1454    m = a68_proc (M_BOOL, M_LONG_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1455    a68_op (A68_STD, "=", m, genie_eq_mp_complex);
1456    a68_op (A68_STD, "EQ", m, genie_eq_mp_complex);
1457    a68_op (A68_STD, "/=", m, genie_ne_mp_complex);
1458    a68_op (A68_STD, "~=", m, genie_ne_mp_complex);
1459    a68_op (A68_STD, "^=", m, genie_ne_mp_complex);
1460    a68_op (A68_STD, "NE", m, genie_ne_mp_complex);
1461    m = a68_proc (M_REF_LONG_COMPLEX, M_REF_LONG_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1462    a68_op (A68_STD, "+:=", m, genie_plusab_mp_complex);
1463    a68_op (A68_STD, "-:=", m, genie_minusab_mp_complex);
1464    a68_op (A68_STD, "*:=", m, genie_timesab_mp_complex);
1465    a68_op (A68_STD, "/:=", m, genie_divab_mp_complex);
1466    a68_op (A68_STD, "PLUSAB", m, genie_plusab_mp_complex);
1467    a68_op (A68_STD, "MINUSAB", m, genie_minusab_mp_complex);
1468    a68_op (A68_STD, "TIMESAB", m, genie_timesab_mp_complex);
1469    a68_op (A68_STD, "DIVAB", m, genie_divab_mp_complex);
1470    m = a68_proc (M_LONG_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1471    a68_id2 (A68_EXT, "longcomplexarccos", "dcacos", m, genie_acos_mp_complex);
1472    a68_id2 (A68_EXT, "longcomplexarccosh", "dcacosh", m, genie_acosh_mp_complex);
1473    a68_id2 (A68_EXT, "longcomplexarcsin", "dcasin", m, genie_asin_mp_complex);
1474    a68_id2 (A68_EXT, "longcomplexarcsinh", "dcasinh", m, genie_asinh_mp_complex);
1475    a68_id2 (A68_EXT, "longcomplexarctan", "dcatan", m, genie_atan_mp_complex);
1476    a68_id2 (A68_EXT, "longcomplexarctanh", "dcatanh", m, genie_atanh_mp_complex);
1477    a68_id2 (A68_EXT, "longcomplexcos", "dccos", m, genie_cos_mp_complex);
1478    a68_id2 (A68_EXT, "longcomplexcosh", "dccosh", m, genie_cosh_mp_complex);
1479    a68_id2 (A68_EXT, "longcomplexexp", "dcexp", m, genie_exp_mp_complex);
1480    a68_id2 (A68_EXT, "longcomplexln", "dcln", m, genie_ln_mp_complex);
1481    a68_id2 (A68_EXT, "longcomplexsin", "dcsin", m, genie_sin_mp_complex);
1482    a68_id2 (A68_EXT, "longcomplexsinh", "dcsin", m, genie_sinh_mp_complex);
1483    a68_id2 (A68_EXT, "longcomplexsqrt", "dcsqrt", m, genie_sqrt_mp_complex);
1484    a68_id2 (A68_EXT, "longcomplextan", "dctan", m, genie_tan_mp_complex);
1485    a68_id2 (A68_EXT, "longcomplextanh", "dctanh", m, genie_tanh_mp_complex);
1486  
1487  // LONG BITS in software
1488    m = a68_proc (M_LONG_BITS, M_ROW_BOOL, NO_MOID);
1489    a68_idf (A68_STD, "longbitspack", m, genie_long_bits_pack);
1490    m = a68_proc (M_LONG_INT, M_LONG_BITS, NO_MOID);
1491    a68_op (A68_STD, "ABS", m, genie_idle);
1492    m = a68_proc (M_LONG_BITS, M_LONG_INT, NO_MOID);
1493    a68_op (A68_STD, "BIN", m, genie_bin_mp);
1494    m = a68_proc (M_BITS, M_LONG_BITS, NO_MOID);
1495    a68_op (A68_STD, "SHORTEN", m, genie_shorten_mp_to_bits);
1496    m = a68_proc (M_LONG_BITS, M_BITS, NO_MOID);
1497    a68_op (A68_STD, "LENG", m, genie_lengthen_unt_to_mp);
1498    m = a68_proc (M_LONG_BITS, M_LONG_BITS, NO_MOID);
1499    a68_op (A68_STD, "NOT", m, genie_not_mp);
1500    a68_op (A68_STD, "~", m, genie_not_mp);
1501    m = a68_proc (M_BOOL, M_LONG_BITS, M_LONG_BITS, NO_MOID);
1502    a68_op (A68_STD, "=", m, genie_eq_mp);
1503    a68_op (A68_STD, "EQ", m, genie_eq_mp);
1504    a68_op (A68_STD, "/=", m, genie_ne_mp);
1505    a68_op (A68_STD, "~=", m, genie_ne_mp);
1506    a68_op (A68_STD, "^=", m, genie_ne_mp);
1507    a68_op (A68_STD, "NE", m, genie_ne_mp);
1508    a68_op (A68_STD, "<=", m, genie_le_long_bits);
1509    a68_op (A68_STD, "LE", m, genie_le_long_bits);
1510    a68_op (A68_STD, ">=", m, genie_ge_long_bits);
1511    a68_op (A68_STD, "GE", m, genie_ge_long_bits);
1512    m = a68_proc (M_LONG_BITS, M_LONG_BITS, M_LONG_BITS, NO_MOID);
1513    a68_op (A68_STD, "AND", m, genie_and_mp);
1514    a68_op (A68_STD, "&", m, genie_and_mp);
1515    a68_op (A68_STD, "OR", m, genie_or_mp);
1516    a68_op (A68_EXT, "XOR", m, genie_xor_mp);
1517    m = a68_proc (M_LONG_BITS, M_LONG_BITS, M_INT, NO_MOID);
1518    a68_op (A68_STD, "SHL", m, genie_shl_mp);
1519    a68_op (A68_STD, "UP", m, genie_shl_mp);
1520    a68_op (A68_STD, "SHR", m, genie_shr_mp);
1521    a68_op (A68_STD, "DOWN", m, genie_shr_mp);
1522    m = a68_proc (M_BOOL, M_INT, M_LONG_BITS, NO_MOID);
1523    a68_op (A68_STD, "ELEM", m, genie_elem_long_bits);
1524    m = a68_proc (M_LONG_BITS, M_INT, M_LONG_BITS, NO_MOID);
1525    a68_op (A68_STD, "SET", m, genie_set_long_bits);
1526    a68_op (A68_STD, "CLEAR", m, genie_clear_long_bits);
1527  #endif
1528  }
1529  
1530  void stand_mp_level_3 (void)
1531  {
1532  #if (A68_LEVEL >= 3)
1533    a68_id2 (A68_STD, "longpi", "dpi", M_LONG_REAL, genie_pi_double);
1534    a68_idf (A68_STD, "longmaxbits", M_LONG_BITS, genie_double_max_bits);
1535    a68_idf (A68_STD, "longmaxint", M_LONG_INT, genie_double_max_int);
1536    a68_idf (A68_STD, "longsmallreal", M_LONG_REAL, genie_double_small_real);
1537    a68_idf (A68_STD, "longmaxreal", M_LONG_REAL, genie_double_max_real);
1538    a68_idf (A68_STD, "longminreal", M_LONG_REAL, genie_double_min_real);
1539    a68_idf (A68_STD, "longinfinity", M_LONG_REAL, genie_infinity_double);
1540    a68_idf (A68_STD, "longminusinfinity", M_LONG_REAL, genie_minus_infinity_double);
1541    a68_idf (A68_STD, "longinf", M_LONG_REAL, genie_infinity_double);
1542    a68_idf (A68_STD, "longmininf", M_LONG_REAL, genie_minus_infinity_double);
1543  // LONG INT as 128 bit
1544    MOID_T *m = a68_proc (M_LONG_INT, M_LONG_INT, NO_MOID);
1545    a68_op (A68_STD, "+", m, genie_idle);
1546    a68_op (A68_STD, "-", m, genie_minus_double_int);
1547    a68_op (A68_STD, "ABS", m, genie_abs_double_int);
1548    m = a68_proc (M_LONG_INT, M_INT, NO_MOID);
1549    a68_op (A68_STD, "LENG", m, genie_lengthen_int_to_double_int);
1550    m = a68_proc (M_LONG_LONG_INT, M_LONG_INT, NO_MOID);
1551    a68_op (A68_STD, "LENG", m, genie_lengthen_double_int_to_mp);
1552    m = a68_proc (M_INT, M_LONG_INT, NO_MOID);
1553    a68_op (A68_STD, "SHORTEN", m, genie_shorten_long_int_to_int);
1554    a68_op (A68_STD, "SIGN", m, genie_sign_double_int);
1555    m = a68_proc (M_BOOL, M_LONG_INT, NO_MOID);
1556    a68_op (A68_STD, "ODD", m, genie_odd_double_int);
1557    m = a68_proc (M_LONG_INT, M_LONG_REAL, NO_MOID);
1558    a68_op (A68_STD, "ENTIER", m, genie_entier_double);
1559    a68_op (A68_STD, "ROUND", m, genie_round_double);
1560    m = a68_proc (M_LONG_INT, M_LONG_INT, M_LONG_INT, NO_MOID);
1561    a68_op (A68_STD, "+", m, genie_add_double_int);
1562    a68_op (A68_STD, "-", m, genie_sub_double_int);
1563    a68_op (A68_STD, "*", m, genie_mul_double_int);
1564    a68_op (A68_STD, "OVER", m, genie_over_double_int);
1565    a68_op (A68_STD, "%", m, genie_over_double_int);
1566    a68_op (A68_STD, "MOD", m, genie_mod_double_int);
1567    a68_op (A68_STD, "%*", m, genie_mod_double_int);
1568    m = a68_proc (M_LONG_INT, M_LONG_INT, M_INT, NO_MOID);
1569    a68_op (A68_STD, "**", m, genie_pow_double_int_int);
1570    a68_op (A68_STD, "^", m, genie_pow_double_int_int);
1571    m = a68_proc (M_REF_LONG_INT, M_REF_LONG_INT, M_LONG_INT, NO_MOID);
1572    a68_op (A68_STD, "+:=", m, genie_plusab_double_int);
1573    a68_op (A68_STD, "-:=", m, genie_minusab_double_int);
1574    a68_op (A68_STD, "*:=", m, genie_timesab_double_int);
1575    a68_op (A68_STD, "%:=", m, genie_overab_double_int);
1576    a68_op (A68_STD, "%*:=", m, genie_modab_double_int);
1577    a68_op (A68_STD, "PLUSAB", m, genie_plusab_double_int);
1578    a68_op (A68_STD, "MINUSAB", m, genie_minusab_double_int);
1579    a68_op (A68_STD, "TIMESAB", m, genie_timesab_double_int);
1580    a68_op (A68_STD, "OVERAB", m, genie_overab_double_int);
1581    a68_op (A68_STD, "MODAB", m, genie_modab_double_int);
1582    m = a68_proc (M_LONG_REAL, M_LONG_INT, M_LONG_INT, NO_MOID);
1583    a68_op (A68_STD, "/", m, genie_div_double_int);
1584    m = a68_proc (M_BOOL, M_LONG_INT, M_LONG_INT, NO_MOID);
1585    a68_op (A68_STD, "=", m, genie_eq_double_int);
1586    a68_op (A68_STD, "EQ", m, genie_eq_double_int);
1587    a68_op (A68_STD, "/=", m, genie_ne_double_int);
1588    a68_op (A68_STD, "~=", m, genie_ne_double_int);
1589    a68_op (A68_STD, "^=", m, genie_ne_double_int);
1590    a68_op (A68_STD, "NE", m, genie_ne_double_int);
1591    a68_op (A68_STD, "<", m, genie_lt_double_int);
1592    a68_op (A68_STD, "LT", m, genie_lt_double_int);
1593    a68_op (A68_STD, "<=", m, genie_le_double_int);
1594    a68_op (A68_STD, "LE", m, genie_le_double_int);
1595    a68_op (A68_STD, ">", m, genie_gt_double_int);
1596    a68_op (A68_STD, "GT", m, genie_gt_double_int);
1597    a68_op (A68_STD, ">=", m, genie_ge_double_int);
1598    a68_op (A68_STD, "GE", m, genie_ge_double_int);
1599  // LONG REAL as 128 bit
1600    m = a68_proc (M_LONG_REAL, M_LONG_REAL, NO_MOID);
1601    a68_op (A68_STD, "+", m, genie_idle);
1602    a68_op (A68_STD, "-", m, genie_minus_double);
1603    a68_op (A68_STD, "ABS", m, genie_abs_double);
1604    m = a68_proc (M_INT, M_LONG_REAL, NO_MOID);
1605    a68_op (A68_STD, "SIGN", m, genie_sign_double);
1606    m = a68_proc (M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, NO_MOID);
1607    a68_op (A68_STD, "+", m, genie_add_double);
1608    a68_op (A68_STD, "-", m, genie_sub_double);
1609    a68_op (A68_STD, "*", m, genie_mul_double);
1610    a68_op (A68_STD, "/", m, genie_over_double);
1611    a68_op (A68_STD, "**", m, genie_pow_double);
1612    a68_op (A68_STD, "UP", m, genie_pow_double);
1613    a68_op (A68_STD, "^", m, genie_pow_double);
1614    m = a68_proc (M_LONG_REAL, M_LONG_REAL, M_INT, NO_MOID);
1615    a68_op (A68_STD, "**", m, genie_pow_double_int);
1616    a68_op (A68_STD, "UP", m, genie_pow_double_int);
1617    a68_op (A68_STD, "^", m, genie_pow_double_int);
1618    m = a68_proc (M_LONG_REAL, M_REAL, NO_MOID);
1619    a68_op (A68_STD, "LENG", m, genie_lengthen_real_to_double);
1620    m = a68_proc (M_REAL, M_LONG_REAL, NO_MOID);
1621    a68_op (A68_STD, "SHORTEN", m, genie_shorten_double_to_real);
1622    m = a68_proc (M_LONG_LONG_REAL, M_LONG_REAL, NO_MOID);
1623    a68_op (A68_STD, "LENG", m, genie_lengthen_double_to_mp);
1624    m = a68_proc (M_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
1625    a68_op (A68_STD, "SHORTEN", m, genie_shorten_mp_to_double);
1626    m = a68_proc (M_LONG_INT, M_LONG_LONG_INT, NO_MOID);
1627    a68_op (A68_STD, "SHORTEN", m, genie_shorten_mp_to_double_int);
1628    m = a68_proc (M_REF_LONG_REAL, M_REF_LONG_REAL, M_LONG_REAL, NO_MOID);
1629    a68_op (A68_STD, "+:=", m, genie_plusab_double);
1630    a68_op (A68_STD, "-:=", m, genie_minusab_double);
1631    a68_op (A68_STD, "*:=", m, genie_timesab_double);
1632    a68_op (A68_STD, "/:=", m, genie_divab_double);
1633    a68_op (A68_STD, "PLUSAB", m, genie_plusab_double);
1634    a68_op (A68_STD, "MINUSAB", m, genie_minusab_double);
1635    a68_op (A68_STD, "TIMESAB", m, genie_timesab_double);
1636    a68_op (A68_STD, "DIVAB", m, genie_divab_double);
1637    m = a68_proc (M_BOOL, M_LONG_REAL, M_LONG_REAL, NO_MOID);
1638    a68_op (A68_STD, "=", m, genie_eq_double);
1639    a68_op (A68_STD, "EQ", m, genie_eq_double);
1640    a68_op (A68_STD, "/=", m, genie_ne_double);
1641    a68_op (A68_STD, "~=", m, genie_ne_double);
1642    a68_op (A68_STD, "^=", m, genie_ne_double);
1643    a68_op (A68_STD, "NE", m, genie_ne_double);
1644    a68_op (A68_STD, "<", m, genie_lt_double);
1645    a68_op (A68_STD, "LT", m, genie_lt_double);
1646    a68_op (A68_STD, "<=", m, genie_le_double);
1647    a68_op (A68_STD, "LE", m, genie_le_double);
1648    a68_op (A68_STD, ">", m, genie_gt_double);
1649    a68_op (A68_STD, "GT", m, genie_gt_double);
1650    a68_op (A68_STD, ">=", m, genie_ge_double);
1651    a68_op (A68_STD, "GE", m, genie_ge_double);
1652    m = a68_proc (M_LONG_REAL, M_LONG_REAL, NO_MOID);
1653    a68_id2 (A68_EXT, "longarccosdg", "dacosdg", m, genie_acosdg_double);
1654    a68_id2 (A68_EXT, "longarccosh", "dacosh", m, genie_acosh_double);
1655    a68_id2 (A68_EXT, "longarccotdg", "dacotdg", m, genie_acotdg_double);
1656    a68_id2 (A68_EXT, "longarccot", "dacot", m, genie_acot_double);
1657    a68_id2 (A68_EXT, "longarccsc", "dacsc", m, genie_acsc_double);
1658    a68_id2 (A68_EXT, "longarccscdg", "dacscdg", m, genie_acscdg_double);
1659    a68_id2 (A68_EXT, "longarcsecdg", "dasecdg", m, genie_asecdg_double);
1660    a68_id2 (A68_EXT, "longarcsindg", "dasindg", m, genie_asindg_double);
1661    a68_id2 (A68_EXT, "longarcsinh", "dasinh", m, genie_asinh_double);
1662    a68_id2 (A68_EXT, "longarctandg", "datandg", m, genie_atandg_double);
1663    a68_id2 (A68_EXT, "longarctanh", "datanh", m, genie_atanh_double);
1664    a68_id2 (A68_EXT, "longcbrt", "dcbrt", m, genie_curt_double);
1665    a68_id2 (A68_EXT, "longcosdg", "dcosdg", m, genie_cosdg_double);
1666    a68_id2 (A68_EXT, "longcosh", "dcosh", m, genie_cosh_double);
1667    a68_id2 (A68_EXT, "longcospi", "dcospi", m, genie_cospi_double);
1668    a68_id2 (A68_EXT, "longcotdg", "dcotdg", m, genie_cotdg_double);
1669    a68_id2 (A68_EXT, "longcot", "dcot", m, genie_cot_double);
1670    a68_id2 (A68_EXT, "longcotpi", "dcotpi", m, genie_cotpi_double);
1671    a68_id2 (A68_EXT, "longcsc", "dcsc", m, genie_csc_double);
1672    a68_id2 (A68_EXT, "longcscdg", "dcscdg", m, genie_cscdg_double);
1673    a68_id2 (A68_EXT, "longcurt", "dcurt", m, genie_curt_double);
1674    a68_id2 (A68_EXT, "longerfc", "derfc", m, genie_erfc_double);
1675    a68_id2 (A68_EXT, "longerf", "derf", m, genie_erf_double);
1676    a68_id2 (A68_EXT, "longinverfc", "dinverfc", m, genie_inverfc_double);
1677    a68_id2 (A68_EXT, "longinverf", "dinverf", m, genie_inverf_double);
1678    a68_id2 (A68_EXT, "longgamma", "dgamma", m, genie_gamma_double);
1679    a68_id2 (A68_EXT, "longlngamma", "dlngamma", m, genie_lngamma_double);
1680    a68_id2 (A68_EXT, "longsec", "dsec", m, genie_sec_double);
1681    a68_id2 (A68_EXT, "longsecdg", "dsecdg", m, genie_secdg_double);
1682    a68_id2 (A68_EXT, "longsindg", "dsindg", m, genie_sindg_double);
1683    a68_id2 (A68_EXT, "longsinh", "dsinh", m, genie_sinh_double);
1684    a68_id2 (A68_EXT, "longsinpi", "dsinpi", m, genie_sinpi_double);
1685    a68_id2 (A68_EXT, "longtandg", "dtandg", m, genie_tandg_double);
1686    a68_id2 (A68_EXT, "longtanh", "dtanh", m, genie_tanh_double);
1687    a68_id2 (A68_EXT, "longtanpi", "dtanpi", m, genie_tanpi_double);
1688    a68_id2 (A68_STD, "longarccos", "dacos", m, genie_acos_double);
1689    a68_id2 (A68_STD, "longarcsin", "dasin", m, genie_asin_double);
1690    a68_id2 (A68_STD, "longarctan", "datan", m, genie_atan_double);
1691    a68_id2 (A68_EXT, "longcas", "dcas", m, genie_cas_double);
1692    a68_id2 (A68_STD, "longcos", "dcos", m, genie_cos_double);
1693    a68_id2 (A68_STD, "longexp", "dexp", m, genie_exp_double);
1694    a68_id2 (A68_STD, "longln", "dln", m, genie_ln_double);
1695    a68_id2 (A68_STD, "longlog", "dlog", m, genie_log_double);
1696    a68_id2 (A68_STD, "longsin", "dsin", m, genie_sin_double);
1697    a68_id2 (A68_STD, "longsqrt", "dsqrt", m, genie_sqrt_double);
1698    a68_id2 (A68_STD, "longtan", "dtan", m, genie_tan_double);
1699    m = a68_proc (M_LONG_REAL, NO_MOID);
1700    a68_idf (A68_STD, "longnextrandom", m, genie_next_random_double);
1701    a68_idf (A68_STD, "longrandom", m, genie_next_random_double);
1702    m = a68_proc (M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, NO_MOID);
1703    a68_id2 (A68_EXT, "longarctan2dg", "datan2dg", m, genie_atan2dg_double);
1704    a68_id2 (A68_EXT, "longarctan2", "datan2", m, genie_atan2_double);
1705    a68_id2 (A68_EXT, "longbeta", "dbeta", m, genie_beta_double);
1706    a68_id2 (A68_EXT, "longgammaincgf", "dgammaincgf", m, genie_gamma_inc_gf_double);
1707    a68_id2 (A68_EXT, "longgammaincf", "dgammaincf", m, genie_gamma_inc_f_double);
1708    a68_id2 (A68_EXT, "longgammainc", "dgammainc", m, genie_gamma_inc_h_double);
1709    a68_id2 (A68_EXT, "longlnbeta", "dlnbeta", m, genie_ln_beta_double);
1710    m = a68_proc (M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, NO_MOID);
1711    a68_id2 (A68_EXT, "longbetainc", "dbetainc", m, genie_beta_inc_cf_double);
1712    m = a68_proc (M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, NO_MOID);
1713    a68_id2 (A68_EXT, "longgammaincg", "dgammaincg", m, genie_gamma_inc_g_double);
1714  // LONG BITS as 128 bit
1715    m = a68_proc (M_LONG_BITS, M_ROW_BOOL, NO_MOID);
1716    a68_idf (A68_STD, "longbitspack", m, genie_double_bits_pack);
1717    m = a68_proc (M_BITS, M_LONG_BITS, NO_MOID);
1718    a68_op (A68_STD, "SHORTEN", m, genie_shorten_double_bits_to_bits);
1719    m = a68_proc (M_LONG_BITS, M_BITS, NO_MOID);
1720    a68_op (A68_STD, "LENG", m, genie_lengthen_bits_to_double_bits);
1721    m = a68_proc (M_LONG_INT, M_LONG_BITS, NO_MOID);
1722    a68_op (A68_STD, "ABS", m, genie_idle);
1723    m = a68_proc (M_LONG_BITS, M_LONG_INT, NO_MOID);
1724    a68_op (A68_STD, "BIN", m, genie_bin_double_int);
1725    m = a68_proc (M_LONG_BITS, M_LONG_BITS, NO_MOID);
1726    a68_op (A68_STD, "NOT", m, genie_not_double_bits);
1727    a68_op (A68_STD, "~", m, genie_not_double_bits);
1728    m = a68_proc (M_LONG_BITS, M_LONG_BITS, M_LONG_BITS, NO_MOID);
1729    a68_op (A68_STD, "AND", m, genie_and_double_bits);
1730    a68_op (A68_STD, "&", m, genie_and_double_bits);
1731    a68_op (A68_STD, "OR", m, genie_or_double_bits);
1732    a68_op (A68_EXT, "XOR", m, genie_xor_double_bits);
1733    a68_op (A68_EXT, "+", m, genie_add_double_bits);
1734    a68_op (A68_EXT, "-", m, genie_sub_double_bits);
1735    a68_op (A68_EXT, "*", m, genie_times_double_bits);
1736    a68_op (A68_EXT, "OVER", m, genie_over_double_bits);
1737    a68_op (A68_EXT, "MOD", m, genie_over_double_bits);
1738    m = a68_proc (M_BOOL, M_LONG_BITS, M_LONG_BITS, NO_MOID);
1739    a68_op (A68_STD, "=", m, genie_eq_double_bits);
1740    a68_op (A68_STD, "/=", m, genie_ne_double_bits);
1741    a68_op (A68_STD, "~=", m, genie_ne_double_bits);
1742    a68_op (A68_STD, "^=", m, genie_ne_double_bits);
1743    a68_op (A68_STD, "<=", m, genie_le_double_bits);
1744    a68_op (A68_STD, ">=", m, genie_ge_double_bits);
1745    a68_op (A68_STD, "EQ", m, genie_eq_double_bits);
1746    a68_op (A68_STD, "NE", m, genie_ne_double_bits);
1747    a68_op (A68_STD, "LE", m, genie_le_double_bits);
1748    a68_op (A68_STD, "GE", m, genie_ge_double_bits);
1749    a68_op (A68_EXT, "<", m, genie_lt_double_bits);
1750    a68_op (A68_EXT, ">", m, genie_gt_double_bits);
1751    a68_op (A68_EXT, "LT", m, genie_lt_double_bits);
1752    a68_op (A68_EXT, "GT", m, genie_gt_double_bits);
1753    m = a68_proc (M_BOOL, M_INT, M_LONG_BITS, NO_MOID);
1754    a68_op (A68_STD, "ELEM", m, genie_elem_double_bits);
1755    m = a68_proc (M_LONG_BITS, M_INT, M_LONG_BITS, NO_MOID);
1756    a68_op (A68_STD, "SET", m, genie_set_double_bits);
1757    a68_op (A68_STD, "CLEAR", m, genie_clear_double_bits);
1758    m = a68_proc (M_LONG_BITS, M_LONG_BITS, M_INT, NO_MOID);
1759    a68_op (A68_STD, "SHL", m, genie_shl_double_bits);
1760    a68_op (A68_STD, "UP", m, genie_shl_double_bits);
1761    a68_op (A68_STD, "SHR", m, genie_shr_double_bits);
1762    a68_op (A68_STD, "DOWN", m, genie_shr_double_bits);
1763    a68_op (A68_EXT, "ROL", m, genie_rol_double_bits);
1764    a68_op (A68_EXT, "ROR", m, genie_ror_double_bits);
1765  // LONG COMPLEX as 2 x 128 bit.
1766    m = a68_proc (M_LONG_COMPLEX, M_COMPLEX, NO_MOID);
1767    a68_op (A68_STD, "LENG", m, genie_lengthen_complex_to_double_compl);
1768    m = a68_proc (M_LONG_LONG_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1769    a68_op (A68_STD, "LENG", m, genie_lengthen_double_compl_to_long_mp_complex);
1770    m = a68_proc (M_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1771    a68_op (A68_STD, "SHORTEN", m, genie_shorten_double_compl_to_complex);
1772    m = a68_proc (M_LONG_COMPLEX, M_LONG_LONG_COMPLEX, NO_MOID);
1773    a68_op (A68_STD, "SHORTEN", m, genie_shorten_long_mp_complex_to_double_compl);
1774    m = a68_proc (M_LONG_COMPLEX, M_LONG_REAL, M_LONG_REAL, NO_MOID);
1775    a68_op (A68_STD, "I", m, genie_i_double_compl);
1776    a68_op (A68_STD, "+*", m, genie_i_double_compl);
1777    m = a68_proc (M_LONG_COMPLEX, M_LONG_INT, M_LONG_INT, NO_MOID);
1778    a68_op (A68_STD, "I", m, genie_i_int_double_compl);
1779    a68_op (A68_STD, "+*", m, genie_i_int_double_compl);
1780    m = a68_proc (M_LONG_REAL, M_LONG_COMPLEX, NO_MOID);
1781    a68_op (A68_STD, "RE", m, genie_re_double_compl);
1782    a68_op (A68_STD, "IM", m, genie_im_double_compl);
1783    a68_op (A68_STD, "ABS", m, genie_abs_double_compl);
1784    a68_op (A68_STD, "ARG", m, genie_arg_double_compl);
1785    m = a68_proc (M_LONG_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1786    a68_op (A68_STD, "+", m, genie_idle);
1787    a68_op (A68_STD, "-", m, genie_minus_double_compl);
1788    a68_op (A68_STD, "CONJ", m, genie_conj_double_compl);
1789    m = a68_proc (M_BOOL, M_LONG_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1790    a68_op (A68_STD, "=", m, genie_eq_double_compl);
1791    a68_op (A68_STD, "/=", m, genie_ne_double_compl);
1792    a68_op (A68_STD, "~=", m, genie_ne_double_compl);
1793    a68_op (A68_STD, "^=", m, genie_ne_double_compl);
1794    a68_op (A68_STD, "EQ", m, genie_eq_double_compl);
1795    a68_op (A68_STD, "NE", m, genie_ne_double_compl);
1796    m = a68_proc (M_LONG_COMPLEX, M_LONG_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1797    a68_op (A68_STD, "+", m, genie_add_double_compl);
1798    a68_op (A68_STD, "-", m, genie_sub_double_compl);
1799    a68_op (A68_STD, "*", m, genie_mul_double_compl);
1800    a68_op (A68_STD, "/", m, genie_div_double_compl);
1801    m = a68_proc (M_LONG_COMPLEX, M_LONG_COMPLEX, M_INT, NO_MOID);
1802    a68_op (A68_STD, "**", m, genie_pow_double_compl_int);
1803    a68_op (A68_STD, "UP", m, genie_pow_double_compl_int);
1804    a68_op (A68_STD, "^", m, genie_pow_double_compl_int);
1805    m = a68_proc (M_REF_LONG_COMPLEX, M_REF_LONG_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1806    a68_op (A68_STD, "+:=", m, genie_plusab_double_compl);
1807    a68_op (A68_STD, "-:=", m, genie_minusab_double_compl);
1808    a68_op (A68_STD, "*:=", m, genie_timesab_double_compl);
1809    a68_op (A68_STD, "/:=", m, genie_divab_double_compl);
1810    a68_op (A68_STD, "PLUSAB", m, genie_plusab_double_compl);
1811    a68_op (A68_STD, "MINUSAB", m, genie_minusab_double_compl);
1812    a68_op (A68_STD, "TIMESAB", m, genie_timesab_double_compl);
1813    a68_op (A68_STD, "DIVAB", m, genie_divab_double_compl);
1814    m = a68_proc (M_LONG_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1815    a68_id2 (A68_EXT, "longcomplexarccosh", "dcacosh", m, genie_acosh_double_compl);
1816    a68_id2 (A68_EXT, "longcomplexarccos", "dcacos", m, genie_acos_double_compl);
1817    a68_id2 (A68_EXT, "longcomplexarcsinh", "dcasinh", m, genie_asinh_double_compl);
1818    a68_id2 (A68_EXT, "longcomplexarcsin", "dcasin", m, genie_asin_double_compl);
1819    a68_id2 (A68_EXT, "longcomplexarctanh", "dcatanh", m, genie_atanh_double_compl);
1820    a68_id2 (A68_EXT, "longcomplexarctan", "dcatan", m, genie_atan_double_compl);
1821    a68_id2 (A68_EXT, "longcomplexatanh", "dcatanh", m, genie_atanh_double_compl);
1822    a68_id2 (A68_EXT, "longcomplexcosh", "dccosh", m, genie_cosh_double_compl);
1823    a68_id2 (A68_EXT, "longcomplexcos", "dccos", m, genie_cos_double_compl);
1824    a68_id2 (A68_EXT, "longcomplexexp", "dcexp", m, genie_exp_double_compl);
1825    a68_id2 (A68_EXT, "longcomplexln", "dcln", m, genie_ln_double_compl);
1826    a68_id2 (A68_EXT, "longcomplexsinh", "dcsinh", m, genie_sinh_double_compl);
1827    a68_id2 (A68_EXT, "longcomplexsin", "dcsin", m, genie_sin_double_compl);
1828    a68_id2 (A68_EXT, "longcomplexsqrt", "dcsqrt", m, genie_sqrt_double_compl);
1829    a68_id2 (A68_EXT, "longcomplextanh", "dctanh", m, genie_tanh_double_compl);
1830    a68_id2 (A68_EXT, "longcomplextan", "dctan", m, genie_tan_double_compl);
1831  
1832  #if defined (HAVE_GNU_MPFR)
1833    m = a68_proc (M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, NO_MOID);
1834    a68_id2 (A68_EXT, "mpfrlonggammainc", "mpfrdgammainc", m, genie_gamma_inc_double_mpfr);
1835    m = a68_proc (M_LONG_LONG_REAL, M_LONG_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
1836    a68_id2 (A68_STD, "mpfrlonglongbeta", "mpfrqbeta", m, genie_beta_mpfr);
1837    a68_id2 (A68_STD, "mpfrlonglonggammainc", "mpfrqgammainc", m, genie_gamma_inc_mpfr);
1838    a68_id2 (A68_STD, "mpfrlonglonglnbeta", "mpfrqlnbeta", m, genie_ln_beta_mpfr);
1839    m = a68_proc (M_LONG_LONG_REAL, M_LONG_LONG_REAL, M_LONG_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
1840    a68_id2 (A68_STD, "mpfrlonglongbetainc", "mpfrqbetainc", m, genie_beta_inc_mpfr);
1841    m = a68_proc (M_LONG_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
1842    a68_id2 (A68_EXT, "mpfrlonglongerfc", "mpfrqerfc", m, genie_mpfr_erfc_mp);
1843    a68_id2 (A68_EXT, "mpfrlonglongerf", "mpfrqerf", m, genie_mpfr_erf_mp);
1844    a68_id2 (A68_EXT, "mpfrlonglonggamma", "mpfrqgamma", m, genie_gamma_mpfr);
1845    a68_id2 (A68_EXT, "mpfrlonglonginverfc", "mpfrqinverfc", m, genie_mpfr_inverfc_mp);
1846    a68_id2 (A68_EXT, "mpfrlonglonginverf", "mpfrqinverf", m, genie_mpfr_inverf_mp);
1847    a68_id2 (A68_EXT, "mpfrlonglonglngamma", "mpfrqlngamma", m, genie_lngamma_mpfr);
1848    a68_idf (A68_EXT, "mpfrmp", m, genie_mpfr_mp);
1849  #endif
1850  #endif
1851  }
1852  
1853  void stand_transput (void)
1854  {
1855    a68_idf (A68_EXT, "blankcharacter", M_CHAR, genie_blank_char);
1856    a68_idf (A68_EXT, "formfeedcharacter", M_CHAR, genie_formfeed_char);
1857    a68_idf (A68_EXT, "formfeedchar", M_CHAR, genie_formfeed_char);
1858    a68_idf (A68_EXT, "newlinecharacter", M_CHAR, genie_newline_char);
1859    a68_idf (A68_EXT, "newlinechar", M_CHAR, genie_newline_char);
1860    a68_idf (A68_EXT, "nullcharacter", M_CHAR, genie_null_char);
1861    a68_idf (A68_EXT, "tabcharacter", M_CHAR, genie_tab_char);
1862    a68_idf (A68_EXT, "tabchar", M_CHAR, genie_tab_char);
1863    a68_idf (A68_STD, "blankchar", M_CHAR, genie_blank_char);
1864    a68_idf (A68_STD, "blank", M_CHAR, genie_blank_char);
1865    a68_idf (A68_STD, "errorchar", M_CHAR, genie_error_char);
1866    a68_idf (A68_STD, "expchar", M_CHAR, genie_exp_char);
1867    a68_idf (A68_STD, "flip", M_CHAR, genie_flip_char);
1868    a68_idf (A68_STD, "flop", M_CHAR, genie_flop_char);
1869    a68_idf (A68_STD, "nullchar", M_CHAR, genie_null_char);
1870    MOID_T *m = a68_proc (M_STRING, M_HEX_NUMBER, M_INT, M_INT, NO_MOID);
1871    a68_idf (A68_STD, "bits", m, genie_bits);
1872    m = a68_proc (M_STRING, M_NUMBER, M_INT, NO_MOID);
1873    a68_idf (A68_STD, "whole", m, genie_whole);
1874    m = a68_proc (M_STRING, M_NUMBER, M_INT, M_INT, NO_MOID);
1875    a68_idf (A68_STD, "fixed", m, genie_fixed);
1876    m = a68_proc (M_STRING, M_NUMBER, M_INT, M_INT, M_INT, NO_MOID);
1877    a68_idf (A68_STD, "float", m, genie_float);
1878    m = a68_proc (M_STRING, M_NUMBER, M_INT, M_INT, M_INT, M_INT, NO_MOID);
1879    a68_idf (A68_STD, "real", m, genie_real);
1880    a68_idf (A68_STD, "standin", M_REF_FILE, genie_stand_in);
1881    a68_idf (A68_STD, "standout", M_REF_FILE, genie_stand_out);
1882    a68_idf (A68_STD, "standback", M_REF_FILE, genie_stand_back);
1883    a68_idf (A68_EXT, "standerror", M_REF_FILE, genie_stand_error);
1884    a68_idf (A68_STD, "standinchannel", M_CHANNEL, genie_stand_in_channel);
1885    a68_idf (A68_STD, "standoutchannel", M_CHANNEL, genie_stand_out_channel);
1886    a68_idf (A68_EXT, "standdrawchannel", M_CHANNEL, genie_stand_draw_channel);
1887    a68_idf (A68_STD, "standbackchannel", M_CHANNEL, genie_stand_back_channel);
1888    a68_idf (A68_EXT, "standerrorchannel", M_CHANNEL, genie_stand_error_channel);
1889    m = a68_proc (M_VOID, M_REF_FILE, M_STRING, NO_MOID);
1890    a68_idf (A68_STD, "maketerm", m, genie_make_term);
1891    m = a68_proc (M_BOOL, M_CHAR, M_REF_INT, M_STRING, NO_MOID);
1892    a68_idf (A68_STD, "charinstring", m, genie_char_in_string);
1893    a68_idf (A68_EXT, "lastcharinstring", m, genie_last_char_in_string);
1894    m = a68_proc (M_BOOL, M_STRING, M_REF_INT, M_STRING, NO_MOID);
1895    a68_idf (A68_EXT, "stringinstring", m, genie_string_in_string);
1896    m = a68_proc (M_STRING, M_REF_FILE, NO_MOID);
1897    a68_idf (A68_EXT, "idf", m, genie_idf);
1898    a68_idf (A68_EXT, "term", m, genie_term);
1899    m = a68_proc (M_STRING, NO_MOID);
1900    a68_idf (A68_EXT, "programidf", m, genie_program_idf);
1901  // Event routines.
1902    m = a68_proc (M_VOID, M_REF_FILE, M_PROC_REF_FILE_BOOL, NO_MOID);
1903    a68_idf (A68_STD, "onfileend", m, genie_on_file_end);
1904    a68_idf (A68_STD, "onpageend", m, genie_on_page_end);
1905    a68_idf (A68_STD, "onlineend", m, genie_on_line_end);
1906    a68_idf (A68_STD, "onlogicalfileend", m, genie_on_file_end);
1907    a68_idf (A68_STD, "onphysicalfileend", m, genie_on_file_end);
1908    a68_idf (A68_STD, "onformatend", m, genie_on_format_end);
1909    a68_idf (A68_STD, "onformaterror", m, genie_on_format_error);
1910    a68_idf (A68_STD, "onvalueerror", m, genie_on_value_error);
1911    a68_idf (A68_STD, "onopenerror", m, genie_on_open_error);
1912    a68_idf (A68_EXT, "ontransputerror", m, genie_on_transput_error);
1913  // Enquiries on files.
1914    a68_idf (A68_EXT, "drawpossible", M_PROC_REF_FILE_BOOL, genie_draw_possible);
1915    a68_idf (A68_EXT, "endoffile", M_PROC_REF_FILE_BOOL, genie_eof);
1916    a68_idf (A68_EXT, "endofline", M_PROC_REF_FILE_BOOL, genie_eoln);
1917    a68_idf (A68_EXT, "eof", M_PROC_REF_FILE_BOOL, genie_eof);
1918    a68_idf (A68_EXT, "eoln", M_PROC_REF_FILE_BOOL, genie_eoln);
1919    a68_idf (A68_EXT, "rewindpossible", M_PROC_REF_FILE_BOOL, genie_reset_possible);
1920    a68_idf (A68_STD, "binpossible", M_PROC_REF_FILE_BOOL, genie_bin_possible);
1921    a68_idf (A68_STD, "compressible", M_PROC_REF_FILE_BOOL, genie_compressible);
1922    a68_idf (A68_STD, "getpossible", M_PROC_REF_FILE_BOOL, genie_get_possible);
1923    a68_idf (A68_STD, "putpossible", M_PROC_REF_FILE_BOOL, genie_put_possible);
1924    a68_idf (A68_STD, "reidfpossible", M_PROC_REF_FILE_BOOL, genie_reidf_possible);
1925    a68_idf (A68_STD, "resetpossible", M_PROC_REF_FILE_BOOL, genie_reset_possible);
1926    a68_idf (A68_STD, "setpossible", M_PROC_REF_FILE_BOOL, genie_set_possible);
1927  // Handling of files.
1928    m = a68_proc (M_INT, M_REF_FILE, M_STRING, M_CHANNEL, NO_MOID);
1929    a68_idf (A68_STD, "open", m, genie_open);
1930    a68_idf (A68_STD, "establish", m, genie_establish);
1931    m = a68_proc (M_VOID, M_REF_FILE, M_REF_STRING, NO_MOID);
1932    a68_idf (A68_STD, "associate", m, genie_associate);
1933    m = a68_proc (M_INT, M_REF_FILE, M_CHANNEL, NO_MOID);
1934    a68_idf (A68_EXT, "rewind", M_PROC_REF_FILE_VOID, genie_reset);
1935    a68_idf (A68_STD, "backspace", M_PROC_REF_FILE_VOID, genie_backspace);
1936    a68_idf (A68_STD, "close", M_PROC_REF_FILE_VOID, genie_close);
1937    a68_idf (A68_STD, "create", m, genie_create);
1938    a68_idf (A68_STD, "erase", M_PROC_REF_FILE_VOID, genie_erase);
1939    a68_idf (A68_STD, "lock", M_PROC_REF_FILE_VOID, genie_lock);
1940    a68_idf (A68_STD, "newline", M_PROC_REF_FILE_VOID, genie_new_line);
1941    a68_idf (A68_STD, "newpage", M_PROC_REF_FILE_VOID, genie_new_page);
1942    a68_idf (A68_STD, "reset", M_PROC_REF_FILE_VOID, genie_reset);
1943    a68_idf (A68_STD, "scratch", M_PROC_REF_FILE_VOID, genie_erase);
1944    a68_idf (A68_STD, "space", M_PROC_REF_FILE_VOID, genie_space);
1945    m = a68_proc (M_INT, M_REF_FILE, M_INT, NO_MOID);
1946    a68_idf (A68_STD, "set", m, genie_set);
1947    a68_idf (A68_STD, "seek", m, genie_set);
1948    m = a68_proc (M_VOID, M_ROW_SIMPLIN, NO_MOID);
1949    a68_idf (A68_STD, "read", m, genie_read);
1950    a68_idf (A68_STD, "readbin", m, genie_read_bin);
1951    a68_idf (A68_STD, "readf", m, genie_read_format);
1952    m = a68_proc (M_VOID, M_ROW_SIMPLOUT, NO_MOID);
1953    a68_idf (A68_STD, "printbin", m, genie_write_bin);
1954    a68_idf (A68_STD, "printf", m, genie_write_format);
1955    a68_idf (A68_STD, "print", m, genie_write);
1956    a68_idf (A68_STD, "writebin", m, genie_write_bin);
1957    a68_idf (A68_STD, "writef", m, genie_write_format);
1958    a68_idf (A68_STD, "write", m, genie_write);
1959    m = a68_proc (M_VOID, M_REF_FILE, M_ROW_SIMPLIN, NO_MOID);
1960    a68_idf (A68_STD, "get", m, genie_read_file);
1961    a68_idf (A68_STD, "getf", m, genie_read_file_format);
1962    a68_idf (A68_STD, "getbin", m, genie_read_bin_file);
1963    m = a68_proc (M_VOID, M_REF_FILE, M_ROW_SIMPLOUT, NO_MOID);
1964    a68_idf (A68_STD, "put", m, genie_write_file);
1965    a68_idf (A68_STD, "putf", m, genie_write_file_format);
1966    a68_idf (A68_STD, "putbin", m, genie_write_bin_file);
1967    m = a68_proc (M_VOID, M_REF_STRING, M_ROW_SIMPLIN, NO_MOID);
1968    a68_idf (A68_EXT, "gets", m, genie_get_text);
1969    a68_idf (A68_EXT, "getsf", m, genie_getf_text);
1970    m = a68_proc (M_VOID, M_REF_STRING, M_ROW_SIMPLOUT, NO_MOID);
1971    a68_idf (A68_EXT, "puts", m, genie_put_text);
1972    a68_idf (A68_EXT, "putsf", m, genie_putf_text);
1973    m = a68_proc (M_REF_STRING, M_REF_STRING, M_ROW_SIMPLOUT, NO_MOID);
1974    a68_idf (A68_EXT, "string", m, genie_string);
1975    a68_idf (A68_EXT, "stringf", m, genie_stringf);
1976    A68C_DEFIO (bits, bits, BITS);
1977    A68C_DEFIO (bool, bool, BOOL);
1978    A68C_DEFIO (char, char, CHAR);
1979    A68C_DEFIO (compl, complex, COMPLEX);
1980    A68C_DEFIO (complex, complex, COMPLEX);
1981    A68C_DEFIO (double, long_real, LONG_REAL);
1982    A68C_DEFIO (int, int, INT);
1983    A68C_DEFIO (longbits, long_bits, LONG_BITS);
1984    A68C_DEFIO (longcomplex, mp_complex, LONG_COMPLEX);
1985    A68C_DEFIO (longcompl, mp_complex, LONG_COMPLEX);
1986    A68C_DEFIO (longint, long_int, LONG_INT);
1987    A68C_DEFIO (longlongcomplex, long_mp_complex, LONG_LONG_COMPLEX);
1988    A68C_DEFIO (longlongcompl, long_mp_complex, LONG_LONG_COMPLEX);
1989    A68C_DEFIO (longlongint, long_mp_int, LONG_LONG_INT);
1990    A68C_DEFIO (longlongreal, long_mp_real, LONG_LONG_REAL);
1991    A68C_DEFIO (longreal, long_real, LONG_REAL);
1992    A68C_DEFIO (quad, long_mp_real, LONG_LONG_REAL);
1993    A68C_DEFIO (real, real, REAL);
1994    A68C_DEFIO (string, string, STRING);
1995    a68_idf (A68_EXT, "readline", M_PROC_STRING, genie_read_line);
1996  }
1997  
1998  //! @brief Set up standenv - extensions.
1999  
2000  void stand_extensions (void)
2001  {
2002  // UNIX things.
2003    MOID_T *m = A68_MCACHE (proc_int);
2004    a68_idf (A68_EXT, "rows", m, genie_rows);
2005    a68_idf (A68_EXT, "columns", m, genie_columns);
2006    a68_idf (A68_EXT, "argc", m, genie_argc);
2007    a68_idf (A68_EXT, "a68gargc", m, genie_a68g_argc);
2008    a68_idf (A68_EXT, "errno", m, genie_errno);
2009    a68_idf (A68_EXT, "fork", m, genie_fork);
2010    m = a68_proc (M_STRING, NO_MOID);
2011    a68_idf (A68_EXT, "getpwd", m, genie_pwd);
2012    m = a68_proc (M_INT, M_STRING, NO_MOID);
2013    a68_idf (A68_EXT, "setpwd", m, genie_cd);
2014    m = a68_proc (M_BOOL, M_STRING, NO_MOID);
2015    a68_idf (A68_EXT, "fileisdirectory", m, genie_file_is_directory);
2016    a68_idf (A68_EXT, "fileisblockdevice", m, genie_file_is_block_device);
2017    a68_idf (A68_EXT, "fileischardevice", m, genie_file_is_char_device);
2018    a68_idf (A68_EXT, "fileisregular", m, genie_file_is_regular);
2019  #if defined (S_ISFIFO)
2020    a68_idf (A68_EXT, "fileisfifo", m, genie_file_is_fifo);
2021  #endif
2022  #if defined (S_ISLNK)
2023    a68_idf (A68_EXT, "fileislink", m, genie_file_is_link);
2024  #endif
2025    m = a68_proc (M_BITS, M_STRING, NO_MOID);
2026    a68_idf (A68_EXT, "filemode", m, genie_file_mode);
2027    m = a68_proc (M_STRING, M_INT, NO_MOID);
2028    a68_idf (A68_EXT, "argv", m, genie_argv);
2029    a68_idf (A68_EXT, "a68gargv", m, genie_a68g_argv);
2030    a68_idf (A68_EXT, "reseterrno", A68_MCACHE (proc_void), genie_reset_errno);
2031    m = a68_proc (M_STRING, M_INT, NO_MOID);
2032    a68_idf (A68_EXT, "strerror", m, genie_strerror);
2033    m = a68_proc (M_INT, M_STRING, M_ROW_STRING, M_ROW_STRING, NO_MOID);
2034    a68_idf (A68_EXT, "exec", m, genie_exec);
2035    a68_idf (A68_EXT, "execve", m, genie_exec);
2036    m = a68_proc (M_PIPE, NO_MOID);
2037    a68_idf (A68_EXT, "createpipe", m, genie_create_pipe);
2038    m = a68_proc (M_INT, M_STRING, M_ROW_STRING, M_ROW_STRING, NO_MOID);
2039    a68_idf (A68_EXT, "execsub", m, genie_exec_sub);
2040    a68_idf (A68_EXT, "execvechild", m, genie_exec_sub);
2041    m = a68_proc (M_PIPE, M_STRING, M_ROW_STRING, M_ROW_STRING, NO_MOID);
2042    a68_idf (A68_EXT, "execsubpipeline", m, genie_exec_sub_pipeline);
2043    a68_idf (A68_EXT, "execvechildpipe", m, genie_exec_sub_pipeline);
2044    m = a68_proc (M_INT, M_STRING, M_ROW_STRING, M_ROW_STRING, M_REF_STRING, NO_MOID);
2045    a68_idf (A68_EXT, "execsuboutput", m, genie_exec_sub_output);
2046    a68_idf (A68_EXT, "execveoutput", m, genie_exec_sub_output);
2047    m = a68_proc (M_STRING, M_STRING, NO_MOID);
2048    a68_idf (A68_EXT, "getenv", m, genie_getenv);
2049    m = a68_proc (M_VOID, M_INT, NO_MOID);
2050    a68_idf (A68_EXT, "waitpid", m, genie_waitpid);
2051    m = a68_proc (M_ROW_INT, NO_MOID);
2052    a68_idf (A68_EXT, "utctime", m, genie_utctime);
2053    a68_idf (A68_EXT, "localtime", m, genie_localtime);
2054    m = a68_proc (M_INT, M_STRING, M_STRING, M_REF_INT, M_REF_INT, NO_MOID);
2055    a68_idf (A68_EXT, "grepinstring", m, genie_grep_in_string);
2056    a68_idf (A68_EXT, "grepinsubstring", m, genie_grep_in_substring);
2057    m = a68_proc (M_INT, M_STRING, M_STRING, M_REF_STRING, NO_MOID);
2058    a68_idf (A68_EXT, "subinstring", m, genie_sub_in_string);
2059  #if defined (HAVE_DIRENT_H)
2060    m = a68_proc (M_ROW_STRING, M_STRING, NO_MOID);
2061    a68_idf (A68_EXT, "getdirectory", m, genie_directory);
2062  #endif
2063  #if defined (HAVE_CURL)
2064    m = a68_proc (M_INT, M_REF_STRING, M_STRING, M_STRING, M_INT, NO_MOID);
2065    a68_idf (A68_EXT, "httpcontent", m, genie_http_content);
2066    a68_idf (A68_EXT, "httpscontent", m, genie_https_content);
2067  #endif
2068  }
2069  
2070  #if defined (HAVE_GNU_PLOTUTILS)
2071  
2072  void stand_plot (void)
2073  {
2074  // Drawing.
2075    MOID_T *m = a68_proc (M_BOOL, M_REF_FILE, M_STRING, M_STRING, NO_MOID);
2076    a68_idf (A68_EXT, "drawdevice", m, genie_make_device);
2077    a68_idf (A68_EXT, "makedevice", m, genie_make_device);
2078    m = a68_proc (M_REAL, M_REF_FILE, NO_MOID);
2079    a68_idf (A68_EXT, "drawaspect", m, genie_draw_aspect);
2080    m = a68_proc (M_VOID, M_REF_FILE, NO_MOID);
2081    a68_idf (A68_EXT, "drawclear", m, genie_draw_clear);
2082    a68_idf (A68_EXT, "drawerase", m, genie_draw_clear);
2083    a68_idf (A68_EXT, "drawflush", m, genie_draw_show);
2084    a68_idf (A68_EXT, "drawshow", m, genie_draw_show);
2085    m = a68_proc (M_VOID, M_REF_FILE, M_INT, NO_MOID);
2086    a68_idf (A68_EXT, "drawfillstyle", m, genie_draw_fillstyle);
2087    m = a68_proc (M_STRING, M_INT, NO_MOID);
2088    a68_idf (A68_EXT, "drawgetcolourname", m, genie_draw_get_colour_name);
2089    a68_idf (A68_EXT, "drawgetcolorname", m, genie_draw_get_colour_name);
2090    m = a68_proc (M_VOID, M_REF_FILE, M_REAL, M_REAL, M_REAL, NO_MOID);
2091    a68_idf (A68_EXT, "drawcolor", m, genie_draw_colour);
2092    a68_idf (A68_EXT, "drawcolour", m, genie_draw_colour);
2093    a68_idf (A68_EXT, "drawbackgroundcolor", m, genie_draw_background_colour);
2094    a68_idf (A68_EXT, "drawbackgroundcolour", m, genie_draw_background_colour);
2095    a68_idf (A68_EXT, "drawcircle", m, genie_draw_circle);
2096    a68_idf (A68_EXT, "drawball", m, genie_draw_atom);
2097    a68_idf (A68_EXT, "drawstar", m, genie_draw_star);
2098    m = a68_proc (M_VOID, M_REF_FILE, M_REAL, M_REAL, NO_MOID);
2099    a68_idf (A68_EXT, "drawpoint", m, genie_draw_point);
2100    a68_idf (A68_EXT, "drawline", m, genie_draw_line);
2101    a68_idf (A68_EXT, "drawmove", m, genie_draw_move);
2102    a68_idf (A68_EXT, "drawrect", m, genie_draw_rect);
2103    m = a68_proc (M_VOID, M_REF_FILE, M_CHAR, M_CHAR, M_ROW_CHAR, NO_MOID);
2104    a68_idf (A68_EXT, "drawtext", m, genie_draw_text);
2105    m = a68_proc (M_VOID, M_REF_FILE, M_ROW_CHAR, NO_MOID);
2106    a68_idf (A68_EXT, "drawlinestyle", m, genie_draw_linestyle);
2107    a68_idf (A68_EXT, "drawfontname", m, genie_draw_fontname);
2108    m = a68_proc (M_VOID, M_REF_FILE, M_REAL, NO_MOID);
2109    a68_idf (A68_EXT, "drawlinewidth", m, genie_draw_linewidth);
2110    m = a68_proc (M_VOID, M_REF_FILE, M_INT, NO_MOID);
2111    a68_idf (A68_EXT, "drawfontsize", m, genie_draw_fontsize);
2112    a68_idf (A68_EXT, "drawtextangle", m, genie_draw_textangle);
2113    m = a68_proc (M_VOID, M_REF_FILE, M_STRING, NO_MOID);
2114    a68_idf (A68_EXT, "drawcolorname", m, genie_draw_colour_name);
2115    a68_idf (A68_EXT, "drawcolourname", m, genie_draw_colour_name);
2116    a68_idf (A68_EXT, "drawbackgroundcolorname", m, genie_draw_background_colour_name);
2117    a68_idf (A68_EXT, "drawbackgroundcolourname", m, genie_draw_background_colour_name);
2118  }
2119  
2120  #endif
2121  
2122  #if defined (HAVE_CURSES)
2123  
2124  void stand_curses (void)
2125  {
2126    a68_idf (A68_EXT, "cursesstart", A68_MCACHE (proc_void), genie_curses_start);
2127    a68_idf (A68_EXT, "cursesend", A68_MCACHE (proc_void), genie_curses_end);
2128    a68_idf (A68_EXT, "cursesclear", A68_MCACHE (proc_void), genie_curses_clear);
2129    a68_idf (A68_EXT, "cursesrefresh", A68_MCACHE (proc_void), genie_curses_refresh);
2130    a68_idf (A68_EXT, "cursesgreen", A68_MCACHE (proc_void), genie_curses_green);
2131    a68_idf (A68_EXT, "cursescyan", A68_MCACHE (proc_void), genie_curses_cyan);
2132    a68_idf (A68_EXT, "cursesred", A68_MCACHE (proc_void), genie_curses_red);
2133    a68_idf (A68_EXT, "cursesyellow", A68_MCACHE (proc_void), genie_curses_yellow);
2134    a68_idf (A68_EXT, "cursesmagenta", A68_MCACHE (proc_void), genie_curses_magenta);
2135    a68_idf (A68_EXT, "cursesblue", A68_MCACHE (proc_void), genie_curses_blue);
2136    a68_idf (A68_EXT, "curseswhite", A68_MCACHE (proc_void), genie_curses_white);
2137    a68_idf (A68_EXT, "cursesgreeninverse", A68_MCACHE (proc_void), genie_curses_green_inverse);
2138    a68_idf (A68_EXT, "cursescyaninverse", A68_MCACHE (proc_void), genie_curses_cyan_inverse);
2139    a68_idf (A68_EXT, "cursesredinverse", A68_MCACHE (proc_void), genie_curses_red_inverse);
2140    a68_idf (A68_EXT, "cursesyellowinverse", A68_MCACHE (proc_void), genie_curses_yellow_inverse);
2141    a68_idf (A68_EXT, "cursesmagentainverse", A68_MCACHE (proc_void), genie_curses_magenta_inverse);
2142    a68_idf (A68_EXT, "cursesblueinverse", A68_MCACHE (proc_void), genie_curses_blue_inverse);
2143    a68_idf (A68_EXT, "curseswhiteinverse", A68_MCACHE (proc_void), genie_curses_white_inverse);
2144    MOID_T *m = A68_MCACHE (proc_char);
2145    a68_idf (A68_EXT, "cursesgetchar", m, genie_curses_getchar);
2146    m = a68_proc (M_VOID, M_CHAR, NO_MOID);
2147    a68_idf (A68_EXT, "cursesputchar", m, genie_curses_putchar);
2148    m = a68_proc (M_VOID, M_INT, M_INT, NO_MOID);
2149    a68_idf (A68_EXT, "cursesmove", m, genie_curses_move);
2150    m = A68_MCACHE (proc_int);
2151    a68_idf (A68_EXT, "curseslines", m, genie_curses_lines);
2152    a68_idf (A68_EXT, "cursescolumns", m, genie_curses_columns);
2153    m = a68_proc (M_BOOL, M_CHAR, NO_MOID);
2154    a68_idf (A68_EXT, "cursesdelchar", m, genie_curses_del_char);
2155  }
2156  
2157  #endif
2158  
2159  #if defined (HAVE_POSTGRESQL)
2160  
2161  void stand_postgresql (void)
2162  {
2163    MOID_T *m = a68_proc (M_INT, M_REF_FILE, M_STRING, M_REF_STRING, NO_MOID);
2164    a68_idf (A68_EXT, "pqconnectdb", m, genie_pq_connectdb);
2165    m = a68_proc (M_INT, M_REF_FILE, NO_MOID);
2166    a68_idf (A68_EXT, "pqfinish", m, genie_pq_finish);
2167    a68_idf (A68_EXT, "pqreset", m, genie_pq_reset);
2168    m = a68_proc (M_INT, M_REF_FILE, M_STRING, NO_MOID);
2169    a68_idf (A68_EXT, "pqparameterstatus", m, genie_pq_parameterstatus);
2170    a68_idf (A68_EXT, "pqexec", m, genie_pq_exec);
2171    a68_idf (A68_EXT, "pqfnumber", m, genie_pq_fnumber);
2172    m = a68_proc (M_INT, M_REF_FILE, NO_MOID);
2173    a68_idf (A68_EXT, "pqntuples", m, genie_pq_ntuples);
2174    a68_idf (A68_EXT, "pqnfields", m, genie_pq_nfields);
2175    a68_idf (A68_EXT, "pqcmdstatus", m, genie_pq_cmdstatus);
2176    a68_idf (A68_EXT, "pqcmdtuples", m, genie_pq_cmdtuples);
2177    a68_idf (A68_EXT, "pqerrormessage", m, genie_pq_errormessage);
2178    a68_idf (A68_EXT, "pqresulterrormessage", m, genie_pq_resulterrormessage);
2179    a68_idf (A68_EXT, "pqdb", m, genie_pq_db);
2180    a68_idf (A68_EXT, "pquser", m, genie_pq_user);
2181    a68_idf (A68_EXT, "pqpass", m, genie_pq_pass);
2182    a68_idf (A68_EXT, "pqhost", m, genie_pq_host);
2183    a68_idf (A68_EXT, "pqport", m, genie_pq_port);
2184    a68_idf (A68_EXT, "pqtty", m, genie_pq_tty);
2185    a68_idf (A68_EXT, "pqoptions", m, genie_pq_options);
2186    a68_idf (A68_EXT, "pqprotocolversion", m, genie_pq_protocolversion);
2187    a68_idf (A68_EXT, "pqserverversion", m, genie_pq_serverversion);
2188    a68_idf (A68_EXT, "pqsocket", m, genie_pq_socket);
2189    a68_idf (A68_EXT, "pqbackendpid", m, genie_pq_backendpid);
2190    m = a68_proc (M_INT, M_REF_FILE, M_INT, NO_MOID);
2191    a68_idf (A68_EXT, "pqfname", m, genie_pq_fname);
2192    a68_idf (A68_EXT, "pqfformat", m, genie_pq_fformat);
2193    m = a68_proc (M_INT, M_REF_FILE, M_INT, M_INT, NO_MOID);
2194    a68_idf (A68_EXT, "pqgetvalue", m, genie_pq_getvalue);
2195    a68_idf (A68_EXT, "pqgetisnull", m, genie_pq_getisnull);
2196  }
2197  
2198  #endif
2199  
2200  #if defined (BUILD_LINUX)
2201  void stand_linux (void)
2202  {
2203    a68_idf (A68_EXT, "sigsegv", A68_MCACHE (proc_void), genie_sigsegv);
2204  }
2205  #endif
2206  
2207  //! @brief Build the standard environ symbol table.
2208  
2209  void make_standard_environ (void)
2210  {
2211    stand_moids ();
2212    A68_MCACHE (proc_bool) = a68_proc (M_BOOL, NO_MOID);
2213    A68_MCACHE (proc_char) = a68_proc (M_CHAR, NO_MOID);
2214    A68_MCACHE (proc_complex_complex) = a68_proc (M_COMPLEX, M_COMPLEX, NO_MOID);
2215    A68_MCACHE (proc_int) = a68_proc (M_INT, NO_MOID);
2216    A68_MCACHE (proc_int_int) = a68_proc (M_INT, M_INT, NO_MOID);
2217    A68_MCACHE (proc_int_int_real) = a68_proc (M_REAL, M_INT, M_INT, NO_MOID);
2218    A68_MCACHE (proc_int_real) = a68_proc (M_REAL, M_INT, NO_MOID);
2219    A68_MCACHE (proc_int_real_real) = a68_proc (M_REAL, M_INT, M_REAL, NO_MOID);
2220    A68_MCACHE (proc_int_real_real_real) = a68_proc (M_REAL, M_INT, M_REAL, M_REAL, NO_MOID);
2221    A68_MCACHE (proc_real) = a68_proc (M_REAL, NO_MOID);
2222    A68_MCACHE (proc_real_int_real) = a68_proc (M_REAL, M_REAL, M_INT, NO_MOID);
2223    A68_MCACHE (proc_real_real_int_real) = a68_proc (M_REAL, M_REAL, M_REAL, M_INT, NO_MOID);
2224    A68_MCACHE (proc_real_real) = M_PROC_REAL_REAL;
2225    A68_MCACHE (proc_real_real_real) = a68_proc (M_REAL, M_REAL, M_REAL, NO_MOID);
2226    A68_MCACHE (proc_real_real_real_int) = a68_proc (M_INT, M_REAL, M_REAL, M_REAL, NO_MOID);
2227    A68_MCACHE (proc_real_real_real_real) = a68_proc (M_REAL, M_REAL, M_REAL, M_REAL, NO_MOID);
2228    A68_MCACHE (proc_real_real_real_real_real) = a68_proc (M_REAL, M_REAL, M_REAL, M_REAL, M_REAL, NO_MOID);
2229    A68_MCACHE (proc_real_real_real_real_real_real) = a68_proc (M_REAL, M_REAL, M_REAL, M_REAL, M_REAL, M_REAL, NO_MOID);
2230    A68_MCACHE (proc_real_ref_real_ref_int_void) = a68_proc (M_VOID, M_REAL, M_REF_REAL, M_REF_INT, NO_MOID);
2231    A68_MCACHE (proc_void) = a68_proc (M_VOID, NO_MOID);
2232    stand_prelude ();
2233    stand_mp_level_2 ();
2234    stand_mp_level_3 ();
2235    stand_transput ();
2236    stand_extensions ();
2237  #if (A68_LEVEL <= 2)
2238    stand_longlong_bits ();
2239  #endif
2240  #if defined (BUILD_LINUX)
2241    stand_linux ();
2242  #endif
2243  #if defined (HAVE_GSL)
2244    stand_gsl ();
2245  #endif
2246  #if defined (HAVE_MATHLIB)
2247    stand_mathlib ();
2248  #endif
2249  #if defined (HAVE_GNU_PLOTUTILS)
2250    stand_plot ();
2251  #endif
2252  #if defined (HAVE_CURSES)
2253    stand_curses ();
2254  #endif
2255  #if defined (HAVE_POSTGRESQL)
2256    stand_postgresql ();
2257  #endif
2258  }
     


© 2002-2024 J.M. van der Veer (jmvdveer@xs4all.nl)