Original Author Paul Laughton, 2011
Page 118
De Re BASIC!
The orientation upon opening the HTML screen will be determined by the <Orientation_nexp> value.
<Orientation_nexp> values are the same as values for the Html.orientation command (see below). If the
<Orientation_nexp> is not present, the default orientation is determined by the orientation of the
device.
Both <ShowStatusBar_lexp> and <Orientation_nexp> are optional; however, a <ShowStatusBar_lexp>
must be present in order to specify an <Orientation_nexp>.
Executing a second HTML.OPEN before executing HTML.CLOSE will generate a run-time error.
Html.orientation <nexp>
The value of the <nexp> sets the orientation of screen as follows:
-1 = Orientation depends upon the sensors.
0 = Orientation is forced to Landscape.
1 = Orientation is forced to Portrait.
2 = Orientation is forced to Reverse Landscape.
3 = Orientation is forced to Reverse Portrait.
Html.load.url <file_sexp>
Loads and displays the file specified in the string <file_sexp>. The file may reside on the Internet or on
your Android device. In either case, the entire URL must be specified.
The command:
HTML.LOAD.URL "http://laughton.com/basic/"
will load and display the BASIC! home page.
The command:
HTML.LOAD.URL "htmlDemo1.html"
will load and display the html file "htmlDemo1.html" residing in BASIC!'s default "data" directory, as set
by your "Base Drive" preference. You may also use a fully-qualified pathname. With the default "Base
Drive" setting, this command loads the same file:
HTML.LOAD.URL "file:///sdcard/rfo-basic/data/htmlDemo1.html"
When you tap the BACK key on the originally-loaded page, the HTML viewer will be closed and the
BASIC! output console will be displayed. If the page that was originally loaded links to another page and
then the BACK key is tapped, it will be up to the BASIC! programmer to decide what to do.
Html.load.string <html_sexp>
Loads and displays the HTML contained in the string expression. The base page for this HTML will be:
<pref base drive>/rfo-basic/data/