the message box

Alex Tweedly alex at tweedly.net
Fri Aug 19 20:34:08 EDT 2005


Scott Rossi wrote:

>Recently, Jon  wrote:
>
>  
>
>>"msg is a reserved word indicating... the message box :) try to use a
>>different name for your var and all should be fine."
>>
>>Given that, in this particular situation, the IDE is going to ignore my
>>use of "msg" as a parameter variable name, would it make any sense for
>>the compiler to flag this as a likely problem?
>>    
>>
>
>I'm not sure you expect the IDE to *know* that you didn't intend call the
>message box versus making a script error.  Sure, the context could be gauged
>to some extent, but perhaps you *did* intend to call the message box and
>simply made a contextual script error in the remainder of your code.
>
>  
>
The IDE can *know* that it's an error because the reserved token "msg" 
was used as a formal parameter name

on mouseUp msg

The IDE cannot know at the usage of that formal parameter (e.g. put 
"abc" into msg), but it can, and should, know at the handler / parameter 
declaration.  (Some other reserved words already produce an error 
message, e.g.

on mouseUp seconds

gives the error "Handler: not a valid parameter name"


-- 
Alex Tweedly       http://www.tweedly.net

-------------- next part --------------
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.12/77 - Release Date: 18/08/2005


More information about the use-livecode mailing list