Jay,
Thanks for taking the trouble to reply.
I have, thanks, and it is nice and clean (semantics/syntax-wise by
comparison). Been using Delphi since it was released, and Turbo +
Borland Pascal for years before that. Suddenly I have a need to get
to grips with VBA and that's why I asked the question. Why does VBA
need two different operators to signify assignment?
I'm sure that's the myth, but I don't buy it for a moment. The VBA
parser will far more frequently have to deal with the potential
ambiguity between the equals sign used as meaning "equal" and as LHS
should get the value of RHS (as in assignment). Why it should need to
treat assignment of named parameters differently is a bit of a
mystery.
Well, one can define a computer language using Lex + Yacc (and I have
many times), and the question of "easier" just doesn't arise. The
state-machine that Yacc constructs just handles the difference, if the
grammar is unambiguous. If it isn't unambiguous, then redefine the
language.
Anyway, the fact that language creators hand-coding a parser might
find it more difficult to deal with equals vs. assignment is not a
good reason to inflict it on the language's users. They would have
done better to avoid using the equals sign to mean assignment in the
first place.
Btw, I am absolutely not trying to start a flame war, I was just
curious what be the reason why VBA users would have to put up with
having two different flavours of assigment.
Cheers, Martyn