Microsoft KB Archive/62455

From BetaArchive Wiki
Knowledge Base


Invalid Entries in Symbol Table Using F1 in QB.EXE, QBX.EXE

Article ID: 62455

Article Last Modified on 11/21/2006



APPLIES TO

  • Microsoft QuickBasic 4.0
  • Microsoft QuickBASIC 4.0b
  • Microsoft QuickBasic 4.5 for MS-DOS
  • Microsoft BASIC Professional Development System 7.0
  • Microsoft BASIC Professional Development System 7.1



This article was previously published under Q62455

SUMMARY

Within the QB.EXE or QBX.EXE programming environment, if you create a variable of any type and then position the cursor on the variable and press F1, the Help window will appear, showing the type of the variable and how it is used in the program. If you then change the type of the variable and request help on the variable again, it will now be shown as being defined as both types, even though the variable appears in your program only once.

This information applies to QB.EXE for QuickBasic version 4.50 for MS-DOS, and QBX.EXE for Microsoft Basic Professional Development System (PDS) versions 7.00 and 7.10 for MS-DOS.

MORE INFORMATION

Although the variable appears in the Help window as being defined as two variable types, memory is only allocated for the variable of the type it was last declared as. The symbol table used for displaying help on variables is updated only when QB.EXE or QBX.EXE is returned to the root state, which is when a new program is loaded or the current program is saved. To eliminate the duplicate entries, save the current program by pressing ALT+F, then "S" for Save or "A" for Save As. (The program does not need to be reloaded.)

The following steps duplicate the problem:

  1. Load QB.EXE or QBX.EXE and type the following on a separate line:

    x$ = ""

  2. Place the cursor on the "x$" and press F1 to get help on the variable.
  3. With Help visible, change the line to read:

    x = 0

  4. Place the cursor on the "x" and press F1 to get help on the variable.

You will now see the following in the Help window:

x is a symbol that is used in your program as follows:


    | D:\TEST.BAS -----------------------
    | variable of type: STRING
    | variable of type: SINGLE precision
                


Additional query words: QuickBas BasicCom

Keywords: KB62455