Dependence on Programming Experts
Troy Rollins
troy_lists at rpsystems.net
Tue Jul 11 21:29:38 EDT 2006
On Jul 11, 2006, at 8:05 PM, Mark Smith wrote:
> So in Revolution, 'x = 5' is an expression that evaluates to true
> if the value held in variable x happens to be 5, and I'd imagine
> that changing this might cause all sorts of trouble. Maybe it would
> be practical to implement a pascal-type '==' assignment operator,
> but I don't know enough about the way scripts are compiled to know
> if that could happen.
I understand the historical "reasons", but the argument that it would
mess anything up I just can't see. Like anything else, the purpose is
within the context.
You would no sooner put
x = 5
on a line by itself for any reason other than assignment of value,
than you would put
true
or
false
on lines by themselves. I don't see any opportunity for ambiguity of
intention here. Director has had this syntax without problems for
many years.
x = 5 // assignment
if x = 5 then // comparison
I can't tell you how many times I've first written variable
assignments this way in Revolution only to turn around and say "oh
yeah... PUT the key into the backpack...PUT 5 into x...".
Yes. Revolution coding STILL seems to me like playing text adventure
games from the 80s. ;-)
--
Troy
RPSystems, Ltd.
http://www.rpsystems.net
More information about the use-livecode
mailing list