Closed jsanjose closed 4 years ago
Hmm, this is weird. I just tried to replicate and it was okay, so there's something going with your setup that my code is getting confused with - that's to say: it's broken for you (and probably others), so let's find out why.
Can you let me know:
NextBASIC version 1.3.5 Operating system: Windows 10
Attached a screenshot of the NextBASIC config.
Also this is a screenshot showing the problem.
Also if it helps you I'm also sure that it worked right in the previous version.
Thanks. One extra question, are you able to connect to the Cspect image and upload the file in /devel/index.bas
- it's the NextBASIC file that's generated on the fly and it might have some clues in the file (but make sure you've not saved it inbetween in the native NextBASIC editor).
And to confirm, this happens consistently? i.e. you've got it on any file, it has nothing to do with line 10
or anything (not that I can see how it would be).
There's nothing that jumps out at me, so I'm trying to think how VS Code would be giving the extension only part of the file…
Actually, could you zip up your source .txt file and post that too? Just to rule out any encoding in the source.
I'm struggling to find where this is happening my code. Another test that might be useful, can you run the NextBASIC: export to binary .bas
against your text file and send the resulting .bas file?
Here it is the resulting .bas from "export to binary .bas". Amazingly this one works well if I copy it to the virtual SD card of the CSpect.
This is good, and suggests the problem is in the vscode extension (and not in the underlying txt2bas logic), and it also means it's in the auto-run logic, so I know where to look. The bad news is I can't see anything that stands out, so I'll have to dig deeper and probably fire up the windows machine to see if I can replicate.
Am able to replicate on a windows machine (with lunch!)
Nice! So seems only a problem in the Windows version of VScode.
Found the bug and getting a fix ready.
Extension version: 1.3.9 will have the fix - going live now.
Working now! Nice!
If I write a program like this and run with "run with cspec" the first line is missing when tokenizing it to BAS:
It only prints "WORLD" many times because line 10 is missing in the generated BAS.