I've been using the ECMA-116 line length limit of 132 in my build and it occurred to me that perhaps that would be suitable as a standard extensions feature?
It's not a standard feature are part of -X, but you can use -w -X
together to get 132 columns with extensions. The way to do it easiest
is:
ECMA55FLAGS='-X' ./BASICCW INFILE.BAS
and if you know any bash you could make a custom BASICCWX pretty
easily. The -w -X (and -w -s -X) tests still have a few problems,
which is why this hasn't been added yet. I'm confident the code works
and the tests need tweaking, but before I make it truly recommended I
want the self-tests to pass with those settings. I'm working on it,
but its an after-hours project so progress is a bit slow...
Most of the code can actually work with an arbitary number of columns,
but the TAB(), comma, and semicolon with PRINT runtime code probably
isn't robust enough for anytyhing but 80 and 132 columns right now.
You do know about bas55, right? It's an interpreted implementation of
Minimal BASIC that you might want to test against. The URL for that
is: https://jorgicor.niobe.org/bas55/
The bas55 implementation has the advantage of working on Windows, but
his handling of PRINT with TAB, comma, and semi-colon is slightly
different. The ECMA-55 specification allows that.
[bugs:#23] Use ECMA-116 max line length in extended mode
Status: open Group: ECMA55 v1.8 Created: Sat Jun 26, 2021 05:21 PM UTC by Doug Kearns Last Updated: Sat Jun 26, 2021 05:21 PM UTC Owner: nobody
I've been using the ECMA-116 line length limit of 132 in my build and it
occurred to me that perhaps that would be suitable as a standard extensions
feature?
I haven't heard back anything yet. Are you wanting 132 columns of Minimal BASIC source code on input? Now that I haven't even thought about. The -w option is for 132 column output.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, I'll add supporting 132 columns of input at the top of my TODO list. Sorry about the misunderstanding, but I'm sure the project is better for me having added testing for the 132 columns of output mode which I thought you wanted.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, with revision 96ce7d6ecd96fcb4a87a15ce1afab769258aade7 from git, look in the INSTALL file at the end. This describes how to create and test a version of ecma55 that accepts up to 132 columns of input and generates 132 column output and supports extensions.
Please let me know if this works for you and does what you wanted or not.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
However, what I was specifically proposing was including this support in extended mode itself. So it would be enabled with -X.
There may be good reasons not to do that but it seemed to me that extended mode was slowly adding Full BASIC features and I thought that this might be a reasonably uncontroversial one to add. I may also, of course, be misunderstanding the purpose of extended mode.
Thanks,
Doug
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Extended mode is basically a mode for any features that are not included in ECMA-55. It isn't really aiming for ECMA-116 compliance (ECMA-116 is very ambitious and I know of no actual implementatoins that implement everything).
I have a lot of static buffers in the C code, and they require a const value in the declaration for the size. Yes, I could convert them all to using malloc, but it would be a major effort. I'm not saying no, I'm just saying not now. Allocation is easy, but getting the deallocation correct in every case will be tricky. I'll add it to the TODO list so it won't be forgotten. Realistically it'll be months before I get to that, but since you asked, I do plan to do it for you. Just please be patient for a little while....
Last edit: Gatewood Ham 2021-07-07
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's not a standard feature are part of -X, but you can use -w -X
together to get 132 columns with extensions. The way to do it easiest
is:
ECMA55FLAGS='-X' ./BASICCW INFILE.BAS
and if you know any bash you could make a custom BASICCWX pretty
easily. The -w -X (and -w -s -X) tests still have a few problems,
which is why this hasn't been added yet. I'm confident the code works
and the tests need tweaking, but before I make it truly recommended I
want the self-tests to pass with those settings. I'm working on it,
but its an after-hours project so progress is a bit slow...
Most of the code can actually work with an arbitary number of columns,
but the TAB(), comma, and semicolon with PRINT runtime code probably
isn't robust enough for anytyhing but 80 and 132 columns right now.
You do know about bas55, right? It's an interpreted implementation of
Minimal BASIC that you might want to test against. The URL for that
is:
https://jorgicor.niobe.org/bas55/
The bas55 implementation has the advantage of working on Windows, but
his handling of PRINT with TAB, comma, and semi-colon is slightly
different. The ECMA-55 specification allows that.
JGH
On 6/27/21, Doug Kearns dkearns@users.sourceforge.net wrote:
Related
Bugs:
#23The -w and -X flags can both be specified together to get this behavior. However, the self-testing isn't ready for this. I am working on it.
I haven't heard back anything yet. Are you wanting 132 columns of Minimal BASIC source code on input? Now that I haven't even thought about. The -w option is for 132 column output.
Yes, I was proposing support for the longer input line length.
It's not difficult to run up against the current limit and it's the only time, for me, that it doesn't feel cool to be trapped in 1978.
Ok, I'll add supporting 132 columns of input at the top of my TODO list. Sorry about the misunderstanding, but I'm sure the project is better for me having added testing for the 132 columns of output mode which I thought you wanted.
Ok, with revision 96ce7d6ecd96fcb4a87a15ce1afab769258aade7 from git, look in the INSTALL file at the end. This describes how to create and test a version of ecma55 that accepts up to 132 columns of input and generates 132 column output and supports extensions.
Please let me know if this works for you and does what you wanted or not.
It does, thanks.
However, what I was specifically proposing was including this support in extended mode itself. So it would be enabled with -X.
There may be good reasons not to do that but it seemed to me that extended mode was slowly adding Full BASIC features and I thought that this might be a reasonably uncontroversial one to add. I may also, of course, be misunderstanding the purpose of extended mode.
Thanks,
Doug
Extended mode is basically a mode for any features that are not included in ECMA-55. It isn't really aiming for ECMA-116 compliance (ECMA-116 is very ambitious and I know of no actual implementatoins that implement everything).
I have a lot of static buffers in the C code, and they require a const value in the declaration for the size. Yes, I could convert them all to using malloc, but it would be a major effort. I'm not saying no, I'm just saying not now. Allocation is easy, but getting the deallocation correct in every case will be tricky. I'll add it to the TODO list so it won't be forgotten. Realistically it'll be months before I get to that, but since you asked, I do plan to do it for you. Just please be patient for a little while....
Last edit: Gatewood Ham 2021-07-07