LANGUAGES [ COMMUNICATOR 3000/XL XL RELEASE 2.1 ] MPE/iX Communicators
COMMUNICATOR 3000/XL XL RELEASE 2.1
Chapter 4 LANGUAGES
HP Business BASIC/XL Enhancement
by Elice Yung/Joseph Coha
Systems Technology Division
PRODUCT OVERVIEW
This version of HP Business BASIC/XL (A.00.01) includes an enhancement
that suppresses code generated for the main when GLOBAL OPTION SUBPROGRAM
is used. Additional enhancements have been made to the cross-reference
command, the JOINFORM editor, JOINEDIT, and the IMAGE statement. A
document is available to assist the programmer with BASIC/XL. The
following describes each of these enhancements.
GLOBAL OPTION SUBPROGRAM CHANGE
The default for GLOBAL OPTION SUBPROGRAM has been changed. GLOBAL OPTION
SUBPROGRAM is intended to be used to compile only the procedures or
functions in a program. The structure of a compiled BASIC/XL program
with GLOBAL OPTION MAIN includes an outer block which calls the main of
the program. The main is actually a procedure in the program file.
Calls to other procedures or functions in the program file are made from
the main or from the other procedures or functions. When the main is
finished executing, control returns to the outer block of the program
which is responsible for cleaning up the data space and closing any open
files. In an application that has multiple program files, the main of
the application is in one program file and called procedures or functions
are in additional program files. Each of the additional program files
uses the GLOBAL OPTION SUBPROGRAM to suppress the generation of the outer
block so that the system will recognize a unique entry point when the
application is linked. Most applications call the procedures or
functions in these additional program files, but the main is required in
order to declare common areas. Unfortunately, a separate entry point and
code is generated for the main in each of these additional files. These
additional mains increased the size of the resulting application without
adding any functionality. As a result, the default for GLOBAL OPTION
SUBPROGRAM was changed so that the code for the main is also suppressed.
The new functionality can result in a substantial savings for
applications that use multiple program files. To supply the old
functionality, if you are actually calling the main in a program file
with GLOBAL OPTION SUBPROGRAM, you must run the compiler with
info='$compile_main'. The additional information can be supplied on the
command line. For example,
BBXLCOMP srcfile;info='$compile_main'
New Format Specifier for IMAGE Statement
The 'B' format specifier for the IMAGE statement has been added. When
the 'B' format specifier is used, blanks are displayed for the length of
the numeric field if the value to be displayed is zero. Otherwise, the
functionality of 'B' is exactly the same as 'D'.
XREF Command Works on Programs with Verify Errors
The XREF command in the interpreter generates a cross reference for a
program that contains VERIFY errors. Previously, XREF would not generate
a cross reference if VERIFY errors were detected.
All Forms in a File Can be Printed Using JOINEDIT
JOINEDIT allows the printing of all forms contained in a forms file by
using the '@' option.
Programming in HP Business BASIC/XL
Programming in HP Business BASIC/XL is a document in ASCII file
format that is available on the MPE XL SUBSYS tape under the name
Z00Z715A.HP32715.CLL. The manual has been updated for the A.00.01
release. The file describes key programming concepts useful for
programming in HP Business BASIC/XL on MPE XL. The file is a guide to the
BASIC/XL language and features chapters on the interpreter, compiler,
data files, database usage, the report writer, VPLUS forms, program
performance, calling external subroutines, the Program Analyst and
JOINFORM.
The Z00Z715A file can be restored from the SUBSYS tape used to install or
update your MPE XL system by mounting the SUBSYS tape and using the MPE
:RESTORE command. To print the file use the environment file
ELITE.HPENV.SYS. The Z00Z715A file contains no formatting commands.
Example: FILE DOCU;DEV=PP;ENV=ELITE.HPENV.SYS
FCOPY FROM=Z00Z715A;TO=*DOCU
Using Online Help
The BASIC/XL product contains an extensive online help facility as part
of the interpreter. Users can enter any BASIC/XL keyword to obtain a
description of its syntax and usage. Also, the main HELP menu provides a
list of categories of features for users to review.
The NEWS category provides users with up-to-date information about using
the BASIC/XL product. The NEWS text will be changed with every release
to reflect changes, major fixes, programming hints and suggestions for
improving performance. For example, this version of NEWS contains
information about the GLOBAL OPTION SUBPROGRAM change described in this
article.
MPE/iX Communicators