seed7-users Mailing List for Seed7
Interpreter and compiler for the Seed7 programming language.
Brought to you by:
thomas_mertes
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
|
Feb
(9) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(4) |
Aug
|
Sep
(4) |
Oct
(4) |
Nov
|
Dec
(1) |
2011 |
Jan
(2) |
Feb
|
Mar
(8) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
(2) |
Aug
(6) |
Sep
(7) |
Oct
(3) |
Nov
(10) |
Dec
(4) |
2013 |
Jan
(2) |
Feb
|
Mar
(2) |
Apr
|
May
(1) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(5) |
Nov
|
Dec
(1) |
2014 |
Jan
(1) |
Feb
|
Mar
|
Apr
(1) |
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
(1) |
Dec
(1) |
2015 |
Jan
(2) |
Feb
(2) |
Mar
(2) |
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
2016 |
Jan
|
Feb
(3) |
Mar
(2) |
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(3) |
Dec
(3) |
2021 |
Jan
(2) |
Feb
(6) |
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(12) |
Oct
(4) |
Nov
(17) |
Dec
(3) |
2022 |
Jan
(1) |
Feb
(2) |
Mar
|
Apr
(2) |
May
|
Jun
(17) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
(1) |
Mar
(4) |
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
|
2024 |
Jan
|
Feb
(5) |
Mar
(7) |
Apr
|
May
|
Jun
|
Jul
(4) |
Aug
(12) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2025 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: יהודה ג. <gurovich@g.jct.ac.il> - 2025-03-27 16:26:29
|
Hi Thomas, I hope you're doing well! I noticed that you're still actively developing Seed7, as I saw your recent update on Reddit. I was wondering if you're available to answer any emails related to questions or inquiries about Seed7? Looking forward to hearing from you! Best regards, Yehuda Gurovich |
From: Thomas M. <tho...@gm...> - 2024-12-10 11:53:18
|
Hi Simon, The parse operator is the inverse operation of the str() function. The parse operator converts a string to the given type. Many types have a parse operator. E.g.: integer parse "12345" returns 12345 float parse "3.2425" returns 3.1415 For the sake of completeness, the type string also defines the function str() and the parse operator. Both only return their parameter. E.g.: str("hello") returns "hello" string parse "hello" returns "hello" These uses of str() and the parse operator do not make sense. But inside of templates they make sense. Inside a template you use a generic type specified by a template parameter. The template CONVERSION_CHECK below defines the function conversionOkay(). The function conversionOkay() returns TRUE if the given string stri can be successfully converted to the given type aType. $ include "seed7_05.s7i"; include "float.s7i"; const proc: CONVERSION_CHECK (in type: aType) is func begin const func boolean: conversionOkay (in string: stri, attr aType) is func result var boolean: okay is FALSE; local var aType: dest is aType.value; begin okay := succeeds(dest := aType parse stri); end func; end func; CONVERSION_CHECK(integer); CONVERSION_CHECK(float); CONVERSION_CHECK(string); const proc: main is func begin writeln(conversionOkay("1234", integer)); writeln(conversionOkay("zero", integer)); writeln(conversionOkay("3.14", float)); writeln(conversionOkay("3,14", float)); writeln(conversionOkay("hello", string)); end func; The program above writes: TRUE FALSE TRUE FALSE TRUE Best regards Thomas |
From: Simon D. <sim...@ao...> - 2024-12-08 16:10:28
|
Hello , I can't figure out what the parse function in string.sd7 does or how it is used. Simon |
From: Thomas M. <tho...@gm...> - 2024-08-27 10:33:38
|
Hi Simon, Thank you for your error report. This helps me to improve Seed7. The types 'array baseType' (defined in array.s7i) and 'array [indexType] baseType' (defined in idxarray.s7i) are not related to each other. Some functions are declared for both types. The statements DECLARE_MY_PRINT_ARRAY(integer, integer); redeclares functions which 'array integer' already had declared. This triggers the error messages. I found a simple solution. At the end of idxarray.s7i I added: const func type: array [ (attr integer) ] (in type: baseType) is return array baseType; This maps 'array [integer] baseType' to 'array baseType'. I checked this change into GitHub as "Map 'array [integer] baseType' to 'array baseType'". You can either use the GitHub version or just add const func type: array [ (attr integer) ] (in type: baseType) is return array baseType; to the end of idxarray.s7i. With this fix my test program writes: SEED7 INTERPRETER Version 5.2.72 Copyright (c) 1990-2024 Thomas Mertes ----------------------------------------- the type of the array index is integer the type of the array elements is integer size of the array is 5 minimum index is 1 maximum index is 5 1: 10 2: 20 3: 30 4: 40 5: 50 Best regards Thomas |
From: Simon D. <sim...@ao...> - 2024-08-23 10:57:50
|
I noticed an array on the website with a non-integer index: Something like this: var array [char] string : unusual_index is ['0'] ("zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"); So I made a separate two-types templated function to print information on this array: const proc: DECLARE_MY_PRINT_ARRAY(in type: aType1, in type: aType2) is funcbegin const proc: myPrintArray(in array [aType1] aType2: the_array) is func local var aType1: the_index is aType1.value; begin writeln("-----------------------------------------"); writeln("the type of the array index is " & str(aType1) ); writeln("the type of the array elements is " & str(aType2)); writeln("size of the array is " & str(length(the_array))); writeln("minimum index is " & str(minIdx(the_array))); writeln("maximum index is " & str(maxIdx(the_array))); if length(the_array) = 0 then writeln("***** The array is empty ******"); else for key the_index range the_array do writeln(str(the_index) & ": " & str(the_array[the_index])); end for; end if; end func;end func; That works with these statements;DECLARE_MY_PRINT_ARRAY(char, string); var array [char] string : unusual_index is ['0'] ("zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"); myPrintArray(unusual_index); But it occurred to me that I should also be able to call that function with standard integer index arrays: var array integer: integer_array is [1] (10, 20, 30, 40,50); DECLARE_MY_PRINT_ARRAY(integer, integer); myPrintArray(integer_array); However, that doesn't work. I am not sure if I am doing something wrong. The interpreter gives errors and they start in array.s7i : *** /c/seed7/lib/idxarray.s7i(107):34: Redeclaration of "[ (val integer: start) ] (ref TST_1: aTuple)" const func arrayType: [ (in indexType: startIndex) ] (in tupleType: arr_tuple) is *** /c/seed7/lib/array.s7i(92):35: Previous declaration of "[ (val integer: start) ] (ref TST_1: aTuple)" const func arrayType: [ (in integer: start) ] (in tupleType: aTuple) is action "ARR_ARRLIT2"; *** /c/seed7/lib/idxarray.s7i(108):52: Match for {arrayType conv func *ANONYM_TYPE* : <DECLAREDOBJECT> ({[ INT_ICONV1({startIndex ord }) ] arr_tuple }) } failed return arrayType conv ([ord(startIndex)] arr_tuple); *** /c/seed7/lib/idxarray.s7i(110):34: Redeclaration of "[ (val integer: start) ] (val integer: anElement)" const func arrayType: [ (in indexType: startIndex) ] (in baseType: base_elem) is *** /c/seed7/lib/array.s7i(93):35: Previous declaration of "[ (val integer: start) ] (val integer: anElement)" const func arrayType: [ (in integer: start) ] (in baseType: anElement) is action "ARR_BASELIT2"; *** /c/seed7/lib/idxarray.s7i(111):52: Match for {arrayType conv func *ANONYM_TYPE* : <DECLAREDOBJECT> ({[ INT_ICONV1({startIndex ord }) ] base_elem }) } failed return arrayType conv ([ord(startIndex)] base_elem); *** /c/seed7/lib/idxarray.s7i(221):52: Match for {arrayType conv func *ANONYM_TYPE* : <DECLAREDOBJECT> ({[ INT_ICONV1({integer: <INTOBJECT> ({integer . first }) ord }) ] ARR_CONV({tupleType conv anArray }) }) } failed anArray := arrayType conv ([ord(indexType.first)] (tupleType conv anArray)); *** /c/seed7/lib/idxarray.s7i(216):32: Declaration of "(attr type) times (val integer: base_value)" failed const func arrayType: (attr indexType) times (in baseType: base_value) is func *** /c/Users/sdash/OneDrive/code/Seed7/Exploring/my_print_array.sd7(78):52: Match for {integer_array ::= func *ANONYM_TYPE* : <DECLAREDOBJECT> ({[ 1 ] ARR_EXTEND({ARR_EXTEND({ARR_EXTEND( *** details suppressed *** ) , 40 }) , 50 }) }) } failedend func;---------^*** /c/Users/sdash/OneDrive/code/Seed7/Exploring/my_print_array.sd7(66):32: Declaration of "integer_array" failed var array integer: integer_array is [1] (10, 20, 30, 40,50); *** /c/Users/sdash/OneDrive/code/Seed7/Exploring/my_print_array.sd7(73):52: Match for {integer_array myPrintArray } failed myPrintArray(integer_array); *** /c/Users/sdash/OneDrive/code/Seed7/Exploring/my_print_array.sd7(64):32: Declaration of "main" failedconst proc: main is func Simon |
From: Simon D. <sim...@ao...> - 2024-08-21 02:55:21
|
Hi Thomas, Everything working well now including the templates. I did a template with two types passed in. Worked great and so much easier or cleaner than in other languages! Thanks,Simon On Friday, August 16, 2024 at 02:49:25 AM PDT, Thomas Mertes via Seed7-users <see...@li...> wrote: Hi Simon, There is a bug in the Seed7 installer seed7_05_20240630_win.exe. It fails to recognize a 64-bit Windows. It always thinks that the computer is 32-bit: POINTER_SIZE: 32 This problem is solved with the new Seed7 installer for Windows: https://sourceforge.net/projects/seed7/files/bin/seed7_05_20240812_win.exe/download You probably just need to use the new installer. Using the GitHub version of Seed7 is currently not necessary. Best regards Thomas _______________________________________________ Seed7-users mailing list See...@li... https://lists.sourceforge.net/lists/listinfo/seed7-users |
From: Thomas M. <tho...@gm...> - 2024-08-16 09:49:10
|
Hi Simon, There is a bug in the Seed7 installer seed7_05_20240630_win.exe. It fails to recognize a 64-bit Windows. It always thinks that the computer is 32-bit: POINTER_SIZE: 32 This problem is solved with the new Seed7 installer for Windows: https://sourceforge.net/projects/seed7/files/bin/seed7_05_20240812_win.exe/download You probably just need to use the new installer. Using the GitHub version of Seed7 is currently not necessary. Best regards Thomas |
From: Thomas M. <tho...@gm...> - 2024-08-13 08:16:59
|
Hi Simon, I have a theory about the errors in chkarr.sd7: For some reason you use a GCC which produces 32-bit executables. This can be checked when you do (in the seed7\prg directory): s7 confval Please send me the output of confval. Confval writes a list of values. One of them is POINTER_SIZE. A POINTER_SIZE of 32 would explain the errors you get in chkarr.sd7. The confval value C_COMPILER_VERSION shows which GCC version is used. Something with 13.2.0 indicates that the 64-bit gcc provided in the seed7\gcc directory is used. Something with 4.8.1 indicates that the 32-bit gcc provided in the seed7\gcc directory is used. Other values of C_COMPILER_VERSION indicate that the gcc is not from the seed7\gcc directory. The command where gcc might give a hint which other gcc is used. For the gcc from the seed7\gcc directory the "where" command gives wrong results. You can also use the command: call_gcc --version to find out which gcc version from the seed7\gcc directory is used. The last time I added tests to chkarr.sd7 I did not consider 32-bit programs. The minimum and maximum possible indices differ between 32-bit and 64-bit. As a consequence in a 32-bit system the chkarr.sd7 test will not succeed. I changed chkarr.sd7 to work for a POINTER_SIZE of 32-bit and 64-bit. I committed this to GitHub as "Fix chkarr.sd7 to work if POINTER_SIZE is 32". With this change tests with chkarr.sd7 should succeed with a 32-bit gcc. You should definitely find the root cause why a 32-bit gcc is used. One possibility would be: The seed7\gcc directory does not exist (you forgot to copy it). In this case the command bin\call_gcc.bat would use a gcc found in the search path (PATH environment variable). Best regards, Thomas |
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 |
From: Thomas M. <tho...@gm...> - 2024-08-07 09:55:23
|
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 |
From: Simon D. <sim...@ao...> - 2024-08-06 01:34:17
|
Thanks. I tried the templates example after what I was attempting - a generic "print array" was failing. Here is the code and the two error messages I get, which I don't understand: -------------------------------------------------------------------------------------------------------------------------------$ include "seed7_05.s7i"; const proc: DECLARE_MY_PRINT_ARRAY(in type: aType) is funcbegin const proc: myPrintArray(in array aType: the_array) is func begin writeln("starting..."); # writeln( str(aType) ); end func;end func; DECLARE_MY_PRINT_ARRAY(integer);DECLARE_MY_PRINT_ARRAY(string); const proc: main is funclocal var array integer: an_array is [] (10, 20, 30, 40); var array string: some_array is [] ("car", "truck", "boat", "plane");begin myPrintArray(an_array);end func; -------------------------------------------------------------------------------------------------------------------------------SEED7 INTERPRETER Version 5.2.60 Copyright (c) 1990-2024 Thomas Mertes*** /c/Users/resmi/OneDrive/code/Seed7/Exploring/my_print_array.sd7(5):34: Redeclaration of "myPrintArray (ref TEST_1: the_array)" const proc: myPrintArray(in array aType: the_array) is func *** /c/Users/resmi/OneDrive/code/Seed7/Exploring/my_print_array.sd7(5):35: Previous declaration of "myPrintArray (ref TEST_1: the_array)" const proc: myPrintArray(in array aType: the_array) is func-------------------------------------------------------------------------------------------------------------------------------I get the same error if I make it a function. Simon On Sunday, August 4, 2024 at 11:48:23 PM PDT, Thomas Mertes via Seed7-users <see...@li...> wrote: Hi Simon, You are right that the functions must be renamed to not conflict with what is in integer.s7i. I have improved the tutorial to mention that DECLARE_MIN_MAX is defined in the integer.s7i library. Regarding the case that the other two types (bigInteger and float) get errors. The type bigInteger is defined in the library bigint.s7i and the type float is defined in the library float.s7i. Without including these libraries these two types do not exist. If you add the include statements include "bigint.s7i"; include "float.s7i"; your program should work. The tutorial mentions the example min(PI, E) to use that you need include "math.s7i"; as well (the constants PI and E are defined in the math.s7i library). This way a main function like const proc: main is func begin writeln(my_min(2, 5)); writeln(my_min(PI, E)); end func; should work. Regards Thomas _______________________________________________ Seed7-users mailing list See...@li... https://lists.sourceforge.net/lists/listinfo/seed7-users |
From: Thomas M. <tho...@gm...> - 2024-08-05 06:48:11
|
Hi Simon, You are right that the functions must be renamed to not conflict with what is in integer.s7i. I have improved the tutorial to mention that DECLARE_MIN_MAX is defined in the integer.s7i library. Regarding the case that the other two types (bigInteger and float) get errors. The type bigInteger is defined in the library bigint.s7i and the type float is defined in the library float.s7i. Without including these libraries these two types do not exist. If you add the include statements include "bigint.s7i"; include "float.s7i"; your program should work. The tutorial mentions the example min(PI, E) to use that you need include "math.s7i"; as well (the constants PI and E are defined in the math.s7i library). This way a main function like const proc: main is func begin writeln(my_min(2, 5)); writeln(my_min(PI, E)); end func; should work. Regards Thomas |
From: Simon D. <sim...@ao...> - 2024-08-04 12:52:34
|
In trying to compile the code that is at Manual->2.12 Templateshttps://thomasmertes.github.io/Seed7Home/manual/tutorial.htm#Templates I am encountering a compile error. (It appeared that the functions had to be renamed to not conflict with what is in integer.s7i) :----------------------------------------------------------------------------------------------------const proc: DECLARE_MY_MIN_MAX (in type: aType) is func begin const func aType: my_min (in aType: value1, in aType: value2) is return value1 < value2 ? value1 : value2; const func aType: my_max (in aType: value1, in aType: value2) is return value1 > value2 ? value1 : value2; end func; DECLARE_MY_MIN_MAX(integer);DECLARE_MY_MIN_MAX(bigInteger);DECLARE_MY_MIN_MAX(float);---------------------------------------------------------------------------------------Of the DECLARE_... statements, the only one that the interpreter is accepting is the one for integer. The other two get these errors SEED7 INTERPRETER Version 5.2.60 Copyright (c) 1990-2024 Thomas Mertes*** /c/Users/sdash/OneDrive/code/Seed7/Examples/templates.sd7(19):52: Match for {bigInteger DECLARE_MY_MIN_MAX } failedDECLARE_MY_MIN_MAX(bigInteger); *** /c/Users/sdash/OneDrive/code/Seed7/Examples/templates.sd7(19):33: Exception "ILLEGAL_ACTION" raisedDECLARE_MY_MIN_MAX(bigInteger);-------------------------------^*** /c/Users/sdash/OneDrive/code/Seed7/Examples/templates.sd7(20):52: Match for {float DECLARE_MY_MIN_MAX } failedDECLARE_MY_MIN_MAX(float); *** /c/Users/sdash/OneDrive/code/Seed7/Examples/templates.sd7(20):33: Exception "ILLEGAL_ACTION" raisedDECLARE_MY_MIN_MAX(float); Simon |
From: Simon D. <sim...@ao...> - 2024-08-02 08:40:44
|
Thomas, I was incorrect when I said that I didn't have GCC installed. There were two subdirectories under msys64 (from MSYS2) that had a gcc.exe (which I wasn't using). But they were not in the PATH variable. There was also one (GCC version 2.95) under the Free Pascal directory FPC that was in PATH . I tried the new installation file before realizing there was gcc.exe under FPC. It worked. Then I deleted the Seed7 directory and did another installation with the gcc.exe renamed to tempgcc.exe and it also worked. Thanks for the update! Simon On Thursday, August 1, 2024 at 03:16:42 AM PDT, Thomas Mertes via Seed7-users <see...@li...> wrote: Hi Simon, Having gcc installed is NOT a per-requirement. The Seed7 installer installs its own gcc in the seed7/gcc directory. The Seed7 installer seed7_05_20231217_win.exe failed to do exactly that. The line 'gcc' is not recognized as an internal or external command, shows that the installation of gcc failed. When I tested the installer on my Windows-11 computer it succeeded, because it used the already installed gcc instead. I created a new installer seed7_05_20240630_win.exe which can be downloaded from https://sourceforge.net/projects/seed7/files/bin This installer should be capable to install gcc in seed7/gcc I am interested to know if seed7_05_20240630_win.exe works successfully on your computer. Hopefully you did not already install gcc yourself. I am interested to know if seed7_05_20240630_win.exe works without an already installed gcc. Besides this test you can install a gcc later. The gcc from Seed7 will not affect the other gcc and vice versa. Regards Thomas _______________________________________________ Seed7-users mailing list See...@li... https://lists.sourceforge.net/lists/listinfo/seed7-users |
From: Thomas M. <tho...@gm...> - 2024-08-01 10:16:33
|
Hi Simon, Having gcc installed is NOT a per-requirement. The Seed7 installer installs its own gcc in the seed7/gcc directory. The Seed7 installer seed7_05_20231217_win.exe failed to do exactly that. The line 'gcc' is not recognized as an internal or external command, shows that the installation of gcc failed. When I tested the installer on my Windows-11 computer it succeeded, because it used the already installed gcc instead. I created a new installer seed7_05_20240630_win.exe which can be downloaded from https://sourceforge.net/projects/seed7/files/bin This installer should be capable to install gcc in seed7/gcc I am interested to know if seed7_05_20240630_win.exe works successfully on your computer. Hopefully you did not already install gcc yourself. I am interested to know if seed7_05_20240630_win.exe works without an already installed gcc. Besides this test you can install a gcc later. The gcc from Seed7 will not affect the other gcc and vice versa. Regards Thomas |
From: Simon D. <sim...@ao...> - 2024-07-31 10:25:05
|
This is with using the GDB debugger that comes from a "pacman" command on MYS2. (gdb) runStarting program: /c/Users/sdash/Downloads/Software/Interpreters/Seed7/seed7_05_20231217_win.exe[New Thread 38108.0x9850][New Thread 38108.0x8c74][Thread 38108.0x9850 exited with code 0][New Thread 38108.0x7bb0][New Thread 38108.0xa77c][New Thread 38108.0x8108][New Thread 38108.0xa3c0][New Thread 38108.0x8bb4]warning: onecore\net\netprofiles\service\src\nsp\dll\namespaceserviceprovider.cpp(613)\nlansp_c.dll!6707B649: (caller: 75D1E326) LogHr(1) tid(3a0c) 8007277C No such service is known. The service cannot be found in the specified name space.'gcc' is not recognized as an internal or external command,operable program or batch file.'c:\seed7\src\chkccomp.exe' is not recognized as an internal or external command,operable program or batch file. *** Uncaught exception FILE_ERROR raised at make.s7i(222)[Thread 38108.0xa77c exited with code 1][Thread 38108.0x8108 exited with code 1][Thread 38108.0x8c74 exited with code 1][Thread 38108.0x8bb4 exited with code 1][Thread 38108.0xa3c0 exited with code 1][Thread 38108.0x7bb0 exited with code 1] Program terminated with signal SIGHUP, Hangup.The program no longer exists. |
From: Simon D. <sim...@ao...> - 2024-07-31 09:50:57
|
Thanks for the reply! > Do you use a 64-bit or a 32-bit version of Windows? Windows 11 Pro Version 23H2 64-bit operating system, x64-based processor > Which option did you choose? I am given a choice of two options from the installer: Choose Seed7 version to installIt is possible to download and install the latest Seed7release from the internet. Alternatively the release thathas been packaged with this program can be installed. Latest version: 2024-06-30Packaged version: 2023-12-17 Download and install the latest version (Y/N/Q)? I have chosen both of the options and it aborts either way. > How many dots appeared before it aborted? three > Are files with the extension .o in the C:\Seed7\src directory? No. There is [c, h, js (1), mak, mk(1) , sd7 (1)] > Are files with the extension .a in the C:\Seed7\bin directory? No. Just two bat files > Are you sure there is enough space on the hard disk? Yes, 585 GB free. > Do you have gcc (The Gnu C compiler) installed? No. Is that a pre-requirement? > Do you have gdb.exe (The GNU debugger) installed on your computer? I will download it from MinGW and try and install with it. Simon |
From: Thomas M. <tho...@gm...> - 2024-07-31 06:13:59
|
Hi Simon, I just used seed7_05_20231217_win.exe on my Windows 11 laptop to "Download and install the latest version" (2024-06-30). It "worked for me" ... Unfortunately I cannot reproduce your problem. I need more information to investigating your problem. - Do you use a 64-bit or a 32-bit version of Windows? - The Seed7 installer can - Download the latest version from the internet. - Use a manually downloaded Seed7 archive (seed7_05_<date>.tgz). - Install the packaged version (for seed7_05_20231217_win.exe this is seed7_05_20231217.tgz). Which option did you choose? - After writing "This may take some time" it writes dots for each successful step. How many dots appeared before it aborted? - Are files with the extension .o in the C:\Seed7\src directory? - Is the number of *.o files in C:\Seed7\src approximately the same as the number of *.c files there? - Are files with the extension .a in the C:\Seed7\bin directory? If yes, which ones? - Are you sure there is enough space on the hard disk? - Do you have gcc (The Gnu C compiler) installed? An already installed gcc and the gcc from Seed7 are totally separated. They should not affect each other. But I might have overseen something. - Do you have gdb.exe (The GNU debugger) installed on your computer? It can be downloaded from the MinGW project. If gdb is available you could run seed7_05_20231217_win.exe in gdb and hopefully it tells you the reason of the abort. With more information I hope to be able to help you. Regards Thomas |
From: Simon D. <sim...@ao...> - 2024-07-29 07:19:08
|
Hi,I am trying to install on Windows 11 using the file: seed7_05_20231217_win.exe It is aborting. I get to where it tells me "This may take some time". It does do some things as the directory C:\Seed7 is created and there are folders and files in there. But it is not complete. The abort happens quickly, after a 2 to 8 seconds. I restarted my computer and re-downloaded the executable but no luck. Simon |
From: Zachary M. <za...@ma...> - 2024-03-18 20:21:17
|
Hey Thomas, Yeah, I was a bit hasty in sending that message. It seems the issue was having a git installation's bin directory on my path environment variable (which contains bash and sh). So once I removed that entry from my path, then it understood that I was on Windows. I guess the OS check must involve looking for either one of those executables (bash and sh)? Zachary ________________________________ From: Thomas Mertes <tho...@gm...> Sent: March 18, 2024 10:37 AM To: Zachary Menzies <za...@ma...>; see...@li... <see...@li...> Subject: Re: [Seed7-users] Seed7 Version 2024-03-01 Fails Installation on Windows Hello Zachary, A missing base.h and chkccomp.h looks really weird. All makefiles including mk_mingw.mak have commands to generate them. Maybe it thinks that you are on a Linux system, because you are using makefile instead of mk_mingw.mak. Maybe your copy of mk_mingw.mak to makefile has been overwritten by git. BTW.: The make command offers the option -f to specify a makefile. So instead of copying mk_mingw.mak to makefile you could specify -f mk_mingw.mak with every make command. The missing files show that your files are in a strange state. Just do a make -f mk_mingw.mak clean to clean it up. Sometimes a "make clean" complains about the file "depend". In this case you can remove the file "depend" and do a "make clean" afterwards. Please do not copy files like chkccomp.h from your old version. This files should be generated with: make -f mk_mingw.mak depend Afterwards make -f mk_mingw.mak make -f mk_mingw.mak s7c should compile the interpreter and compiler. That chkccomp.exe was not found is a follow up error (gcc was not able to compile chkccomp.c because base.h was missing). Best regards Thomas Mertes |
From: Zachary M. <za...@ma...> - 2024-03-18 14:58:32
|
Hey Thomas, Sorry, I was referring to the latest released version (2024-03-01). I tried the GitHub version, and it does work fine; thank you. I had installed Alma in a headless setup, so that the error was an X11-related issue makes sense. But I'm glad it's not required. As a word of encouragement, the reason I was compiling on a server-type OS, is that—due to a recent location change for my company's DB2 database—PHP, which I was using to access the database, became incredibly slow to fetch results (I'm not yet sure why, but I think the issue has to do with how PHP handles the connection/driver). But I was able to run the same SQL through Seed7, and got the results in just milliseconds, compared to the 11+ seconds PHP was taking. So thank you; and good work, Zachary ________________________________ From: Thomas Mertes <tho...@gm...> Sent: March 18, 2024 9:45 AM To: Zachary Menzies <za...@ma...> Cc: see...@li... <see...@li...> Subject: Re: [Seed7-users] Seed7 Compilation on AlmaLinux 9 Segmentation Fault Hi Zachary, Do you refer to the latest version from GitHub (which commit?) or to the latest released version (2024-03-01)? In case of the released version (2024-03-01) I have an idea. In this version the compiler uses X11 functions. The function colorPixel() is used to determine the pixel encoding used on your computer. If X11 is not installed on your computer this will fail. Recently I did two commits which should fix this issue: "Improve the check for non-empty windows" "Avoid SEGV if drwRgbColor() is called without a successful drawInit()" I suggest you use this version (or a later one) from GitHub. If the error persists with the GitHub version I suggest the following: Does the SEGV also occur if you invoke the command ../bin/s7 -l ../lib ../prg/s7c -l ../lib -b ../bin -O2 ../prg/s7c manually? In this case you can use gdb to find out more. You could invoke gdb with: gdb ../bin/s7 and use following gdb command to start the program: run -l ../lib ../prg/s7c -l ../lib -b ../bin -O2 ../prg/s7c If this stops with the SEGV you can use the command bt to see a backtrace of the functions. Please send me this backtrace. In case the backtrace is huge it could be an endless recursion. Please tell me if the GitHub version works or send me a backtrace if the GitHub version does not fix your problem. Best regards Thomas Mertes |
From: Thomas M. <tho...@gm...> - 2024-03-18 14:37:45
|
Hello Zachary, A missing base.h and chkccomp.h looks really weird. All makefiles including mk_mingw.mak have commands to generate them. Maybe it thinks that you are on a Linux system, because you are using makefile instead of mk_mingw.mak. Maybe your copy of mk_mingw.mak to makefile has been overwritten by git. BTW.: The make command offers the option -f to specify a makefile. So instead of copying mk_mingw.mak to makefile you could specify -f mk_mingw.mak with every make command. The missing files show that your files are in a strange state. Just do a make -f mk_mingw.mak clean to clean it up. Sometimes a "make clean" complains about the file "depend". In this case you can remove the file "depend" and do a "make clean" afterwards. Please do not copy files like chkccomp.h from your old version. This files should be generated with: make -f mk_mingw.mak depend Afterwards make -f mk_mingw.mak make -f mk_mingw.mak s7c should compile the interpreter and compiler. That chkccomp.exe was not found is a follow up error (gcc was not able to compile chkccomp.c because base.h was missing). Best regards Thomas Mertes |
From: Thomas M. <tho...@gm...> - 2024-03-18 13:46:08
|
Hi Zachary, Do you refer to the latest version from GitHub (which commit?) or to the latest released version (2024-03-01)? In case of the released version (2024-03-01) I have an idea. In this version the compiler uses X11 functions. The function colorPixel() is used to determine the pixel encoding used on your computer. If X11 is not installed on your computer this will fail. Recently I did two commits which should fix this issue: "Improve the check for non-empty windows" "Avoid SEGV if drwRgbColor() is called without a successful drawInit()" I suggest you use this version (or a later one) from GitHub. If the error persists with the GitHub version I suggest the following: Does the SEGV also occur if you invoke the command ../bin/s7 -l ../lib ../prg/s7c -l ../lib -b ../bin -O2 ../prg/s7c manually? In this case you can use gdb to find out more. You could invoke gdb with: gdb ../bin/s7 and use following gdb command to start the program: run -l ../lib ../prg/s7c -l ../lib -b ../bin -O2 ../prg/s7c If this stops with the SEGV you can use the command bt to see a backtrace of the functions. Please send me this backtrace. In case the backtrace is huge it could be an endless recursion. Please tell me if the GitHub version works or send me a backtrace if the GitHub version does not fix your problem. Best regards Thomas Mertes |
From: Zachary M. <za...@ma...> - 2024-03-13 18:55:37
|
Hey Thomas, I just tried compiling the latest version of Seed7 on AlmaLinux 9, and got through fine all the way up to compiling the compiler ("make s7c"), during which it crashed with a segmentation fault at 6964 under the generating code step. The following is the output from the command: $ make s7c ../bin/s7 -l ../lib ../prg/s7c -l ../lib -b ../bin -O2 ../prg/s7c SEED7 INTERPRETER Version 5.2.40 Copyright (c) 1990-2023 Thomas Mertes Compiling the compiler ... SEED7 COMPILER Version 3.2.40 Copyright (c) 1990-2023 Thomas Mertes Source: ../prg/s7c Compiling the program ... Compiling the compiler ... Generating code ... after walk_const_list make: *** [makefile:123: ../prg/s7c] Segmentation fault (core dumped) Any idea why it's failing? Thanks, Zachary |
From: Zachary M. <za...@ma...> - 2024-03-13 12:40:58
|
Hello again, I did some more digging on this, and it turns out the issue was that I have Git installed, and its "bin" folder is on my Path (which contain bash.exe and sh.exe); that seems to have made the make process think I was on a Linux system. So the fix was to temporarily remove Git's bin folder from my Path; but perhaps there is a better solution? Zachary ________________________________ From: Zachary Menzies Sent: March 12, 2024 1:31 PM To: see...@li... <see...@li...> Subject: Seed7 Version 2024-03-01 Fails Installation on Windows Hey Thomas, I was just installing Seed7 version 2024-03-01 on a Windows OS, but I encountered three errors when running mingw32-make depend after I had copied the "mk_mingw.mak" over the "makefile": First was "base.h" couldn't be found: gcc chkccomp.c -o chkccomp chkccomp.c:28:10: fatal error: base.h: No such file or directory 28 | #include "base.h" | ^~~~~~~~ compilation terminated. mingw32-make: *** [makefile:274: chkccomp.exe] Error 1 Second was "chkccomp.h" couldn't be found. I circumvented those two by copying those files from my old version. Third was that the "chkccomp.exe" command was not found; which is strange because the file exists in the "src" directory. I'm not sure how to circumvent this error (does it think I'm on a Linux system, given the "/usr/bin/bash" reference?) gcc chkccomp.c -o chkccomp .\chkccomp.exe version.h "S7_LIB_DIR=" "SEED7_LIBRARY=" /usr/bin/bash: line 1: .chkccomp.exe: command not found mingw32-make: *** [makefile:270: version.h] Error 127 Zachary |