-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BASIC label mode with free naming #67
Comments
I'm not sure I understand correctly. You mean saving the label version as .bas file instead of the line number version? |
Sorry bad description. Saving with labels already seem possible. I'll rephrase it, make it possible to use any label name, just like in assembler. If there is a problem with parsing, maybe adding a ending char like colon could work. |
Can you please show an example where there's a problem currently, and how the resolved code should look like? |
OK for example my current main file of the Chip8 emulator has 443 lines of code and will become much bigger if I include everything into it. It includes many GOSUB and GOTO statements of course. At one point I changed to LABEL mode but I actually went back. I didn't like the way the labels where named. It actually made keeping track of the code even harder than just a line numbers which is a pity. It would be really nice to be able to name my labels as the function they are suppose to execute. An example (NOTE: Will be changed to ON GOTO later): This is the main construct of the opcode-interpreter. Now I use a comment to make it clearer where the GOTO lands. And when switching between NUMBER and LABEL mode maybe the custom labels could be kept somewhere? Though this would of course be messed up if you started changing lots of stuff in NUMBER mode.. I don't have the exact solution there. If one would like to get advanced maybe a CRC32-checksum of row complete row content and keep that in a separate file for recreation when switching back and forth between NUMBER and LABEL mode. Rows that can't be found is recreated with those default labels. |
Thanks, that helps a lot! I think using meta data with # would be the way to go forward. Have several labels in the followup line separated by comma, for example: #META LABELS,ACTION_MENU #META LABELS,OPEN_DOOR,REDRAW_SCREEN,ACTION_MENU would map to ACTION_MENU GOSUB OPEN_DOOR |
Would be really nice to have! |
Thanks for making a great tool!
It would be great if the labelling somehow was the original/reference file, thus making it possible to select any names to any lines. This would make big files more readable and also together with my other suggestion make the whole tool more usable for big BASIC programs.
The text was updated successfully, but these errors were encountered: