simple local variable question

Dar Scott dsc at swcp.com
Fri Feb 20 20:21:19 EST 2004


On Friday, February 20, 2004, at 05:55 PM, Christopher Mitchell wrote:

> --card script begins here
>
> local rotAngle
> put 20 into rotAngle
>
> on mouseUp
>    answer rotAngle
> end mouseUp
>
> --

Does this help?
--card script begins here

local rotAngle = 20

on mouseUp
    answer rotAngle
end mouseUp

--

See "About... the structure of a script" in the doc.

> My question is, why does this not put up an answer dialog with "20" in 
> it? the dialog that comes up is empty.

Another question might be why doesn't the compiler complain.  I have 
gotten the impression is that this is for some legacy code in which 
people hide data in scripts for some reason.

Dar Scott



More information about the use-livecode mailing list