{"identifier":10721,"topic":"HyperTalk basics","name":"Using parameter variables","text":"A handler can receive values (called parameters) and use them as it runs. You represent each value with a  <b>parameter variable<\/b>. A parameter variable always follows the handler name in a comma-separated list. <br><br>\n\n For example, when running the following<code> mouseUp <\/code>handler, HyperCard calls<code> sayMessage <\/code>with two values<code>, \"red\" <\/code>and<code> \"apple\"<\/code>. It then binds these values to the parameter variables<code> color <\/code>and<code> fruit <\/code>in the<code> sayMessage <\/code>handler. <br>\n<br>\n<code><pre>on mouseUp\n  sayMessage \"red\", \"apple\"\nend mouseUp\non sayMessage color, fruit\n  put \"I want a\" && color && fruit\nend sayMessage<\/pre><\/code> <br><br>\n\n You can use the variables<code> color <\/code>and<code> fruit <\/code>anywhere inside the handler. When HyperCard sees them, it uses the values currently bound to them. (The variables remain bound only while the handler runs.) <br>\n","related":{"25888":"function","26982":"on","10397":"Writing function handlers","9950":"Writing message handlers"},"examples":"","demo":"on mouseUp\n   sayMessage \"red\", \"apple\"\n end mouseUp\n <br><br>\n\n on sayMessage color, fruit\n   put \"I want a\" && color && fruit & \".\" into the Message box\n end sayMessage\n ","debug":{"10":["on mouseUp\r  sayMess"],"9":["A handler can receiv"]}}