HP 3000 Manuals

User Defined Function Keys [ HP Business BASIC/XL Migration Guide ] MPE/iX 5.0 Documentation


HP Business BASIC/XL Migration Guide

User Defined Function Keys 

Deleted Statements 

HP Business BASIC/XL does not support the EDIT KEY and LIST KEY commands.
Use the terminal function key editing features instead.

Number of Softkeys Available 

In HP Business BASIC/XL, you can define up to a maximum of 8 softkeys;
BASIC/260 let you define 24.  For increased compatibility, do not develop
new programs with multiple and different softkey levels.

Video Enhancements in User Defined Function Keys 

HP Business BASIC/XL does not support video enhancements in softkey
labels.  In BASIC/260, it is common to highlight selected softkeys with
video enhancements.  For increased compatibility, do not use enhancements
in softkey labels, use special characters (like asterisks) instead.

     Example:
        Hit_1_off:  ON KEY 1 GOTO Hit_1_on; LABEL="Hit me "
        .
        .
        .
        Hit_1_on:  ON KEY 1 GOTO Hit_1_off; LABEL="Hit me*"

Label Text Length in User Defined Function Keys 

HP 260 softkeys have room for eighteen characters (2*9) in each softkey
label, HP 3000 softkeys have only have room for 16 characters (2*8) in
each softkey.  For increased compatibility, use sixteen characters or
less in softkeys.  The key display algorithm automatically centers
softkey labels.  However, centering can be different in HP Business
BASIC/XL because the labels are a different width.

Real Softkey Interrupts 

HP 260 softkeys can interrupt programs at any point.  or during every
idle INPUT statement; pressing a softkey can stop a program in the middle
of a processing sequence.  The example below illustrates:

             ON KEY#8:"abort" GOTO Exit
               LOOP
                  do some print processing
               END LOOP

Pressing softkey 8, labeled "abort", lets you stop the processing of this
program in the middle of printing a report.

The HP 3000 does not process softkeys as interrupts; it traps pressed
keys only when a program is in an input state.  The only real interrupt
is CTRL Y. CTRL Y is the equivalent of HALT and can be acted on with the
ON HALT statement in HP Business BASIC/XL. Pressing softkey 8 in the HP
Business BASIC/XL program has no effect and the statement inside the loop
continues to execute.

For increased compatibility do not use dynamic softkeys; only use
softkeys with input statements or WAIT statements.  The migration aid,
BBCT250.PUB.SYS, automatically changes the WAIT statement to the
following:

             LOOP
                 ACCEPT
             END LOOP

This has the same effect in HP Business BASIC/XL as in BASIC/260.

Either use ON HALT GOTO to branch to code that sets up softkeys when
program logic requires a dynamic softkey, like in the first example, or
change the logic of your program when you migrate to HP Business
BASIC/XL.

Cursor Movement and INPUT in User Defined Function Keys 

On the HP 260, pressing a softkey does not move the cursor.  On HP 3000
terminals, however, pressing a softkey normally causes a carriage return
(CR-LF) to echo.  This affects applications that use RPOS and CPOS (XPOS
and YPOS on the HP 260) afterward.

HP Business BASIC/XL softkeys also terminate input, unlike BASIC/260
softkeys.  The variable being input when the key is hit will not be
assigned a value.

See the Input and Output section in this chapter for more details.



MPE/iX 5.0 Documentation