hibbidiji
asked on
E2066 Missing operator or semicolon error for NO reason
I have the following line of code. If it is in my app, it will fail with the message: E2066 Missing operator or semicolon. If the line is NOT there, it will compile fine.
Artist is a valid public string to the unit.
if Length(artist) = 0 then artist := 'Unknown';
Why the heck is this happening?
Artist is a valid public string to the unit.
if Length(artist) = 0 then artist := 'Unknown';
Why the heck is this happening?
are you sure there's a semicolon before the line you wrote above?
if you show few lines from your code, it will be easier to analyze your problem
if you show few lines from your code, it will be easier to analyze your problem
I agree, more than likely the problem is with the line above, what's the chances you have a nested if statement / case statment just above?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Is artist or length being used in a different context to normal? e.g. using artist as the unit name; using length as a variable, using either of these in a Const declaration. Look for Includes in your code.
What happens if you override the artist declaration by defining it within the function/procedure where this error is occurring? (I know this will prevent the program from working correctly, but may give a clue where the problem is).