"Fossies" - the Fresh Open Source Software Archive

Member "MACE1.6.0/exampleScripts/listStructure/listgen.txt" (15 Aug 2018, 1291 Bytes) of package /windows/misc/MACE1.6.0.zip:

As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 %Copyright (C) 2012-2018 Jan Christian Rohde
    2 %
    3 %This file is part of MACE.
    4 %
    5 %MACE is free software; you can redistribute it and/or modify it under the terms of the
    6 %GNU General Public License as published by the Free Software Foundation; either version 3
    7 %of the License, or (at your option) any later version.
    8 %
    9 %MACE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
   10 %even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   11 %GNU General Public License for more details.
   12 %
   13 %You should have received a copy of the GNU General Public License
   14 %along with MACE; if not, see http://www.gnu.org/licenses.
   16 % This script puts a new element with a selected value at the end of a list of records.
   17 % Thus here we have an example that complex data structures can be realized by records.
   19 get(tempValue)
   21 % Initialize length with 0 when the list-record is used at the first time.
   22 init(length,0)
   24 % If the current list element record is used at the first time, store the value.
   25 % Else go to the end of the list and generate a new list element there.
   26 if length ==0 {
   27  value = tempValue;
   28 }
   29 else {
   30  record(list,exampleScripts/listStructure/listgen.txt,tempValue)
   31 }
   33 % increment list length
   34 ++length;
   36 % delete garbage
   37 delete(tempValue)