Original Author Paul Laughton, 2011
Page 85
De Re BASIC!
However, an Include in a single-line If is ignored:
IF x THEN INCLUDE functions/DrawGraph.bas ELSE PRINT "bad!"
In this example, the file is not inserted in place of the Include statement.
Run <filename_sexp>{, <data_sexp>}
This command will terminate the running of the current program and then load and run the BASIC!
program named in the filename string expression. The filename is relative to BASIC's "source/"
directory. If the filename is "program.bas" and your <pref base drive> is "/sdcard" (the default), then the
file "/sdcard/rfo-basic/source/program.bas" will be executed.
If the filename parameter is omitted, and the currently executing program has a name, then the
program restarts. The program does not have a name if you run from the BASIC! Editor without first
saving the program; in this case Run terminates your program with a syntax error.
The optional data string expression provides for the passing of data to the next program. The passed
data can be accessed in the next program by referencing the special variable, ##$.
Run programs can be chained. A program loaded and run by means of the Run command can also run
another program file. This chain can be a long as needed.
When the last program in a Run chain ends, tapping the BACK key will display the original program in the
BASIC! Editor.
When a program ends with an error, the Editor tries to highlight the line where the error occurred. If the
program with the error was started by a Run command, the Editor does not have that program loaded.
Any highlighting that may be displayed is meaningless.
Program.info <nexp>|<nvar>
Returns a Bundle that reports information about the currently running program. If you provide a
variable that is not a valid Bundle pointer, the command creates a new Bundle and returns the Bundle
pointer in your variable. Otherwise it writes into the Bundle your variable or expression points to.
The bundle keys and possible values are in the table below:
Key
Type
Value
BasPath
String
Full path + name of the program currently being executed.
The path is relative to BASIC!'s "source/" directory.
BasName
String
Name of the program currently being executed.
SysPath
String
Full path to the BASIC!'s private file storage directory.
The path is relative to BASIC!'s "data/" directory.
UserApk
Numeric
(Logical)
Returns 1.0 (true) if the current program is being run from a
standalone user-built APK (Appendix D).
Returns 0.0 (false) if the program is being from from the BASIC!
Editor or a Launcher Shortcut (Appendix C).