Anyone heard of 'something like' EDITLN or EDITLINE or LINEDIT statement in BASIC?

Anyone heard of 'something like' EDITLN or EDITLINE or LINEDIT statement in BASIC for editing lines of a program's own code while executing ?

I seem to remember a statement that was spelled 'something like' EDITLN or EDITLINE or LINEDIT, and wonder if maybe there was one -

• In any version of BASIC
• Used for editing lines of a program's own code while executing

Yes, this question would be a duplicate of Was self-modifying code possible using BASIC?, so I expect it should be immediately closed, and I will paste it into Was self-modifying code possible using BASIC? .

EDIT -
The edit command in GW-Basic is an answer .It seems I was probably remembering EDLIN in MSDOS and couldn't remember what it was . I find it difficult to significantly distinguish this question from the original .I myself won't close this question, incase anyone else is hoping for more answers. The vote should decide it .

• I'm voting to close this question as off-topic because as an ON PURPOSE duplicate it's at least a misunderstanding if not a misuse - you may rather delete it yourself ASAP – Raffzahn Aug 5 at 6:39
• While this question is similar to the linked question, it is not a duplicate as self-modifying BASIC code didn't necessarily use EDITLN etc, it used the likes of POKE as described in answers there. I am inclined to leave this open and not edit the other question. The two questions could reference each other. – Chenmunka Aug 5 at 8:40
• The closest I can find is the edit command in GW Basic: gwbasicprograms.blogspot.com/2012/01/gw-basic-commands.html – Michel Keijzers Aug 5 at 10:46
• From memory - I haven't been able to find it anywhere else - there was a third-party add-on ROM for the HP9845 that enabled a command that had commands enabling reading and writing lines of BASIC from within a program. [Something like Line$= PREAD(150) and PWRITE(Line$)] I remember having such a ROM about 1980 but only regularly used some of its less radical features. – Chenmunka Aug 5 at 12:16
• Possible duplicate of Was self-modifying code possible using BASIC? – Brian H Aug 5 at 16:33

Many versions of BASIC had an "edit" command to allow character-based interactive editing of an existing statement, but invoking it from within a running program would terminate execution.

If memory serves, on a typical implementation such as the TRS-80, the system would display the line number with the cursor immediately following. Pressing spacebar would copy one character from the original line and advance the "original line position" pointer. Backspace would remove a character and move the "original line position" pointer back one character. Using other keys would allow one to insert, delete, or replace text within the program line, and pushing enter would copy all remaining text from the original line and exit edit mode.

This facility was useful on systems like the TRS-80 which did not allow text to be read off the screen, but wasn't needed on the Commodore or Apple II, which did.

• Did you notice the part of the question that specifies the command must be "[u]sed for editing lines of a program's own code while executing"? I think between that and the other comments in the question saying it is a duplicate make the intent clear. – Curt J. Sampson Aug 6 at 17:22
• @CurtJ.Sampson: The title question is about whether anyone remembers an "edit" statement in BASIC. Further, it seemed likely to me that the person was correctly remembering the existence of a statement with that name, but misremembering the purpose. – supercat Aug 6 at 17:26
• Sure, but given that question titles are supposed to be short, I personally would not ignore clarification in the body and answer a clearly different interpretation of the title question. – Curt J. Sampson Aug 6 at 17:30
• @CurtJ.Sampson: Note the last clause of my first paragraph, which addresses the "self-modifying code" angle. – supercat Aug 6 at 17:34
• Yes, I had noted that before making any of my comments, and took it into account. – Curt J. Sampson Aug 6 at 17:37

Nearest I can get is this:

I recall a BASIC command to receive an input and execute as an instruction while the program was running. It was in a microcomputer at school (the early 80s), can't remember the model.

The command was EVAL. So you get a string with a BASIC instruction and then EVAL will execute that string as a normal BASIC instruction, while the program was running. This command wasn't present in every BASIC.

https://en.wikipedia.org/wiki/Eval