Page 1 of 1

Repeat Last Command Function

Posted: Fri Oct 14, 2022 7:47 am
by Manannan

In a modern command line I can repeat the last command I entered by pressing the 'up' button.



If there enough memory on the Commander for this? 



Would you consider adding it to BASIC?


Repeat Last Command Function

Posted: Fri Oct 14, 2022 8:19 am
by desertfish

This feature would be incompatible with the screen editor that is used to enter and edit basic programs.


Repeat Last Command Function

Posted: Sat Oct 15, 2022 1:32 am
by kelli217

If you execute a command in immediate mode that doesn't cause the command itself to no longer be on the screen, you can just press the up-arrow key to get to that line again, and press Enter, and it will run again.


Repeat Last Command Function

Posted: Mon Oct 17, 2022 7:30 am
by Manannan

I have to ask a really dumb question, I couldn't easily find the answer in the manual sorry.

I typed a simple print statement into the BASIC editor, pressed the up arrow to return to my print statement and pressed enter, nothing happened. 



What am I doing wrong?


Repeat Last Command Function

Posted: Mon Oct 17, 2022 8:46 am
by JimmyDansbo


On 10/17/2022 at 9:30 AM, Manannan said:




I typed a simple print statement into the BASIC editor, pressed the up arrow to return to my print statement and pressed enter, nothing happened. 



Maybe the exact same thing happened again and that is why it looks like nothing happened?

It may help if you show ud the print statement


Repeat Last Command Function

Posted: Mon Oct 17, 2022 10:51 pm
by kelli217

What Jimmy said. Make a slight change to the PRINT statement before you hit Enter the second time. Or print something like a system variable that constantly changes, such as TI (the system timer in 60ths of a second since boot).

 


Repeat Last Command Function

Posted: Tue Oct 18, 2022 11:42 am
by Manannan

You guys were right, I just didn't understand how things worked.



I wrote this into the BASIC editor:

LET X = 0;

<ENTER>

X = X + 1

<ENTER>

<UP ARROW>

<UP ARROW>

<UP ARROW>

<ENTER>

PRINT X;

 

The result is 2. 



Thanks. It was clear I didn't properly know how to use the editor.