Source files can be saved or opened by using the .S and .O commands, respectively. Let’s save the small test program:
5: .s test1.rit
saving to test1.rit
>>> 50 bytes written
5:
Starting a completely new source can be initiated by using the open command with parameter ‘NEW’:
5: .o new
1:
Now all the previous text in the editor is deleted and it has returned back to its initial state, ready for new text.
Let’s open the test program again:
1: .o test1.rit
opening test1.rit
>>> 50 bytes read
5:
.l
1: var byte a=0;
2: while a<10;
3: print a++,CRLF;
4: until;
5:
After a program has been written and the developer is happy with its performance, it can be compiled and stored as a binary executable for further distribution. Binary executables do not contain source code, but only the machine code as compiled for the RVM.
Generating a binary executable file is done by using the .# command. Before saving as binary executable, though, the program needs to be compiled, so combining the two commands in a single line will perform the needed operations at once:
5: .[# test1.rxe
lines compiled: 4
code length: 48 bytes
saving to test1.rxe
>>> 48 bytes written
5:
Now on the current file drive we should have saved both the source file test1.rit and the executable binary test1.rxe
Although not enforced by RIDE, in order to ensure further compatibility in future, it is recommended that Rittle source files are always stored with file extension .RIT and the executables are stored with file extension .RXE
Exiting RIDE is done by executing ._ command. The source file that is currently in the editor remains in memory, so re-entering RIDE later, will allow further work from that point.