BasicSharp icon indicating copy to clipboard operation
BasicSharp copied to clipboard

Is it possible to single step the basic code?

Open mercurial-moon opened this issue 1 year ago • 2 comments

HI, Thanks for the wonderful contribution. Is there a mechanism to single step the basic code, if not can you please let me know would it be simple to create such a feature?

mercurial-moon avatar May 31 '23 10:05 mercurial-moon

Hey, sorry for long time without respond.

Code dont allow it but can be modified to do so.

in interpreter.cs there is this code:

        public void Exec()
        {
            exit = false;
            GetNextToken();
            while (!exit) Line(); // do all lines
        }

You can add two new method lets say Init() and Step():

        public void Init()
        {
            exit = false;
            GetNextToken();
        }
        public void Step()
        {
            if(!exit) Line(); 
        }

Timu5 avatar Jun 13 '23 11:06 Timu5

Thanks for the response! Really appreciate it!

mercurial-moon avatar Jun 14 '23 08:06 mercurial-moon