Open ianatha opened 6 months ago
I'm sorry, but it looks like an error has occurred due to a planning failure. Feel free to add more details to the issue description so Sweep can better address it. Alternatively, reach out to Kevin or William for help at https://discord.gg/sweep.
For bonus GPT-4 tickets, please report this bug on Discord (tracking ID: e021fb92fe
).
💡 To recreate the pull request edit the issue title or description.
We should implement the QBasic "NAME" statement, which changes the name of a disk file or directory.
Its syntax is "NAME oldfilename AS newfilename".
The NAME statement is similar to the DOS RENAME command. NAME can move a file from one directory to another but cannot move a directory.
The arguments oldfilename and newfilename are string expressions each of which contains a file or directory name and an optional path. If the path in newfilename is different from the path in oldfilename, the NAME statement changes the pathname as well as renames the file as indicated.
Examples
In principle, resolving this is very similar to implementing the KILL statement in https://github.com/ianatha/bababasic/issues/96. Specifically, the skeleton for declaring a new QBasic statement is the same, but instead of deleting the file (like KILL does), we must rename it.
The relevant files to change are: