ianatha / bababasic

QuickBASIC 4.5 revival on Android
https://play.google.com/store/apps/details?id=io.atha.quickbasic
MIT License
94 stars 4 forks source link

Implement NAME statement #99

Open ianatha opened 6 months ago

ianatha commented 6 months ago

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

NAME "ACCTS" AS "LEDGER"

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:

sweep-ai[bot] commented 6 months ago
Sweeping

25%

Actions (click)


❌ Unable to Complete PR

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).


🎉 Latest improvements to Sweep:
  • New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
  • Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
  • Use the GitHub issues extension for creating Sweep issues directly from your editor.

💡 To recreate the pull request edit the issue title or description.