Syntax Error, Duplicate Definition, Expected: Variable=Express (42321)



The information in this article applies to:

  • Microsoft QuickBASIC 4.0
  • Microsoft QuickBASIC 4.0b
  • Microsoft QuickBASIC 4.5
  • Microsoft Basic Professional Development System for MS-DOS 7.0

This article was previously published under Q42321

SUMMARY

The sample code below shows three very closely related pairs of Basic code. Each example produces a different error, as shown.

This information applies to the QB.EXE environment supplied with QuickBasic Versions 4.00, 4.00b, and 4.50, Microsoft Basic Compiler Versions 6.00 and 6.00b for MS-DOS, and the QBX.EXE environment supplied with Microsoft Basic PDS Version 7.00 for MS-DOS.

Under QuickBasic Version 3.00, all three code segments produce the error message "MISSING =".

The following are code examples:
' PROG #1
     bd% = 6
     bd% - 13 = c   ' "Expected: variable= expression"

' PROG #2
     bd% = 6        ' "Duplicate Definition"
     bd - 13 = c

' PROG #3
     x% = 6
     bd - 13 = c    ' "Syntax error"
				

Modification Type:MinorLast Reviewed:8/16/2005
Keywords:KB42321