{"identifier":26361,"topic":"Keywords","name":"global","text":"<code>global <i>variableList<\/i><\/code> <br><br>\n\n The<code> global <\/code>keyword makes a variable and its contents available to any handler in HyperCard. Changing the value of a global variable in any handler changes its value everywhere.   <br><br>\n\n Note: You must use the <code>global<\/code> keyword in <b>each handler<\/b> to declare the global variables you want to use. <br>\n<br>\nGlobal variables are not saved between sessions of HyperCard. Global variables are also lost under System 6's single Finder when a user (or handler) suspends HyperCard by launching another application with the<code> open <\/code>command. <br>\n","related":{"11056":"The building blocks"},"examples":"global myVar\n\nglobal pages,sections,chapters","demo":"on mouseUp\n   <b>global<\/b> theName\n   ask \"What is your name?\"\n   if it is empty then exit mouseUp\n   put it into theName\n   answerReverseName\n end mouseUp\n <br><br>\n\n on answerReverseName\n   <b>global<\/b> theName\n   repeat with i = the number of chars in theName down to 1\n     put char i of theName after reverseName\n   end repeat\n   answer \"Your name spelled backwards is\" && reverseName & \".\"\n   -- put empty into the global when you are done with it:\n   put empty into theName\n end answerReverseName\n ","debug":{"9":["global variableList\r"],"10":["Global variables are"]}}