Rem Programming Shell
Rem A programming tool written in J.M.K S.F. RapidBATCH¸ PL!!
Rem #########################################################

Dec [usefile],[prompt],[temp]
Cls 1
EchoLn J.M.K S.F. RapidBATCH¸ PL 1.1 PROGRAMMING SHELL 1.1 (Example Program)
EchoLn Public Domain
EchoLn.
EchoLn.
let [usefile]=[cmdln]
If [usefile]='' Let [usefile]=noname.rb

%newprompt
text 9
Echo [usefile] 
text 7
Input [prompt]

If [prompt]='edit' Goto editfile
If [prompt]='run' Goto runfile
If [prompt]='load' Goto loadfile
If [prompt]='del' Goto delfile
If [prompt]='compile' Goto compilefile
If [prompt]='new' Goto newfile
If [prompt]='help' Goto help
If [prompt]='dos' Goto dos
If [prompt]='exit' Halt
If [prompt]='cs' Goto cs
If [prompt]='' Goto newprompt

text 4
Echo Unknown: 
EchoLn [prompt]
Goto newprompt

%editfile
LinkVar [temp]='edit '+[usefile]
Shell [temp]
Goto newprompt

%runfile
LinkVar [temp]='rbi '+[usefile]
Shell [temp]
Goto newprompt

%loadfile
Echo Enter new filename: 
Input [temp]
If [usefile]='' Goto newprompt
Let [usefile]=[temp]
Goto newprompt

%delfile
Echo Enter a filename: 
Input [usefile]
If [usefile]='' Goto newprompt
LinkVar [temp]='del '+[usefile]
Shell [temp]
Goto newprompt

%compilefile
LinkVar [temp]='rbc_win '+[usefile]
Shell [temp]
Goto newprompt

%newfile
Echo Enter new filename: 
Input [temp]
If [usefile]='' Goto newprompt
Let [usefile]=[temp]
Goto newprompt

%help
EchoLn Command Help
EchoLn.
EchoLn Edit             Edit programs
EchoLn Run              Run programs
EchoLn Compile          Compile programs
EchoLn Load             Load programs
EchoLn Exit             Exit shell
EchoLn Del              Delete programs
EchoLn Help             Command help
EchoLn Dos              Dos shell
EchoLn Cs               Clear screen
EchoLn.
EchoLn Please enter commands only in lower cases!
Goto newprompt

%dos
EchoLn Please enter EXIT to go back...
Shell.
Goto newprompt

%cs
Cls
Goto newprompt

End

