PreviousNext
Help > RIDE > Writing Programs in the Text Editor
Writing Programs in the Text Editor

Let’s write a line:

  1: var byte a=0;
  2:

After writing the line and pressing the <Enter> key, the text editor has accepted the line, stored it in the memory, and ready for a new one. Let’s continue further:

  1: var byte a=0;
  2: while a<10;
  3:    print a++,CRLF;
  4: until;
  5:

At this stage we may decide to make a change somewhere in the source, for example to change the number in the ‘while’ condition. For that, first we need to go back to the line, but even before that we may want to see the program again:

  5: .l

  1: var byte a=0;
  2: while a<10;
  3:    print a++,CRLF;
  4: until;
  5:

 

Now we jump to the needed line:

  5: .2

  2: while a<10;

After jumping to line 2, the cursor positioned on its first character and now we can edit the line.

Note that while over a line with text, any RIDE dot-commands that start from the very beginning of the line, are executed without affecting the source code. Thus while on line 2, if we jump back to the bottom of the source code by command .0

  2: .0while a<10;

After <Enter> the rest of the line gets erased from view for clarity.

  2: .0

  5: