Closed paulossilva closed 4 years ago
They are, what do you see?
(excuse the massive screenshot 😆 )
I should have been more clear, sorry! I don't use line numbers in my NextBasic code since we have the #autoline directive, which is very helpful. So, without line numbers, comment lines aren't displayed as such in the online editor. As you haven't implemented the autoline directive (yet), please consider this issue as a feature request instead of a bug. Thanks!
Ah, I suspect you're not actually writing NextBASIC but using some extra layer of interpretation (maybe Boriel's ZX Basic?).
I just tried the following lines in NextBASIC both in the editor itself on the Next and in a text file and converting with .txt2bas on the Next, and they both error:
#autoline
PRINT "Hello world"
; this is a comment
Edit: 2nd screenshot was supposed to be of .txt2bas but failed!
I'm not sure I plan to support outside of NextBASIC but it might be useful to get an idea of what you're actually doing (rather than me guessing as zxbasic)
No, I'm just using plain NextBasic. The #autoline directive is supported by the .txt2bas dot command bundled with the Next distribution. Try .txt2bas -h in the command line. This directive is not supported on the NextBasic editor by the way.
This directive is very helpful because, combined with procedures, it allows us to write NextBasic programs without the hassle of keeping track of line numbers (no need for GOTOs nor GOSUBs anymore). Check the NextInvaders game demo bundled with the latest distro, to have a glimpse of what I'm talking about.
Oh wow, yeah - I see it in Nextinvaders now (and I had that in my test fixtures but hadn't spotted it at all!).
Right… I'll get that sorted. TIL ;-)
Note for self: autoline
seems to be a .txt2bas
feature, the basicinvaders contains line numbers on each statement - checked with unpack + this unpacker:
<A8$sig
C$marker
C$issue
C$version
I$length
C$hType
S$hFileLength
S$autostart
S$hOffset
x
x104
C$checksum
n$lineNumber
s$len
A34
Specifically n$lineNumber
is 10
(and peeking forward I see 20
).
:tada: This issue has been resolved in version 1.9.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
This is also landing in zx.remysharp.com/bas now - thanks for the report (I picked this for my evening hack)
On the online editor, lines started with ; or # should be treated as comments and coloured green.