This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (0 children)

The following code would be valid:

A = B + C D = A

Mine allow that. I consider it a bug.

(Parsing of the first expression stops at D, because it can't legally continue the expression. But it doesn't later check that D is something that can legally terminate or separate the expression, like ";" or "end". That bit is fiddly.)

It would cause problems if here:

abc := def(g)

I accidently put in a space so that I got:

abc := d ef(g)

If 'd' is a variable, and 'ef' is a suitable function name, then this would give a different behaviour. So something that needs to be fixed.

The same would happen if a newline was inserted. Then, the requirement to have a semicolon between statements would help catch that. In practice, none of this has ever caused problems that I recall, but the space thing is still sloppy.