HP 3000 Manuals

Enhancing Migrated HP Business BASIC/V Applications [ HP Business BASIC/XL Migration Guide ] MPE/iX 5.0 Documentation


HP Business BASIC/XL Migration Guide

Enhancing Migrated HP Business BASIC/V Applications 

To enhance your migrated HP Business BASIC/V programs, use the new
features listed below.  New features are HP Business BASIC/XL features
that are not offered in HP Business BASIC/V. For more information about
any of the features listed below, refer to the HP Business BASIC/XL 
Reference Manual.

 *  New Options in the EXTERNAL Statement.

    HP Pascal has a new procedure option, EXTENSIBLE, that specifies the
    minimum number of parameters to be passed to a procedure.  Required
    formal parameters are called nonextension parameters.  Optional
    formal parameters are called extension parameters.  HP Business
    BASIC/XL interfaces with this option through the EXTENSIBLE clause of
    the EXTERNAL Pascal statement.  Some intrinsics include this as a
    specified procedure option contained in the intrinsic file.  In HP
    Business BASIC/XL, you specify the required number of parameters as a
    numeric literal.  The rest of the parameters are optional.  A hidden
    parameter that indicates the number of parameters passed is passes to
    the external routine.

    Missing actual parameters are supplied when the intrinsic file
    specifies default values.

    You can specify the EXTENSIBLE clause in the EXTERNAL Pascal
    statement as shown below:

    EXTERNAL PASCAL

    [EXTENSIBLE=[num_literal]][function_return_type]external_name 

    [ALIAS alias_name][parameter_list]

 *  Calls to HP C/XL Are Supported.

    HP C/XL is a native mode language on MPE XL. HP Business BASIC/XL
    supports calls to HP C/XL through the EXTERNAL statement.  Every HP
    Business BASIC/XL data type is a valid parameter for HP C/XL external
    routines.

    EXTERNAL HPC

    [function_return_type]external_name[ALIAS alias_name][parameter_list]

    For complete information about the EXTERNAL statement, refer to the
    HP Business BASIC/XL Reference Manual.

 *  IN DATA SET REALV.

    IN DATASET dset USE REALV pack_item_list

    TurboIMAGE databases are STORE/RESTORE compatible; real numbers in
    database files are stored in MPE V real format.  The default real
    data type in a native mode program is in IEEE real format.  Specify
    "REALV" in the IN DATASET statement if you use real data types as a
    search condition or as a key in sorting.  See chapter 5, "Migrating
    TurboIMAGE/V Databases," for detailed information about database
    migration with real data type.

 *  PACKFMT REALV.

    PACKFMT REALV pack_item_list 

    Use PACK and UNPACK statements for writing values to and reading
    values from strings.  Specify the variables being moved in the
    PACKFMT list.  The default real data type in native mode programs is
    in IEEE floating-point real format; you must specify "REALV" in the
    PACKFMT statement if you want to use MPE V real data format.  For
    example, if an HP Business BASIC/XL data file is being shared among
    native mode and compatibility mode programs and real variables are
    being packed and unpacked, specify "REALV" in the PACKFMT list to
    preserve data integrity.  IEEE real numbers are changed to MPE V real
    numbers before variables are written to the string.  MPE V real
    numbers are changed to IEEE real numbers before the value in the
    string is assigned to the appropriate variable.

    See chapter 5, "Migrating TurboIMAGE/V Databases," for more
    information about database migration with REAL data type.

 *  GLOBAL COPTION RLFILE.

    GLOBAL COPTION RLFILE compiles each main and each procedure or
    function into a separate object code file.  Compiler output is a
    relocatable library (NMRL) file instead of an object (NMOBJ) file.
    More than one program subunit can be compiled into a Relocatable
    Library (RL). Use Relocatable Libraries for storing subprograms that
    contain frequently used common routines.  The library routine in the
    relocatable object module becomes part of the program file when the
    link editor merges the relocatable object containing the referenced
    code into the program file.  Once the executable program file is
    created, the program is insulated from changes made to library
    routines.  Relink the program using the modified library when you
    want to incorporate library changes into a program.  Refer to the HP 
    Link Editor/XL Reference Manual for more information about using RL
    files.

 *  GLOBAL COPTION RLINIT.

    The GLOBAL COPTION RLINIT compiler option is valid only if the RLFILE
    option is on.  Use is when you are compiling into an existing NMRL
    file that you want to initialize before compiling.

 *  COPTION LOCALITY = quoted-str-lit.

    The COPTION LOCALITY compiler option names the locality set that
    subprograms are placed in.  Using locality names improves program
    performance when calling a routine in the same locality set requires
    fewer page faults than calling a routine in a different locality set.
    COPTION LOCALITY = quoted-str-lit is only valid if the RL file option
    is on.  Refer to the HP Link Editor/XL Reference Manual for more
    information.

 *  COMPLK.

    Use the COMPLK command to compile and link programs in the
    interpreter.  This command is similar to COMPPREP on MPE V.

 *  GLOBAL COPTION OPTIMIZE = {0|1} This option controls the level of
    program optimization.  Compile time increases as the level of
    optimization increases, but execution time and code size decrease.
    Level 1 optimization, the default, rearranges instructions within an
    individual statement and eliminates unnecessary or redundant
    instructions.  The result is an object code file that is both smaller
    and faster than level 0.  Level 0 optimization is useful for
    debugging with DEBUG/XL because the line numbers of the program are
    displayed in the program window.



MPE/iX 5.0 Documentation