{"identifier":45173,"topic":"Commands","name":"push","text":"<code><pre>push card\n<\/pre><\/code>\n<code>push <i>card<\/i> <\/code>[<code>of <i>stack<\/i><\/code> ]<code> push <i>bkgnd<\/i> <\/code>[<code>of <i>stack<\/i><\/code> ]<code> push <i>stack<\/i> <br><br>\n\n <\/code>The<code> push <\/code>command saves the identification of a card in HyperCard\u2019s memory. If you specify a background or stack, HyperCard stores the location of the <b>first<\/b> card of the background or stack.  In all cases, HyperCard saves the full card ID and the path name for the stack. <br>\n<br>\nEach call to<code> push <\/code>saves a card ID in last-in, first-out order. You can return to saved locations using the<code> pop <\/code>command. <br><br>\n\n Note: The word<code> stack <\/code>that forms part of the stack identifier<code> <i>stack<\/i> <\/code>is optional with the<code> push <\/code>command. <br><br>\n\n There is a limit of twenty pushes. <br><br>\n\n If you<code> pop <\/code>more than you<code> push<\/code>, you go to the Home stack. <br>\n","related":{"38981":"go","44101":"pop"},"examples":"push card\npush this card\npush next card\npush recent card -- remember where you've been\npush card 234 of this stack\n\npush first card of stack \"Home\"\npush first card of \"Home\"\n\npush background \"Index\" of stack \"Glossary\"\npush background \"Index\" of \"Glossary\"\n\npush stack \"Home\"\npush \"Home\"","demo":"on goHomeAndBack\n   -- This demo shows that you can push and pop more than one card. Each\n   -- successive pop goes back through the pushed cards.\n   click at the loc of bkgnd button \"close\"\n   set lockMessages to true\n   <b>push<\/b> this card\n   go prev card\n   <b>push<\/b> this card\n   wait 1 second\n   go to card 3 of stack \"Home\"\n   wait 1 second\n   pop card\n   pop card\n   click at the loc of bkgnd button \"Demo Script\"\n end goHomeAndBack\n ","debug":{"9":["push card\rpush card "],"10":["Each call to push sa"]}}