Original Author Paul Laughton, 2011
Page 117
De Re BASIC!
The <file_table_nexp> parameter is a file table number returned by a previous Zip.open command. If
the file number is -1 then the command throws a run-time error.
If the file <file_name_sexp> is not found in the ZIP, <buffer_svar> is set to "EOF".
If the user tries to read the content of a zipped directory, instead of a zipped file, then the command
throws a run-time error. To read the contents of a zipped directory, use Zip.dir.
Zip.write <file_table_nexp> ,<buffer_sexp>, <file_name_sexp>
Writes the entire contents of the string expression <buffer_sexp> into a ZIP, as a file named
<file_name_sexp>. The ZIP is in a file previously opened with Zip.open.
The string <buffer_sexp> is assumed to be a buffer string holding binary data, typically a string coming
from reading a local file with Byte.read.buffer.
HTML
Introduction
The BASIC! HTML package is designed to allow the BASIC! programmer to create user interfaces using
HTML and JavaScript. The interface provides for interaction between the HTML engine and BASIC!. The
HTML programmer can use JavaScript to send messages to BASIC!. The HTML engine will also report
user events such as the BACK key, hyperlink transfers, downloads, form data and errors.
The demo program, f37_html_demo.bas, combined with the HTML demo files, htmlDemo1.html and
htmlDemo2.html, illustrate the various commands and possibilities. The content of all three files are
listed in the Appendix B of this document. They are also delivered with the BASIC! apk. It is highly
recommended that all three files be carefully studied to fully understand this interface.
Another demo program, f38_html_edit.bas, can be used to edit html files. To use the program, run it
and enter the html file name without the html extension. The program will add the extension ".html".
Caution: Forum users have reported problems in HTML mode with commands that use a new window or
screen to interact with the user (Input, Select and others), or when using the BACK key to try to control
actions outside of the HTML WebView.
HTML Commands
Html.open {<ShowStatusBar_lexp> {, <Orientation_nexp>}}
This command must be executed before using the HTML interface.
The Status Bar will be shown on the Web Screen if the <ShowStatusBar_lexp> is true (not zero). If the
<ShowStatusBar_lexp> is not present, the Status Bar will not be shown.