On Tue, Dec 6, 2011 at 2:41 PM, vlad777
<address@hidden> wrote:
For example, my octave prompt is showing line number 7 octave...:7>
Is there a way to delete 4th line so that now it shows 6.
Or can I cancel all my previous lines and reset this counter?
Many Thanks
Hi,
First, I don't believe it is possible.
Second, why would you want to? The counter (AFAIK) is there simply as a way to identify the line you're on usually when debugging something. Particularly at the prompt, it doesn't serve much of a purpose (I think you can hide it, but I don't know the details).
I think you have a misconception of how the prompt works. After you type in a command, say:
octave:1> a= 5;
Then octave creates a variable called "a" that is assigned the value 5. Then that variable is available to use as you see fit, but the line itself has executed and gone (well except as an entry in the history). You could undo the line in some sense by clearing the variable like:
octave:2> clear a;
but this isn't what (I think) you mean by "deleting" a line.
Perhaps you could clarify what you're trying to do and why?