Project

General

Profile

Bug #668

If there is a conflict between a Variable name and a Procedure name, an incorrect error message (Syntax error) is displayed.

Added by Brian Flanagan about 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Low
Target version:
-
Start date:
02/18/2021
Due date:
% Done:

0%

Estimated time:
1:00 h
Affected version:

Description

Example:

Global HIT ' Make integer variable global (Can't use Global on Procedure, so NEVER a conflict.)
HIT=3      ' Set integer variable         (Can't set a Procedure with =, so NEVER a conflict.)
HIT        ' Call the procedure.          (Name is by itself, so this is a Procedure call.  NEVER a conflict.)
Print HIT  ' Print variable's contents.   (There is no way to distinguish between the Variable and the procedure call.  CONFLICT!)

Procedure HIT
  Print "hit"
End Proc[1] ' return result of 1.

The above code produces a "Syntax Error" in line 1 (or in line 2 if line 1 is commented).

This is incorrect and misleading.
Instead, the error message should be: "Conflict between variable and procedure name HIT in line 4."

#1

Updated by Brian Flanagan about 3 years ago

  • Affected version changed from 1.0.0 (B3) to 1.0.0 (B5)

Re-tested in 1.0.0 (B5).
Still a problem.

#2

Updated by Francois Lionet about 3 years ago

  • Status changed from New to Resolved
  • Assignee set to Francois Lionet

Fixed

#3

Updated by Brian Flanagan almost 3 years ago

Verified working. Thanks Francois! :-)

#4

Updated by Brian Flanagan almost 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF