Re: [Seed7-users] Templates issue
Interpreter and compiler for the Seed7 programming language.
Brought to you by:
thomas_mertes
From: Simon D. <sim...@ao...> - 2024-08-12 12:54:04
|
Hi Thomas,I just got around to trying to build the latest version on Windows. I am at this spot. Don't forget '-f mk_mingc.mak' for later build commands. E.g.: make7 -f mk_mingc.mak s7c make7 -f mk_mingc.mak test make7 -f mk_mingc.mak utilsI encountered errors with the test option. There seems to be a repetition in some of the errors. These are the first two, with the second one about chkarr not compiling being repeated after these two:________________________________________________________________________________________________________chkarr *** The interpreted chkarr does not work okay:*** ?(0):33: Exception "RANGE_ERROR" raised*** ../lib/fixarray.s7i(61):32: Declaration of "(attr type) . value" failed SET_MIN_IDX(paren1, minIdx, paren2, *** chkarr.sd7(2156):32: Declaration of "anArray3" failed var fixArrayType3: anArray3 is fixArrayType3.value; *** chkarr.sd7(2242):33: Exception "RANGE_ERROR" raisedconst type: baseArrayType3 is array [-9223372036854775807 ..] integer;----------------------------------------------------------------------^*** ../lib/basearray.s7i(207):32: Declaration of "(attr type) . value" failed SET_MIN_IDX(paren1, minIdx, paren2, *** ?(0):33: Exception "RANGE_ERROR" raised*** chkarr.sd7(2251):32: Declaration of "anArray3" failed var baseArrayType3: anArray3 is baseArrayType3 [.. -9223372036854775806] times 0; *** The interpreted compiler was not able to compile chkarr *** Compiler output:SEED7 INTERPRETER Version 5.2.60 Copyright (c) 1990-2024 Thomas MertesCompiling the compiler ...SEED7 COMPILER Version 3.2.60 Copyright (c) 1990-2024 Thomas MertesSource: chkarrCompiling the program ...*** chkarr.sd7(2147):33: Exception "RANGE_ERROR" raisedconst type: fixArrayType3 is array [-9223372036854775807 .. -9223372036854775806] integer;------------------------------------------------------------------------------------------^*** ../lib/fixarray.s7i(61):32: Declaration of "(attr type) . value" failed SET_MIN_IDX(paren1, minIdx, paren2, *** chkarr.sd7(2156):32: Declaration of "anArray3" failed var fixArrayType3: anArray3 is fixArrayType3.value; *** chkarr.sd7(2242):33: Exception "RANGE_ERROR" raisedconst type: baseArrayType3 is array [-9223372036854775807 ..] integer;----------------------------------------------------------------------^*** ../lib/basearray.s7i(207):32: Declaration of "(attr type) . value" failed SET_MIN_IDX(paren1, minIdx, paren2, *** chkarr.sd7(2320):33: Exception "RANGE_ERROR" raised end func;-----------^*** chkarr.sd7(2251):32: Declaration of "anArray3" failed var baseArrayType3: anArray3 is baseArrayType3 [.. -9223372036854775806] times 0; 7 errors found_________________________________________________________________________________________ Simon On Wednesday, August 7, 2024 at 02:55:40 AM PDT, Thomas Mertes via Seed7-users <see...@li...> wrote: Hi Simon, Thank you very much for reporting this error. This gives me the opportunity to fix it. You triggered an error in the declaration processing for functions with parameters. The original parameter list was changed and the second declaration of myPrintArray used the same array type (array integer) as the first one. This triggered the error; Redeclaration of "myPrintArray (ref TEST_1: the_array)" I have fixed this error with the GitHub commit "Leave original_name_list (with parameters) unchanged when objects are declared". I plan a new Seed7 release (which includes this fix) next week. As soon as the release is out you can use the installer to download and compile it. How to use Seed7 from GitHub with the gcc from the installer is described here: https://thomasmertes.github.io/Seed7Home/build.htm#COMPILING_UNDER_WINDOWS_WITH_GCC_FROM_THE_INSTALLER With the fix the test program -------------------------------------------------- $ include "seed7_05.s7i"; const proc: DECLARE_MY_PRINT_ARRAY(in type: aType) is func begin const proc: myPrintArray(in array aType: the_array) is func local var aType: element is aType.value; begin writeln("starting..."); for element range the_array do writeln(element); end for; end func; end func; DECLARE_MY_PRINT_ARRAY(integer); DECLARE_MY_PRINT_ARRAY(string); const proc: main is func local var array integer: an_array is [] (10, 20, 30, 40); var array string: some_array is [] ("car", "truck", "boat", "plane"); begin myPrintArray(an_array); myPrintArray(some_array); end func; -------------------------------------------------- writes: SEED7 INTERPRETER Version 5.2.156 Copyright (c) 1990-2024 Thomas Mertes starting... 10 20 30 40 starting... car truck boat plane Best regards Thomas _______________________________________________ Seed7-users mailing list See...@li... https://lists.sourceforge.net/lists/listinfo/seed7-users |