|
From: | Guy |
Subject: | Mistyped array literal causes compiler to emit traceback. |
Date: | Sun, 27 Nov 2022 03:56:59 -0600 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 |
Greetings Gaius,
First I'd like to thank you for promptly fixing the constant constructor bug, I'm glad to see the language feature was indeed present as I had hoped and that it is now working pretty much as expected.
As I continue to try out the language/compiler, I've stumbled
across another oddity that I wanted to ask about. I wanted to try
networking via the ClientSocket and ServerSocket modules, while
creating a test however it seems I mistyped a few things and made
the compiler produce a stack traceback in two separate instances.
While I am unsure of what exactly caused this to occur, I
am hopefully fairly close.
The first seems to be related to when I was using an array literal to define a constant. This was for the address the client socket was going to connect to, so the type was defined as an array of 4 chars to represent an IPv4 address. Not really thinking about syntax much, at first I accidentally used integer literals in the array literal. Upon attempting to compile, the compiler emitted what is attached in the file const_char_error.txt
The source of the second issue I ran into isn't as easily
identifiable as the first it seems, though it occurred after I
adjusted the literal set representation for `ChanFlags` in the
call to `OpenSocket`, and used a FROM statement for the
`ChanConsts` module instead of an IMPORT. In this case,
the compiler emitted the error listed in the attached file unknown_error.txt.
I'm not sure if the syntax I was using was even correct, but I
wanted to include it anyways.
I have attached the program I was trying to create the example in
as well, it contains a few notes so you can hopefully reproduce it
on your end. This was all attempted with a fresh build of the
compiler after you pushed the changes to fix constant
constructors, though if you have any questions about my
configuration, do let me know.
Thank you, Guy.
const_char_error.txt
Description: Text document
Sockets_Example.mod
Description: application/xml-dtd
unknown_error.txt
Description: Text document
[Prev in Thread] | Current Thread | [Next in Thread] |