  P A S - P. WOLFERS SOFTWARE: V2.1-E OF 31-AUG-2009  RUN THE 10-DEC-2009 AT 15:15:25     PAGE   1
 The Current Source File is "/home/wolfers/Soft/cpsh_kits/MXDV4_src/mxd_dcp_basinit.pas".

 The Current Compiled Module is ".standard.".

       C    1    1  {
       C    1    2   ******************************************************************************
       C    1    3   *                                                                            *
       C    1    4   *                                                                            *
       C    1    5   *                                                                            *
       C    1    6   *                        MMM    MMM   XXX      XXX  DDDDDDDD                 *
       C    1    7   *                        MMMM  MMMM    XXX    XXX   DDDDDDDDDD               *
       C    1    8   *                        MM MMMM MM     XXX  XXX    DD      DDD              *
       C    1    9   *                        MM  MM  MM      XXXXXX     DD       DD              *
       C    1   10   *                        MM      MM       XXXX      DD       DD              *
       C    1   11   *          T  H  E       MM      MM       XXXX      DD       DD              *
       C    1   12   *                        MM      MM      XXXXXX     DD       DD              *
       C    1   13   *                        MM      MM     XXX  XXX    DD      DDD              *
       C    1   14   *                        MM      MM    XXX    XXX   DDDDDDDDDD               *
       C    1   15   *                       MMMM    MMMM  XXX      XXX  DDDDDDDD                 *
       C    1   16   *                                                                            *
       C    1   17   *                                                                            *
       C    1   18   *                                                                            *
       C    1   19   *                 SSSSS Y     Y  SSSSS TTTTTTT EEEEEE M     M                *
       C    1   20   *                S       Y   Y  S         T    E      MM   MM                *
       C    1   21   *                S        Y Y   S         T    E      M M M M                *
       C    1   22   *                 SSSS     Y     SSSS     T    EEEEE  M  M  M                *
       C    1   23   *                     S    Y         S    T    E      M     M                *
       C    1   24   *                     S    Y         S    T    E      M     M  ..            *
       C    1   25   *                SSSSS     Y    SSSSS     T    EEEEEE M     M  ..            *
       C    1   26   *                                                                            *
       C    1   27   *                                                                            *
       C    1   28   *                                                                            *
       C    1   29   *              ---  Version  3.999 000 alpha -- 31/03/2010 ---               *
       C    1   30   *                                                                            *
       C    1   31   *                by :                                                        *
       C    1   32   *                                                                            *
       C    1   33   *                     P. Wolfers                                             *
       C    1   34   *                         c.n.r.s.                                           *
       C    1   35   *                         Institut Neel (MCMF), Bat F,                       *
       C    1   36   *                         B.P.  166 X   38042  Grenoble Cedex                *
       C    1   37   *                                                FRANCE.                     *
       C    1   38   *                                                                            *
       C    1   39   *                                                                            *
       C    1   40   ******************************************************************************
       C    1   41  
       C    1   42  
       C    1   43  ///////////////////////////////////////////////////////////////////////////////
       C    1   44  //                                                                           //
       C    1   45  //                                                                           //
       C    1   46  //                     Global Public Licence (GPL)                           //
       C    1   47  //                                                                           //
       C    1   48  //                                                                           //
       C    1   49  //    This license described in this file overrides all other licenses       //
       C    1   50  //    that might be specified in other files for this software.              //
       C    1   51  //                                                                           //
       C    1   52  //    This program is free software; you can redistribute it and/or          //
       C    1   53  //    modify it under the terms of the GNU Lesser General Public             //
       C    1   54  //    License as published by the Free Software Foundation; either           //
       C    1   55  //    version 2.1 of the License, or (at your option) any later version.     //
  P A S - P. WOLFERS SOFTWARE: V2.1-E OF 31-AUG-2009  RUN THE 10-DEC-2009 AT 15:15:25     PAGE   2
 The Current Source File is "/home/wolfers/Soft/cpsh_kits/MXDV4_src/mxd_dcp_basinit.pas".

 The Current Compiled Module is ".standard.".

       C    1   56  //                                                                           //
       C    1   57  //    This software is distributed in the hope that it will be useful,       //
       C    1   58  //    but WITHOUT ANY WARRANTY; without even the implied warranty of         //
       C    1   59  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU      //
       C    1   60  //    Library General Public License for more details.                       //
       C    1   61  //                                                                           //
       C    1   62  //    You should have received a copy of the GNU Lesser General Public       //
       C    1   63  //    License along with this library (see COPYING.LIB); if not, write to    //
       C    1   64  //    the Free Software Foundation :                                         //
       C    1   65  //                         Inc., 675 Mass Ave, Cambridge, MA 02139, USA.     //
       C    1   66  //                                                                           //
       C    1   67  ///////////////////////////////////////////////////////////////////////////////
       C    1   68  
       C    1   69  
       C    1   70  *******************************************************************************
       C    1   71  *                                                                             *
       C    1   72  *                                                                             *
       C    1   73  *            MXD    data    Compiler    Initialization    Module              *
       C    1   74  *                                                                             *
       C    1   75  *                                                                             *
       C    1   76  *******************************************************************************
       C    1   77  
       C    1   78  }
       C    1   79  
       C    1   80  {************     CPAS  version    *************}
       C    1   81  
       C    1   82  {
       C    1   83          *** Modification(s) from major version ***
       C    1   84  
       C    1   85  
       C    1   86                    ----
       C    1   87  
       C    1   88                   NOTHING
       C    1   89  
       C    1   90                    ----
       C    1   91  
       C    1   92  }
       C    1   93  
       C    1   94  
            1   95  module DCP_COMPILER_INIT;
            1   96  
            1   97  
            1   98    %include        'MXDSRC:mxd_dcp_env';         { Load the mxd global environment }
            1   99  
            1  100  
            1  101  
            1  102  
       C    1  103  {***********************************************}
       C    1  104  {*** Keyword Language Tree Creation routines ***}
       C    1  105  {***********************************************}
       C    1  106  
       C    1  107  
            1  108  procedure DEFINE_KEYWORDS;
       C    1  109  { Define all keywords of the MXD-V4 Language.
       C    1  110  }
  P A S - P. WOLFERS SOFTWARE: V2.1-E OF 31-AUG-2009  RUN THE 10-DEC-2009 AT 15:15:25     PAGE   3
 The Current Source File is "/home/wolfers/Soft/cpsh_kits/MXDV4_src/mxd_dcp_basinit.pas".

 The Current Compiled Module is "dcp_compiler_init".

       C    1  111  
            1  112  type
            1  113    kwd_rec = record
            1  114                ide:         string( 12 );
            1  115                sym:               symbol
            1  116              end;
            1  117  
            1  118    kwd_tbt(size: integer) = array[1..size] of kwd_rec;
            1  119  
            1  120  const
            1  121    kwd_tab = kwd_tbt[ 63,
            1  122                       [       'pragma',    pragmasy ],
            1  123                       [      'include',   includesy ], [       'chaine',    chainesy ],
            1  124                       [          'eof',      peofsy ], [          'end',       endsy ],
            1  125  
            1  126                       [        'macro',     macrosy ], [     'endmacro',  endmacrosy ],
            1  127                       [        'purge',     purgesy ], [     'macrolib',  macrolibsy ],
            1  128                       [    'macrocall', macrocallsy ], [        'error',     errorsy ],
            1  129                       [      'defined',   definedsy ], ['macro_defined',  mdefinedsy ],
            1  130  
            1  131                       [           'if',        ifsy ], [         'then',      thensy ],
            1  132                       [         'else',      elsesy ], [         'case',      casesy ],
            1  133                       [         'when',      whensy ], [    'otherwise',     othersy ],
            1  134  
            1  135                       [        'begin',     beginsy ], [           'do',        dosy ],
            1  136  
            1  137                       [       'repeat',    repeatsy ], [        'until',     untilsy ],
            1  138                       [        'while',     whilesy ], [          'for',       forsy ],
            1  139                       [           'to',        tosy ], [       'downto',    downtosy ], 
            1  140  
            1  141                       [     'openfile',      opensy ], [        'close',     closesy ],
            1  142                       [      'display',   displaysy ], [        'reply',     replysy ],
            1  143                       [         'read',      readsy ], [        'write',     writesy ],
            1  144                       [      'writeln',   writelnsy ], [     'writemsg',  writemsgsy ],
            1  145  
            1  146                       [         'type',      typesy ], [    'mfunction', mfunctionsy ],
            1  147                       [     'function',  functionsy ], [       'rvalue',    retvalsy ],
            1  148  
            1  149                       [         'cell',      cellsy ], [        'rcell',     rcellsy ],
            1  150                       [       'symtry',    symtrysy ], [       'center',    centersy ],
            1  151                       [     'genspace',  genspacesy ], [      'lattice',   latticesy ],
            1  152  
            1  153                       [        'fixed',     fixedsy ], [      'unfixed',   unfixedsy ],
            1  154                       [       'limits',    limitssy ],
            1  155  
            1  156                       [         'item',      itemsy ], [        'phase',     phasesy ],
            1  157                       [         'atom',      atomsy ], [        'catom',     catomsy ],
            1  158                       [       'moment',    momentsy ], [       'mdsdsp',    mdsdspsy ],
            1  159                       [ 'contribution',   contribsy ],
            1  160                       [     'lsqblock',  lsqblocksy ],
            1  161                       [     'wavevect',     wavevsy ], [     'npoladir',  npoladirsy ],
            1  162                       [     'magnetic',  magneticsy ],
            1  163                       [         'data',      datasy ], [      'clrdata',   clrdatasy ],
            1  164  
            1  165                       [       'option',    optionsy ], [      'soption',   soptionsy ]
  P A S - P. WOLFERS SOFTWARE: V2.1-E OF 31-AUG-2009  RUN THE 10-DEC-2009 AT 15:15:25     PAGE   4
 The Current Source File is "/home/wolfers/Soft/cpsh_kits/MXDV4_src/mxd_dcp_basinit.pas".

 The Current Compiled Module is "define_keywords".

            1  166  
            1  167                    ];
            1  168  
            1  169  
            1  170  
            1  171    procedure SETKEYWORD( in_var kname: string; skw: symbol; opkw: dcp_oper := no_op );
       C    1  172    { Sub-Routine to create a reserved keyword identifier.
       C    1  173      <kname>     is the the keyword string,
       C    1  174      <skw>       is its related symbol value and
       C    1  175      <opkw>      is the related operator if required.
       C    1  176    }
       C    1  177  
            1  178    var
            1  179      m, i:      integer;
            1  180      p, p1, p2: keyword_ptr;
            1  181      nm:        ide_string;
            1  182  
            1  183    begin { SETKEYWORD }
     1      1  184      NEW( p );
            1  185      with p^ do
            1  186      begin
     2      1  187        NEW( name, kname.length );
            1  188        name^     :=       kname;
            1  189        leftp := nil; rightp := nil;
            1  190        symb.sy   :=         skw;
            1  191        symb.op   :=        opkw
     1      1  192      end;
            1  193      p1 := keyword_tree;
            1  194      if p1 <> nil then
            1  195      begin
     2      1  196        repeat
     3      1  197          p2 := p1 { keep the memory of the last p1 };
            1  198          with p1^ do
            1  199          begin
     4      1  200            m := STR_MATCH( p^.name^, name^ );
            1  201            if m > 0 then  p1 := rightp else p1 := leftp
     3      1  202          end;
     2      1  203        until p1 = nil;
            1  204        if m > 0 then p2^.rightp := p else p2^.leftp := p
     1      1  205      end
            1  206      else keyword_tree := p
     0      1  207    end SETKEYWORD;
            1  208  
            1  209  
            1  210  
            1  211  
            1  212  begin { DEFINE_KEYWORDS }
     1      1  213    keyword_tree := nil;
            1  214  
       C    1  215    {**** Set keywords symbol operators (should be defined via a macro library) ****}
       C    1  216  
            1  217    SETKEYWORD(          'or',     lgorop,   or_op   );
            1  218    SETKEYWORD(         'xor',     lgorop,   xor_op  );
            1  219    SETKEYWORD(         'and',    lgandop,   and_op  );
            1  220    SETKEYWORD(         'not',      notop,   not_op  );
  P A S - P. WOLFERS SOFTWARE: V2.1-E OF 31-AUG-2009  RUN THE 10-DEC-2009 AT 15:15:25     PAGE   5
 The Current Source File is "/home/wolfers/Soft/cpsh_kits/MXDV4_src/mxd_dcp_basinit.pas".

 The Current Compiled Module is "define_keywords".

            1  221    SETKEYWORD(         'div',      mulop,   idiv_op );
            1  222    SETKEYWORD(         'mod',      mulop,   imod_op );
            1  223    SETKEYWORD(         'rem',      mulop,   irem_op );
            1  224  
       C    1  225    {**** Set keywords symbol ****}
       C    1  226  
            1  227    for ii := 1 to kwd_tab.size do
            1  228      with kwd_tab[ii] do
            1  229        SETKEYWORD( ide, sym, no_op );
            1  230  
       C    1  231    {**** Set application specific symbols ****}
       C    1  232  (*
       C    1  233    SET_SPECIFIC_SYMBOL( SETKEYWORD );
       C    1  234  *)
       C    1  235    {**** Set micellious symbol ****}
       C    1  236  
       C    1  237  
       C    1  238    {**** end of the keyword list ****}
       C    1  239  
     0      1  240  end DEFINE_KEYWORDS;
            1  241  
            1  242  
            1  243  
       C    1  244  { *** Init Generic support routines *** }
       C    1  245  
            1  246  type
            1  247    idt_typ = ( strty, intty, fltty, nulty );
            1  248  
            1  249  var
            1  250    conv_tab: array[stm_csi..stm_nop] of ent_ptr; { Conversion just befor stm_nop }
            1  251  
            1  252  
            1  253  
            1  254  function PTYPE( ty: idt_typ ): ide_ptr;
            1  255  begin
     1      1  256    case ty of
            1  257      strty: PTYPE := str_typ;
            1  258      intty: PTYPE := int_typ;
            1  259      fltty: PTYPE := flt_typ;
            1  260    otherwise
     2      1  261      PTYPE := nil
     1      1  262    end
     0      1  263  end PTYPE;
            1  264  
            1  265  
            1  266  procedure CREATE_STD_CONV;
            1  267  const
            1  268    nent = 7;
            1  269  
            1  270  type
            1  271    cv_entry = record
            1  272      ft, rt: idt_typ;
            1  273      stm:    ope_stm
            1  274    end;
            1  275  
  P A S - P. WOLFERS SOFTWARE: V2.1-E OF 31-AUG-2009  RUN THE 10-DEC-2009 AT 15:15:25     PAGE   6
 The Current Source File is "/home/wolfers/Soft/cpsh_kits/MXDV4_src/mxd_dcp_basinit.pas".

 The Current Compiled Module is "create_std_conv".

            1  276  
            1  277  var
            1  278    std_cv_tab: [static] array[1..nent] of cv_entry := [
            1  279        [ strty, intty, stm_csi ],  [ strty, fltty, stm_csf ],
            1  280        [ intty, intty, stm_cis ],  [ intty, fltty, stm_cif ],
            1  281        [ fltty, strty, stm_cfs ],  [ fltty, intty, stm_cfi ],
            1  282        [ fltty, intty, stm_rnd ]
            1  283      ];
            1  284  
            1  285    ent: ent_ptr;
            1  286  
            1  287  begin
     1      1  288    for ii := 1 to nent do
            1  289    with std_cv_tab[ii] do
            1  290    begin
     2      1  291      NEW( ent, entk_stm );
            1  292      with ent^ do
            1  293      begin
     3      1  294        ent_lnk := nil;
            1  295        ent_prv := nil;
            1  296        ent_typ := PTYPE( rt );
            1  297        ent_knd := entk_stm;
            1  298        ent_pt1 := PTYPE( ft ); ent_pt2 := nil;
            1  299        ent_cv1 := nil;
            1  300        ent_cv2 := nil;
            1  301        ent_stm := stm
     2      1  302      end;
            1  303      conv_tab[stm] := ent
     1      1  304    end
     0      1  305  end CREATE_STD_CONV;
            1  306  
            1  307  
            1  308  
            1  309  procedure SET_STM_DEF( var frs, lst: ent_ptr; ty1, ty2, tyr: idt_typ := nulty; cv1, cv2, stm: ope_stm := stm_nop
                     );
            1  310  var
            1  311    p: ent_ptr;
            1  312  e: ent_ptr;
            1  313  begin
     1      1  314    NEW( p, entk_stm );
            1  315    with p^ do
            1  316    begin
     2      1  317      ent_lnk := disp_tab[0].disp_ent;
            1  318      ent_prv := lst;
            1  319      ent_typ := PTYPE( tyr );
            1  320      ent_knd := entk_stm;
            1  321      ent_pt1 := PTYPE( ty1 ); ent_pt2 := PTYPE( ty2 );
            1  322      ent_cv1 := conv_tab[cv1];
            1  323      ent_cv2 := conv_tab[cv2];
            1  324      ent_stm := stm
       C    1  325  (*
       C    1  326  ;with p^ do
       C    1  327  begin
       C    1  328  ;WRITE( ' Created stm = ', ent_stm, '  -->  with (' );
       C    1  329  if ent_pt1 <> nil then WRITE( ' "', ent_pt1^.ide_name^, '"' );
  P A S - P. WOLFERS SOFTWARE: V2.1-E OF 31-AUG-2009  RUN THE 10-DEC-2009 AT 15:15:25     PAGE   7
 The Current Source File is "/home/wolfers/Soft/cpsh_kits/MXDV4_src/mxd_dcp_basinit.pas".

 The Current Compiled Module is "set_stm_def".

       C    1  330  if ent_pt2 <> nil then WRITE( ' "', ent_pt2^.ide_name^, '"' );
       C    1  331  WRITE( ' )' ); if ent_typ <> nil then WRITE( ': ', ent_typ^.ide_name^, '"' );
       C    1  332  WRITELN( ';' );
       C    1  333  end;
       C    1  334  *)
     1      1  335    end;
            1  336    if frs = nil then frs := p;
            1  337    disp_tab[0].disp_ent := p;
            1  338    lst := p
     0      1  339  end SET_STM_DEF;
            1  340  
            1  341  
            1  342  
            1  343  procedure SET_CREATE_STD_OPER;
            1  344  const
            1  345    ndfop = 70;
            1  346  
            1  347  type
            1  348    ope_rec = record
            1  349      op: dcp_oper;
            1  350      t1, t2, tr: idt_typ;
            1  351      c1, c2, cr: ope_stm
            1  352    end;
            1  353  
            1  354  
            1  355  [static] var
            1  356    p: ent_ptr;
            1  357  
            1  358    ope_itb: array[1..ndfop] of ope_rec := [
            1  359      [    not_op,  intty,  nulty,  intty, stm_nop, stm_nop, stm_not ],   {  1 - Logical not <int> -> <int> }
            1  360      [    not_op,  fltty,  nulty,  intty, stm_rnd, stm_nop, stm_not ],   {      Logical not <flt> -> <int> }
            1  361      [    sub_op,  intty,  nulty,  intty, stm_nop, stm_nop, stm_neg ],   {      Negate <int> -> <int> }
            1  362      [    sub_op,  fltty,  nulty,  fltty, stm_nop, stm_nop, stm_fng ],   {      Negate <flt> -> <flt> }
            1  363  
            1  364      [    pow_op,  intty,  intty,  intty, stm_nop, stm_nop, stm_iip ],   {  5 - Power <int>**<int> -> <int> }
            1  365      [    pow_op,  fltty,  intty,  fltty, stm_nop, stm_nop, stm_fip ],   {      Power <flt>**<int> -> <flt> }
            1  366      [    pow_op,  intty,  fltty,  fltty, stm_cif, stm_nop, stm_ffp ],   {      Power <int>**<flt> -> <flt> }
            1  367      [    pow_op,  fltty,  fltty,  fltty, stm_nop, stm_nop, stm_ffp ],   {      Power <flt>**<flt> -> <flt> }
            1  368  
            1  369      [    mul_op,  intty,  intty,  intty, stm_nop, stm_nop, stm_iml ],   {  9 - Multiply <int>*<int> -> <int> }
            1  370      [    mul_op,  intty,  fltty,  fltty, stm_cif, stm_nop, stm_fml ],   {      Multiply <int>*<flt> -> <flt> }
            1  371      [    mul_op,  fltty,  intty,  fltty, stm_nop, stm_cif, stm_fml ],   {      Multiply <flt>*<int> -> <flt> }
            1  372      [    mul_op,  fltty,  fltty,  fltty, stm_nop, stm_nop, stm_fml ],   {      Multiply <flt>*<flt> -> <flt> }
            1  373  
            1  374      [   idiv_op,  intty,  intty,  intty, stm_nop, stm_nop, stm_idv ],   { 13 - Integer Divide <int> div <int> ->
                     <int> }
            1  375      [   idiv_op,  intty,  fltty,  fltty, stm_nop, stm_rnd, stm_idv ],   {      Integer Divide <int> div <flt> ->
                     <int> }
            1  376      [   idiv_op,  fltty,  intty,  fltty, stm_rnd, stm_nop, stm_idv ],   {      Integer Divide <flt> div <int> ->
                     <int> }
            1  377      [   idiv_op,  fltty,  fltty,  fltty, stm_rnd, stm_rnd, stm_idv ],   {      Integer Divide <flt> div <flt> ->
                     <int> }
            1  378  
            1  379      [   imod_op,  intty,  intty,  intty, stm_nop, stm_nop, stm_mod ],   { 17 - Modulo <int> mod <int> -> <int> }
            1  380      [   imod_op,  intty,  fltty,  fltty, stm_nop, stm_rnd, stm_mod ],   {      Modulo <int> mod <flt> -> <int> }
  P A S - P. WOLFERS SOFTWARE: V2.1-E OF 31-AUG-2009  RUN THE 10-DEC-2009 AT 15:15:25     PAGE   8
 The Current Source File is "/home/wolfers/Soft/cpsh_kits/MXDV4_src/mxd_dcp_basinit.pas".

 The Current Compiled Module is "set_create_std_oper".

            1  381      [   imod_op,  fltty,  intty,  fltty, stm_rnd, stm_nop, stm_mod ],   {      Modulo <flt> mod <int> -> <int> }
            1  382      [   imod_op,  fltty,  fltty,  fltty, stm_rnd, stm_rnd, stm_mod ],   {      Modulo <flt> mod <flt> -> <int> }
            1  383  
            1  384      [   irem_op,  intty,  intty,  intty, stm_nop, stm_nop, stm_rem ],   { 21 - Remainder <int> rem <int> -> <int
                    > }
            1  385      [   irem_op,  intty,  fltty,  fltty, stm_nop, stm_rnd, stm_rem ],   {      Remainder <int> rem <flt> -> <int
                    > }
            1  386      [   irem_op,  fltty,  intty,  fltty, stm_rnd, stm_nop, stm_rem ],   {      Remainder <flt> rem <int> -> <int
                    > }
            1  387      [   irem_op,  fltty,  fltty,  fltty, stm_rnd, stm_rnd, stm_rem ],   {      Remainder <flt> rem <flt> -> <int
                    > }
            1  388  
            1  389      [    div_op,  intty,  intty,  intty, stm_cif, stm_cif, stm_fdv ],   { 25 - Divide <int>/<int> -> <int> }
            1  390      [    div_op,  intty,  fltty,  fltty, stm_cif, stm_nop, stm_fdv ],   {      Divide <int>/<flt> -> <flt> }
            1  391      [    div_op,  fltty,  intty,  fltty, stm_nop, stm_cif, stm_fdv ],   {      Divide <flt>/<int> -> <flt> }
            1  392      [    div_op,  fltty,  fltty,  fltty, stm_nop, stm_nop, stm_fdv ],   {      Divide <flt>/<flt> -> <flt> }
            1  393  
            1  394      [    add_op,  intty,  intty,  intty, stm_nop, stm_nop, stm_iad ],   { 29 - Add <int>+<int> -> <int> }
            1  395      [    add_op,  intty,  fltty,  fltty, stm_cif, stm_nop, stm_fad ],   {      Add <int>+<flt> -> <flt> }
            1  396      [    add_op,  fltty,  intty,  fltty, stm_nop, stm_cif, stm_fad ],   {      Add <flt>+<int> -> <flt> }
            1  397      [    add_op,  fltty,  fltty,  fltty, stm_nop, stm_nop, stm_fad ],   {      Add <flt>+<flt> -> <flt> }
            1  398  
            1  399      [    sub_op,  intty,  intty,  intty, stm_nop, stm_nop, stm_isb ],   { 33 - Substract <int>-<int> -> <int> }
            1  400      [    sub_op,  intty,  fltty,  fltty, stm_cif, stm_nop, stm_fsb ],   {      Substract <int>-<flt> -> <flt> }
            1  401      [    sub_op,  fltty,  intty,  fltty, stm_nop, stm_cif, stm_fsb ],   {      Substract <flt>-<int> -> <flt> }
            1  402      [    sub_op,  fltty,  fltty,  fltty, stm_nop, stm_nop, stm_fsb ],   {      Substract <flt>-<flt> -> <flt> }
            1  403  
            1  404      [ concat_op,  strty,  strty,  strty, stm_nop, stm_nop, stm_ssc ],   { 37 - Concate string <str>||<str> -> <s
                    tr> }
            1  405  
            1  406      [     lt_op,  strty,  strty,  intty, stm_nop, stm_nop, stm_slt ],   { 38 - Less Than <str>  < <str> -> <int>
                     }
            1  407      [     lt_op,  intty,  intty,  intty, stm_nop, stm_nop, stm_ilt ],   {      Less Than <int>  < <int> -> <flt>
                     }
            1  408      [     lt_op,  intty,  fltty,  intty, stm_cif, stm_nop, stm_flt ],   {      Less Than <int>  < <flt> -> <flt>
                     }
            1  409      [     lt_op,  fltty,  intty,  intty, stm_nop, stm_cif, stm_flt ],   {      Less Than <flt>  < <int> -> <flt>
                     }
            1  410      [     lt_op,  fltty,  fltty,  intty, stm_nop, stm_nop, stm_flt ],   {      Less Than <flt>  < <flt> -> <flt>
                     }
            1  411  
            1  412      [     le_op,  strty,  strty,  intty, stm_nop, stm_nop, stm_sle ],   { 43 - Less Than or Equal <str> <= <str>
                     -> <int> }
            1  413      [     le_op,  intty,  intty,  intty, stm_nop, stm_nop, stm_ile ],   {      Less Than or Equal <int> <= <int>
                     -> <flt> }
            1  414      [     le_op,  intty,  fltty,  intty, stm_cif, stm_nop, stm_fle ],   {      Less Than or Equal <int> <= <flt>
                     -> <flt> }
            1  415      [     le_op,  fltty,  intty,  intty, stm_nop, stm_cif, stm_fle ],   {      Less Than or Equal <flt> <= <int>
                     -> <flt> }
            1  416      [     le_op,  fltty,  fltty,  intty, stm_nop, stm_nop, stm_fle ],   {      Less Than or Equal <flt> <= <flt>
                     -> <flt> }
            1  417  
            1  418      [     ge_op,  strty,  strty,  intty, stm_nop, stm_nop, stm_sge ],   { 48 - Greater Than or Equal <str> >= <s
                    tr> -> <int> }
            1  419      [     ge_op,  intty,  intty,  intty, stm_nop, stm_nop, stm_ige ],   {      Greater Than or Equal <int> >= <i
                    nt> -> <flt> }
  P A S - P. WOLFERS SOFTWARE: V2.1-E OF 31-AUG-2009  RUN THE 10-DEC-2009 AT 15:15:25     PAGE   9
 The Current Source File is "/home/wolfers/Soft/cpsh_kits/MXDV4_src/mxd_dcp_basinit.pas".

 The Current Compiled Module is "set_create_std_oper".

            1  420      [     ge_op,  intty,  fltty,  intty, stm_cif, stm_nop, stm_fge ],   {      Greater Than or Equal <int> >= <f
                    lt> -> <flt> }
            1  421      [     ge_op,  fltty,  intty,  intty, stm_nop, stm_cif, stm_fge ],   {      Greater Than or Equal <flt> >= <i
                    nt> -> <flt> }
            1  422      [     ge_op,  fltty,  fltty,  intty, stm_nop, stm_nop, stm_fge ],   {      Greater Than or Equal <flt> >= <f
                    lt> -> <flt> }
            1  423  
            1  424      [     gt_op,  strty,  strty,  intty, stm_nop, stm_nop, stm_sgt ],   { 53 - Greater Than <str> > <str> -> <in
                    t> }
            1  425      [     gt_op,  intty,  intty,  intty, stm_nop, stm_nop, stm_igt ],   {      Greater Than <int> > <int> -> <fl
                    t> }
            1  426      [     gt_op,  intty,  fltty,  intty, stm_cif, stm_nop, stm_fgt ],   {      Greater Than <int> > <flt> -> <fl
                    t> }
            1  427      [     gt_op,  fltty,  intty,  intty, stm_nop, stm_cif, stm_fgt ],   {      Greater Than <flt> > <int> -> <fl
                    t> }
            1  428      [     gt_op,  fltty,  fltty,  intty, stm_nop, stm_nop, stm_fgt ],   {      Greater Than <flt> > <flt> -> <fl
                    t> }
            1  429  
            1  430      [     eq_op,  strty,  strty,  intty, stm_nop, stm_nop, stm_seq ],   { 58 - Equal <str> = <str> -> <int> }
            1  431      [     eq_op,  intty,  intty,  intty, stm_nop, stm_nop, stm_ieq ],   {      Equal <int> = <int> -> <flt> }
            1  432      [     eq_op,  intty,  fltty,  intty, stm_cif, stm_nop, stm_feq ],   {      Equal <int> = <flt> -> <flt> }
            1  433      [     eq_op,  fltty,  intty,  intty, stm_nop, stm_cif, stm_feq ],   {      Equal <flt> = <int> -> <flt> }
            1  434      [     eq_op,  fltty,  fltty,  intty, stm_nop, stm_nop, stm_feq ],   {      Equal <flt> = <flt> -> <flt> }
            1  435  
            1  436      [     ne_op,  strty,  strty,  intty, stm_nop, stm_nop, stm_sne ],   { 63 - Not Equal <str> <> <str> -> <int>
                     }
            1  437      [     ne_op,  intty,  intty,  intty, stm_nop, stm_nop, stm_ine ],   {      Not Equal <int> <> <int> -> <flt>
                     }
            1  438      [     ne_op,  intty,  fltty,  intty, stm_cif, stm_nop, stm_fne ],   {      Not Equal <int> <> <flt> -> <flt>
                     }
            1  439      [     ne_op,  fltty,  intty,  intty, stm_nop, stm_cif, stm_fne ],   {      Not Equal <flt> <> <int> -> <flt>
                     }
            1  440      [     ne_op,  fltty,  fltty,  intty, stm_nop, stm_nop, stm_fne ],   {      Not Equal <flt> <> <flt> -> <flt>
                     }
            1  441  
            1  442      [    and_op,  intty,  intty,  intty, stm_nop, stm_nop, stm_and ],   { 68 - Logical and <int> and <int> -> <i
                    nt> }
            1  443      [     or_op,  intty,  intty,  intty, stm_nop, stm_nop, stm_or  ],   {      Logical Inclusive or <int> or <in
                    t> -> <int> }
            1  444      [    xor_op,  intty,  fltty,  intty, stm_cif, stm_nop, stm_xor ]    {      Logical Exclusive or <int> xor <i
                    nt> -> <int> }
            1  445    ];
            1  446  
            1  447  var ent: ent_ptr;
            1  448  begin { SET_CREATE_STD_OPER }
     1      1  449    CREATE_STD_CONV;
            1  450    for ii := 1 to ndfop do
            1  451      with ope_itb[ii], mop_tab[op] do
            1  452        SET_STM_DEF( mop_first, mop_last, t1, t2, tr, c1, c2, cr )
     0      1  453  end SET_CREATE_STD_OPER;
            1  454  
            1  455  
            1  456  
            1  457  procedure CREATE_STM_FUNCTION;
            1  458  const
  P A S - P. WOLFERS SOFTWARE: V2.1-E OF 31-AUG-2009  RUN THE 10-DEC-2009 AT 15:15:25     PAGE  10
 The Current Source File is "/home/wolfers/Soft/cpsh_kits/MXDV4_src/mxd_dcp_basinit.pas".

 The Current Compiled Module is "create_stm_function".

            1  459    ndfnc = 22;
            1  460    ndstm = 28;
            1  461  
            1  462  type
            1  463    fnc_rec = record
            1  464      nam: ide_string;
            1  465      nen:    integer
            1  466    end;
            1  467  
            1  468    stf_rec = record
            1  469      t1, t2, tr: idt_typ;
            1  470      c1, c2, cr: ope_stm
            1  471    end;
            1  472  
            1  473  
            1  474  [static] var
            1  475    ide: ide_ptr;
            1  476    stm: ent_ptr;
            1  477    ien: integer;
            1  478  
            1  479    fnc_tab: array[1..ndfnc] of fnc_rec := [
            1  480      [   'round', 2 ], [   'trunc', 2 ],
            1  481      [     'abs', 2 ], [    'sqrt', 2 ],
            1  482      [   'cosr',  1 ], [    'sinr', 1 ], [   'tanr', 1 ],
            1  483      [   'cosd',  1 ], [    'sind', 1 ], [   'tand', 1 ],
            1  484      [  'acosr',  1 ], [   'asinr', 1 ], [  'atanr', 1 ], [  'phaser', 1 ],
            1  485      [  'acosd',  1 ], [   'asind', 1 ], [  'atand', 1 ], [  'phased', 1 ],
            1  486      [    'exp',  2 ], [      'ln', 2 ], [   'tanh', 1 ],
            1  487      [ 'bess_j',  1 ]
            1  488    ];
            1  489  
            1  490    stm_itb: array[1..ndstm] of stf_rec := [
            1  491      [ fltty,  nulty,  intty, stm_nop, stm_nop,    stm_rnd ],    {  1 - ROUND( <flt> ) -> <int> }
            1  492      [ strty,  nulty,  intty, stm_csf, stm_nop,    stm_rnd ],    {      ROUND( <str> ) -> <int> }
            1  493  
            1  494      [ fltty,  nulty,  intty, stm_nop, stm_nop,    stm_cfi ],    {  3 - TRUNC( <flt> ) -> <int> }
            1  495      [ strty,  nulty,  intty, stm_csf, stm_nop,    stm_cfi ],    {      TRUNC( <str> ) -> <int> }
            1  496  
            1  497      [ intty,  nulty,  intty, stm_nop, stm_nop,   stm_iabs ],    {  5 - ABS( <int> )   -> <int> }
            1  498      [ fltty,  nulty,  fltty, stm_nop, stm_nop,   stm_fabs ],    {      ABS( <flt> )   -> <flt> }
            1  499  
            1  500      [ fltty,  nulty,  fltty, stm_nop, stm_nop,   stm_sqrt ],    {  7 - SQRT( <flt> )  -> <flt> }
            1  501      [ intty,  nulty,  fltty, stm_cif, stm_nop,   stm_sqrt ],    {      SQRT( <int> )  -> <flt> }
            1  502  
            1  503      [ fltty,  nulty,  fltty, stm_nop, stm_nop,   stm_cosr ],    {  9 - COSR( <flt> )  -> <flt> }
            1  504      [ fltty,  nulty,  fltty, stm_nop, stm_nop,   stm_sinr ],    {      SINR( <flt> )  -> <flt> }
            1  505      [ fltty,  nulty,  fltty, stm_nop, stm_nop,   stm_tanr ],    {      TANR( <flt> )  -> <flt> }
            1  506  
            1  507      [ fltty,  nulty,  fltty, stm_nop, stm_nop,   stm_cosd ],    { 12 - COSD( <flt> )  -> <flt> }
            1  508      [ fltty,  nulty,  fltty, stm_nop, stm_nop,   stm_sind ],    {      SIND( <flt> )  -> <flt> }
            1  509      [ fltty,  nulty,  fltty, stm_nop, stm_nop,   stm_tand ],    {      TAND( <flt> )  -> <flt> }
            1  510  
            1  511      [ fltty,  nulty,  fltty, stm_nop, stm_nop,  stm_acosr ],    { 15 - ACOSR( <flt> )  -> <flt> }
            1  512      [ fltty,  nulty,  fltty, stm_nop, stm_nop,  stm_asinr ],    {      ASINR( <flt> )  -> <flt> }
            1  513      [ fltty,  nulty,  fltty, stm_nop, stm_nop,  stm_atanr ],    {      ATANR( <flt> )  -> <flt> }
  P A S - P. WOLFERS SOFTWARE: V2.1-E OF 31-AUG-2009  RUN THE 10-DEC-2009 AT 15:15:25     PAGE  11
 The Current Source File is "/home/wolfers/Soft/cpsh_kits/MXDV4_src/mxd_dcp_basinit.pas".

 The Current Compiled Module is "create_stm_function".

            1  514      [ fltty,  fltty,  fltty, stm_nop, stm_nop, stm_phaser ],    {      ATANR( <flt>, <flt> ) -> <flt> }
            1  515  
            1  516      [ fltty,  nulty,  fltty, stm_nop, stm_nop,  stm_acosd ],    { 19 - ACOSD( <flt> )  -> <flt> }
            1  517      [ fltty,  nulty,  fltty, stm_nop, stm_nop,  stm_asind ],    {      ASIND( <flt> )  -> <flt> }
            1  518      [ fltty,  nulty,  fltty, stm_nop, stm_nop,  stm_atand ],    {      ATAND( <flt> )  -> <flt> }
            1  519      [ fltty,  fltty,  fltty, stm_nop, stm_nop, stm_phased ],    {      ATAND( <flt>, <flt> ) -> <flt> }
            1  520  
            1  521      [ fltty,  nulty,  fltty, stm_nop, stm_nop,    stm_exp ],    { 23 - EXP( <flt> -> <flt> }
            1  522      [ intty,  nulty,  fltty, stm_cif, stm_nop,    stm_exp ],    {      EXP( <int> -> <flt> }
            1  523  
            1  524      [ fltty,  nulty,  fltty, stm_nop, stm_nop,     stm_ln ],    { 25 - LN( <flt> -> <flt> }
            1  525      [ intty,  nulty,  fltty, stm_cif, stm_nop,     stm_ln ],    {      LN( <int> -> <flt> }
            1  526      [ fltty,  nulty,  fltty, stm_nop, stm_nop,   stm_tanh ],    {      TANH( <flt> -> <flt> }
            1  527  
            1  528      [ fltty,  fltty,  fltty, stm_nop, stm_nop,  stm_bessj ]     { 28 - BESS_J( <flt> ) -> <flt> }
            1  529    ];
            1  530  
            1  531  begin
     1      1  532    ien := 0;
            1  533    for ii := 1 to ndfnc do
            1  534    with fnc_tab[ii] do
            1  535    begin
     2      1  536      sy_ident := nam;
            1  537      ide := IDE_NEW( cla_generic, form_null );
            1  538      with ide^ do
            1  539      begin
     3      1  540        for jj := 1 to nen do
            1  541        begin
     4      1  542          ien := ien + 1;
            1  543          with stm_itb[ien] do
            1  544            SET_STM_DEF( ideg_first, ideg_last, t1, t2, tr, c1, c2, cr );
     3      1  545        end
     2      1  546      end
     1      1  547    end
     0      1  548  end CREATE_STM_FUNCTION;
            1  549  
            1  550  
            1  551  
            1  552  
            1  553  
            1  554  
       C    1  555  {***********************************************}
       C    1  556  {***    Standard types Creation routines     ***}
       C    1  557  {***********************************************}
       C    1  558  
       C    1  559  
            1  560  procedure DEFINE_PRM_OBJECT;
       C    1  561  { Define all Standard objects :
       C    1  562    The basic types : STRING, INTEGER, FLOAT,
       C    1  563    All predefined identifier (for Least-Squares and System),
       C    1  564    All standard functions.
       C    1  565  }
       C    1  566  
            1  567  const
            1  568     sysnam_cygwin = 'windows-cygwin';
  P A S - P. WOLFERS SOFTWARE: V2.1-E OF 31-AUG-2009  RUN THE 10-DEC-2009 AT 15:15:25     PAGE  12
 The Current Source File is "/home/wolfers/Soft/cpsh_kits/MXDV4_src/mxd_dcp_basinit.pas".

 The Current Compiled Module is "define_prm_object".

            1  569     sysnam_wnt    =        'windows';
            1  570     sysnam_unix   =           'unix';
            1  571     sysnam_vms    =        'openvms';
            1  572  
            1  573     n_std_fnc =  39;
            1  574  
            1  575  type
            1  576     std_fty = array[1..n_std_fnc] of record
            1  577       std:      std_fnc;
            1  578       nam:   ide_string;
            1  579       typ:      idt_typ;
            1  580       nfp:        sbyte
            1  581     end;
            1  582  
            1  583  const
            1  584  
            1  585    std_ftab = std_fty[ [     std_string,       'instring', strty,  1], {  1 }
            1  586                        [     std_substr,         'substr', strty,  1],
            1  587                        [     std_nindex,          'index', intty,  2],
            1  588                        [    std_slength,         'length', intty,  1],
            1  589                        [    std_setcase,       'set_case', strty,  2], {  5 }
            1  590                        [    std_checkch,     'check_char', intty,  2],
            1  591                        [   std_checknst, 'numeric_string', intty,  1],
            1  592                        [   std_selement,        'element', strty,  1],
            1  593                        [  std_rmcomment,    'sup_comment', strty,  1],
            1  594                        [ std_id_replace,     'substitute', strty,  2], { 10 }
            1  595                        [  std_id_insert,   'insert_ident', intty,  1],
            1  596                        [  std_id_remove,   'remove_ident', intty,  1],
            1  597                        [    std_filespc,       'file_spc', strty,  1],
            1  598                        [       std_time,       'sys_time', strty,  0],
            1  599                        [       std_date,       'sys_date', strty,  0], { 15 }
            1  600                        [      std_spawn,      'sys_spawn', intty,  1],
            1  601                        [        std_run,   'sys_run_proc', intty,  1],
            1  602                        [       std_exec,'sys_create_proc', intty,  1],
            1  603                        [       std_wait,  'sys_wait_proc', intty,  1],
            1  604                        [       std_exit,           'exit', intty,  0], { 20 }
            1  605                        [      std_dfdir,    'default_dir', strty,  0],
            1  606                        [      std_chdir,     'change_dir', intty,  1],
            1  607                        [     std_getenv,     'sys_getenv', strty,  1],
            1  608                        [     std_setenv,     'sys_setenv', intty,  1],
            1  609                        [    std_getpath,    'sys_getpath', intty,  2], { 25 }
            1  610                        [    std_setpath,    'sys_setpath', intty,  2],
            1  611                        [    std_f_exist,     'file_exist', intty,  1],
            1  612                        [   std_f_rename,    'file_rename', intty,  2],
            1  613                        [   std_f_delete,    'file_delete', intty,  1],
            1  614                        [    std_mxdappl,   'run_mxd_appl', nulty,  1], { 30 }
            1  615                        [     std_select,         'select', fltty,  2],
            1  616                        [     std_intsel,         'intsel', fltty,  3],
            1  617                        [       std_summ,           'summ', fltty,  2],
            1  618                        [     std_sumhkl,         'sumhkl', fltty,  1],
            1  619                        [     std_inttab,   'integr_table', fltty,  3], { 35 }
            1  620                        [     std_integr,         'integr', fltty,  3],
            1  621                        [    std_itempar,     'item_field', fltty,  2],
            1  622                        [      std_ardim,      'array_dim', intty,  1],
            1  623                        [   std_arsearch,   'array_search', intty,  2]
  P A S - P. WOLFERS SOFTWARE: V2.1-E OF 31-AUG-2009  RUN THE 10-DEC-2009 AT 15:15:25     PAGE  13
 The Current Source File is "/home/wolfers/Soft/cpsh_kits/MXDV4_src/mxd_dcp_basinit.pas".

 The Current Compiled Module is "define_prm_object".

            1  624  
            1  625  
            1  626                      ];
            1  627  
            1  628  var
            1  629    ip: ide_ptr;
            1  630    i0: integer;
            1  631    ln:  string;
            1  632  
            1  633    procedure PREDEFINE_T( in_var nam:             string;
            1  634                                  typ:           typ_form  );
       C    1  635    { Sub-Routine to create an identifier :
       C    1  636        <nam>     is the identifier string of name,
       C    1  637        <typ>     is the kind (as string, integer or float, or array of ... the sames),
       C    1  638    }
       C    1  639  
            1  640    var
            1  641      ids: str_ptr;
            1  642  
            1  643    begin
     1      1  644      sy_ident := nam;
            1  645      ip := IDE_NEW( cla_type, typ );             { Create the predefined identifier in the current lex }
       C    1  646      { For a Builtin Function set the appropriate specification value }
            1  647      ip^.idet_form := typ
     0      1  648    end PREDEFINE_T;
            1  649  
            1  650  
            1  651    procedure PREDEFINE_V( in_var nam:             string;
            1  652                                  typ:           typ_form );
       C    1  653    { Sub-Routine to create an identifier :
       C    1  654        <nam>     is the identifier string of name,
       C    1  655        <typ>     is the kind (as string, integer or float, or array of ... the sames),
       C    1  656    }
       C    1  657  
            1  658    var
            1  659      ids: str_ptr;
            1  660  
            1  661    begin
     1      1  662      sy_ident := nam;
            1  663      ip := IDE_NEW( cla_varbl, typ );            { Create the predefined identifier in the current lex }
       C    1  664      { For a Builtin Function set the appropriate specification value }
            1  665      ip^.idev_form := typ
     0      1  666    end PREDEFINE_V;
            1  667  
            1  668  
            1  669    procedure PREDEFINE_S(        fnc:  std_fnc := std_noop;
            1  670                           in_var nam:               string;
            1  671                                  typ:              idt_typ;
            1  672                                  npa:  integer :=        0 );
       C    1  673    { Sub-Routine to create an identifier :
       C    1  674        <nam>     is the identifier string of name,
       C    1  675        <typ>     is the typ of result (as string, integer or float, or array of ... the sames),
       C    1  676        <fnc>     is the internal function code (or std_noop for variables or types),
       C    1  677        <npa>     is the minimum number of parameters of the function, or -1 to define a type identifier.
       C    1  678    }
  P A S - P. WOLFERS SOFTWARE: V2.1-E OF 31-AUG-2009  RUN THE 10-DEC-2009 AT 15:15:25     PAGE  14
 The Current Source File is "/home/wolfers/Soft/cpsh_kits/MXDV4_src/mxd_dcp_basinit.pas".

 The Current Compiled Module is "PRC_00000003".

            1  679    var
            1  680      fpf, fpl,
            1  681      idp, idt: ide_ptr;
            1  682      ent:      ent_ptr;
            1  683  
            1  684    begin
     1      1  685      NEW( ent, entk_std );
            1  686      with ent^ do
            1  687      begin
     2      1  688        ent_lnk :=          nil;
            1  689        ent_prv :=          nil;
            1  690        ent_typ := PTYPE( typ );
            1  691        ent_knd :=     entk_std;
            1  692        ent_frl :=          nil;
            1  693        ent_npa :=          npa;
            1  694        ent_dsp :=            0;
            1  695        ent_ope :=        no_op;
            1  696        ent_std :=          fnc
     1      1  697      end;
            1  698  
            1  699      sy_ident := nam;
            1  700      idp := IDE_NEW( cla_standard, form_null );   { Create the predefined identifier in the current lex }
            1  701      with idp^ do
            1  702      begin
     2      1  703        ideg_first := ent;
            1  704        ideg_last  := ent
     1      1  705      end
     0      1  706    end PREDEFINE_S;
            1  707  
            1  708  
            1  709    function STR_IDE_VALUE( in_var str: string ): str_ptr;
            1  710    var
            1  711      sp: str_ptr;
            1  712  
            1  713    begin
     1      1  714      if str.length <> 0 then begin  NEW( sp, str.length ); sp^ := str  end
            1  715                         else sp := nil;
            1  716      STR_IDE_VALUE := sp
     0      1  717    end STR_IDE_VALUE;
            1  718  
            1  719  
            1  720  
            1  721  begin { DEFINE_PRM_OBJECT }
       C    1  722    { Init the operator definition table }
     1      1  723    for op := dcp_oper"first to dcp_oper"last do
            1  724    with mop_tab[op] do
            1  725    begin  mop_first := nil; mop_last := nil  end;
            1  726  
            1  727    curr_disp := -1;                              { Initialize the display to empty }
            1  728    curr_lex  :=  0;
            1  729    DISPLAY_NEW;                                  { Create the predefined display (display level 0) }
            1  730  
       C    1  731    { *** Define the standard types *** }
       C    1  732  
            1  733    PREDEFINE_T(   'string', form_valstr );       { Define the string type with sequence number 0 }
  P A S - P. WOLFERS SOFTWARE: V2.1-E OF 31-AUG-2009  RUN THE 10-DEC-2009 AT 15:15:25     PAGE  15
 The Current Source File is "/home/wolfers/Soft/cpsh_kits/MXDV4_src/mxd_dcp_basinit.pas".

 The Current Compiled Module is "define_prm_object".

            1  734    str_typ := ip;
            1  735    PREDEFINE_T(  'integer', form_valint );       { Define the integer type with sequence number 1 }
            1  736    int_typ := ip;
            1  737    PREDEFINE_T(    'float', form_valflt );       { Define the float type with sequence number 2 }
            1  738    flt_typ := ip;
            1  739    PREDEFINE_T( 'variable', form_valflt );       { Define the Least-Squares Variable (a kind of float type, with 
                    related std. error) }
            1  740    with ip^ do
            1  741    begin
     2      1  742      idet_flags  := idet_flags + [objf_spdef,objf_sigma,objf_lsqob,objf_lsqva];
            1  743      idet_spcact := LSQVAR_TYPE                  { Set the specific MXD-V3 Variable statement action for creation
                     and assignation }
     1      1  744    end;
            1  745  
            1  746    PREDEFINE_T(    'param', form_valflt );       { Define the Least-Squares Variable (a kind of float type, with 
                    related std. error) }
            1  747    with ip^ do
            1  748    begin
     2      1  749      idet_flags  := idet_flags + [objf_spdef,objf_noass,objf_sigma,objf_lsqob,objf_lsqpa];
            1  750      idet_spcact := LSQEXP_TYPE                  { Set the specific MXD-V3 Param statement action for definition 
                    }
     1      1  751    end;
            1  752  
            1  753    PREDEFINE_T(  'string_array', form_wscala );  { Define the wild scalar type }
            1  754    PREDEFINE_T(  'string_array', form_sarray );  { Define the wild string array type }
            1  755    PREDEFINE_T( 'integer_array', form_iarray );  { Define the wild integer array type }
            1  756    PREDEFINE_T(   'float_array', form_farray );  { Define the wild float array type }
            1  757    PREDEFINE_T(    'wild_array', form_warray );  { Define the wild array type }
            1  758    PREDEFINE_T(   'wild_object',   form_wild );  { Define the wild type }
            1  759  
       C    1  760    { Define all standard primitive (intrinsic) operators actions }
            1  761    SET_CREATE_STD_OPER;                          { Define all standard primitive operators }
            1  762    CREATE_STM_FUNCTION;                          { Define all standard primitive functions }
            1  763  
       C    1  764    { Create all MXD system identifier }
            1  765    PREDEFINE_V( '$sys_mxdlib', form_valstr );    { Create the mxdlib path string identifier }
            1  766    ip^.str := STR_IDE_VALUE( sy_maclst );
            1  767    io_libpath  := ip;
            1  768  
            1  769    PREDEFINE_V( '$sys_command', form_valstr );   { Create the Command identifier }
            1  770    ip^.str := STR_IDE_VALUE( argv[0]^ );
            1  771  
            1  772    PREDEFINE_V( '$sys_cmdline', form_valstr );   { Create the MXD command line string }
            1  773    with ip^ do
            1  774    begin
     2      1  775      ln := argv[0]^;
            1  776      for  ii := 1 to argc - 1 do  ln := ln||' '||argv[ii]^;
            1  777      ip^.str := STR_IDE_VALUE( ln )
     1      1  778    end;
            1  779  
            1  780    PREDEFINE_V(   '$sys_nparm', form_valint );   { Create the MXD command number of arguments }
            1  781    i0 := argc - 1;
            1  782    ip^.int := i0;
            1  783  
            1  784    PREDEFINE_V(    '$sys_parm', form_tabstr );   { Create the arguments string array }
  P A S - P. WOLFERS SOFTWARE: V2.1-E OF 31-AUG-2009  RUN THE 10-DEC-2009 AT 15:15:25     PAGE  16
 The Current Source File is "/home/wolfers/Soft/cpsh_kits/MXDV4_src/mxd_dcp_basinit.pas".

 The Current Compiled Module is "define_prm_object".

            1  785    with ip^ do
            1  786    begin
     2      1  787      NEW( idev_asr );
            1  788      with idev_asr^ do
            1  789      begin
     3      1  790        asr_sub := nil; asr_stp := 1;
            1  791        asr_min := 1; asr_siz :=  argc - 1;
            1  792        asr_dsp := curr_disp; asr_fix := false
     2      1  793      end;
            1  794      NEW( aas, i0 );
            1  795      with aas^ do
            1  796        for ii := 1 to i0 do
            1  797          ide_stb[ii] := STR_IDE_VALUE( argv[ii]^ )
     1      1  798    end;
            1  799  
            1  800  
       C    1  801    { Define the System Identification Variable }
            1  802    PREDEFINE_V(  '$sys_system', form_valstr );   { Define $sys_system, the O.S. environment string identifier }
            1  803    with ip^ do
            1  804    begin
     2      1  805      if BOOLEAN( sys_wnt ) then
            1  806        if sys_gcc = 1 then str := STR_IDE_VALUE( sysnam_cygwin )
            1  807                       else str := STR_IDE_VALUE( sysnam_wnt )
            1  808      else
            1  809        if BOOLEAN( sys_vms ) then str := STR_IDE_VALUE( sysnam_vms )
            1  810                              else str := STR_IDE_VALUE( sysnam_unix );
            1  811      idev_flags := idev_flags + [objf_ronly]
     1      1  812    end;
            1  813  
            1  814    PREDEFINE_V( '$mxd_version', form_valstr );   { Define $mxd_version, the mxd version string }
            1  815    with ip^ do
            1  816    begin
     2      1  817      NEW( str, mxd_heading.length );
            1  818      idev_flags := idev_flags + [objf_ronly];
            1  819      str^ := mxd_heading
     1      1  820    end;
            1  821  
       C    1  822    { Define the I/O error variables }
            1  823    PREDEFINE_V( '$sys_ioerror', form_valint );   { Define $sys_ioerror, the last IO error number }
            1  824    ip^.int := 0; io_err := ip;
            1  825  
       C    1  826    { Define the End of file variable }
            1  827    PREDEFINE_V(     '$sys_eof', form_valint );   { Define $sys_eof, the flag for EOF reached during a read }
            1  828    ip^.int := 0; io_eof := ip;
            1  829  
       C    1  830    { Define the End of line variable }
            1  831    PREDEFINE_V(    '$sys_eoln', form_valint );   { Define $sys_eoln, the flag for End-of-Line reached during a re
                    ad }
            1  832    ip^.int := 0; io_eoln := ip;
            1  833  
       C    1  834    { Define the wait_info integer variable }
            1  835    PREDEFINE_V(   '$sys_winfo', form_valint );   { Define $sys_winfo }
            1  836    io_winfo := ip;
            1  837    ip^.int := 0;
            1  838  
  P A S - P. WOLFERS SOFTWARE: V2.1-E OF 31-AUG-2009  RUN THE 10-DEC-2009 AT 15:15:25     PAGE  17
 The Current Source File is "/home/wolfers/Soft/cpsh_kits/MXDV4_src/mxd_dcp_basinit.pas".

 The Current Compiled Module is "define_prm_object".

       C    1  839    { Define the Read Count variable }
            1  840    PREDEFINE_V( '$sys_iocount', form_valint );   { Define $sys_iocount }
            1  841    io_count := ip;
            1  842    ip^.int := 0;
            1  843  
            1  844    PREDEFINE_V( '.UNDECLARED.', form_valstr );   { Define the "Undeclared" Variable as a string }
            1  845    udc_ident := ip;
            1  846  
            1  847  
       C    1  848    { *** Define all standard functions *** }
       C    1  849  
            1  850    for ii := 1 to n_std_fnc do
            1  851      with std_ftab[ii] do
            1  852        PREDEFINE_S( std, nam, typ, nfp );
            1  853  
       C    1  854    { *** Define all MXD Application specific objects *** }
       C    1  855  
       C    1  856    { Define the MXD Job Title variable }
            1  857    PREDEFINE_V( '$job_name', form_valstr );      { Define $job_title }
            1  858    with ip^ do
            1  859    begin
     2      1  860      idev_flags  := idev_flags + [objf_spass];   { Set the specific JOB Name statement action }
            1  861      idev_spcact := JBNAME_VALUE
     1      1  862    end;
            1  863    job_name := ip;
            1  864  
       C    1  865    { Define the MXD Job Title variable }
            1  866    PREDEFINE_V( '$job_title', form_valstr );     { Define $job_title }
            1  867    with ip^ do
            1  868    begin
     2      1  869      idev_flags  := idev_flags + [objf_spass];   { Set the specific JOB TITLE statement action }
            1  870      idev_spcact := JBTITL_VALUE
     1      1  871    end;
            1  872    job_title := ip;
            1  873  
       C    1  874    { Define the MXD Job Title variable }
            1  875    PREDEFINE_V('$job_save_result',form_valstr ); { Define $sys_title }
            1  876    with ip^ do
            1  877    begin
     2      1  878      idev_flags  := idev_flags + [objf_spass];   { Set the specific MXD-V3 TITLE statement action }
            1  879      idev_spcact := JBSAVE_FNAME
     1      1  880    end;
            1  881    job_save  := ip;
            1  882  
            1  883  
            1  884    curr_lex  :=  1;                              { Set base lex for the user }
            1  885    DISPLAY_NEW                                   { Pass to the First user lex display level }
     0      1  886  end DEFINE_PRM_OBJECT;
            1  887  
            1  888  
            1  889  
            1  890  [global]
            1  891  procedure DCP_INIT;
            1  892  var
            1  893    fnd: boolean;
  P A S - P. WOLFERS SOFTWARE: V2.1-E OF 31-AUG-2009  RUN THE 10-DEC-2009 AT 15:15:25     PAGE  18
 The Current Source File is "/home/wolfers/Soft/cpsh_kits/MXDV4_src/mxd_dcp_basinit.pas".

 The Current Compiled Module is "P_dcp_init".

            1  894    str:  string;
            1  895    isl: integer;
            1  896  
            1  897  begin { DCP_INIT }
     1      1  898    data_mode   := false;
            1  899    fatal_error := false;
            1  900    sy_string   := 'MXD-Data-Compiler '||mxd_heading;
            1  901    LST_G_INIT( mxd_deflst, sy_string, ierr );
            1  902  
            1  903    if ierr = 0 then
            1  904    begin
       C    1  905      { Look for the initial MXD Standard Environment file in the MXD Search Path }
     2      1  906      SEARCH_FILE( mxd_search_path, mxd_setenvf, 4 { Read Access }, sy_string, fnd );
            1  907      if fnd then
            1  908      begin                                       { When the file is founded }
     3      1  909        isl := INDEX( sy_string, '/', -1 );
            1  910        if isl = 0 then sy_maclst.length := 0
            1  911                   else sy_maclst := SUBSTR( sy_string, 1, isl ); { Get the path directory to use for the other MX
                    D std. files }
            1  912        ERR_INIT( sy_maclst||mxd_dcperrf );       { Initialize the ERR sub-system }
            1  913        SRC_INIT( mxd_prompt, sy_string );        { Initialize the SRC sub-system }
            1  914        if src_control = nil then
            1  915        begin
     4      1  916          WRITELN( ' *** ', task_name, ' ERROR : Cannot open the start file "', sy_string, '".' );
            1  917          PASCAL_EXIT( 4 )                        { Stop on this error }
     3      1  918        end
     2      1  919      end
            1  920      else
            1  921      begin
     3      1  922        WRITELN( ' *** ', task_name, ' ERROR : Cannot find the start file "', mxd_setenvf, '".' );
            1  923        PASCAL_EXIT( 4 )                          { Stop on this error }
     2      1  924      end
     1      1  925    end;
            1  926  
       C    1  927    { Here the source file sy_string is opened and sy_maclst is the MXDLIB directory specification }
       C    1  928  
       C    1  929  (*
       C    1  930    for cop := dcp_oper"first to dcp_oper"last do { Init all lists of macro operator to empty }
       C    1  931      mop_tab[cop] := nil;
       C    1  932  *)
            1  933    DEFINE_KEYWORDS;                              { Define all the standard keywords }
            1  934    DEFINE_PRM_OBJECT;                            { Define the intrinsec object types, operators and functions }
            1  935  
            1  936    with exp_null do                              { Define the null expression record }
            1  937    begin
     2      1  938      exp_ref     :=          nil;
            1  939      exp_asr     :=          nil;
            1  940      exp_edim    :=            1;
            1  941      exp_shift   :=            0;
            1  942      exp_flags   :=           [];
            1  943      exp_form    :=  form_valint;                { Choice to 1 to do not make a Zero-Divide error }
            1  944      exp_int     :=            1
     1      1  945    end;
            1  946  
       C    1  947    { Init the IO file lun status }
  P A S - P. WOLFERS SOFTWARE: V2.1-E OF 31-AUG-2009  RUN THE 10-DEC-2009 AT 15:15:25     PAGE  19
 The Current Source File is "/home/wolfers/Soft/cpsh_kits/MXDV4_src/mxd_dcp_basinit.pas".

 The Current Compiled Module is "P_dcp_init".

            1  948    for ii := 1 to max_usrlun do
            1  949      sym_iof[ii].iocnt_mode := iocnt_close;
            1  950  
            1  951    sy_ch        :=     ' ';                      { Initialize the NEXTCH process (sub-routine of INSYMBOL) }
            1  952    sy_maclst    :=      '';                      { Init the Macro source to empty state ... }
            1  953    sy_nomacrflg :=   false;                      { ... and the run state in file command (no macro running }
            1  954    sy_noexec    :=   false;
            1  955    sy_sym.sy    := nothing                       { No readden symbol }
     0      1  956  end DCP_INIT;
            1  957  
            1  958  
            1  959  end DCP_COMPILER_INIT.
            1  960  
            1  961  
