Transcript language design.
Richard Gaskin
ambassador at fourthworld.com
Wed Jun 9 20:41:34 EDT 2004
Alex Tweedly wrote:
> I had
> put URL "file:" & fileName into myVar
> of course, I meant
> put URL ("file:" & fileName) into myVar
> or similar.
>
> I don't think I've ever encountered a language where a valid expression
> could cause unwanted side-effects in an expression using only a single
> instance of an operator. Sigh.
The operator is fine.
The error you should have encountered was something to the effect of
using a reserved word for a variable name. "fileName" is a property of
media container objects like players and images, used to reference
externally-stored media files. It's also a property of a mainStack,
referring to the file it's associated with.
As with more formal languages, a little Hungarian notation goes a long
way, not only in making the nature of variables more distinct but also
in avoiding conflicts with reserved words:
<http://www.fourthworld.com/embassy/articles/scriptstyle.html>
--
Richard Gaskin
Fourth World Media Corporation
___________________________________________________
Rev tools and more: http://www.fourthworld.com/rev
More information about the use-livecode
mailing list