<snapdata remixID="9377649"><project name="Block Download" app="Snap! 6, https://snap.berkeley.edu" version="1"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAACeklEQVR4Xu3XsWnDUABF0W/tYk3gRVxrCs8ll55He7iSIZCQJglpfEEctRI8dP8BodO+7/twKRAVOAEYlTf7UQBAENICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zGAWQgLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zGAWQgLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zGAWQgLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEAf8h/uVzG7XYby7KkB3T0cQB/OeHr9fp1d9u2cb/fx/l8PrqJt74fgH/k/o7w89Fpmsbz+RyPx+Oth3XEMQABTF0D+I9P8LquY57n9MCONg6gn5DUNIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zGAWQgLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zGAWQgLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zGAWQgLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3/gLXCfyohseIjQAAAABJRU5ErkJggg==</thumbnail><stage name="Stage" width="480" height="360" costume="0" color="255,255,255,1" tempo="60" threadsafe="false" penlog="false" volume="100" pan="0" lines="round" ternary="false" hyperops="true" codify="false" inheritance="true" sublistIDs="false" scheduled="false" id="1"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAOhUlEQVR4Xu3VwQkAAAjEMN1/abewn7jAQRC64wgQIECAAIF3gX1fNEiAAAECBAiMAHsCAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQIHLFxAWmhEwHPAAAAAElFTkSuQmCC</pentrails><costumes><list struct="atomic" id="2"></list></costumes><sounds><list struct="atomic" id="3"></list></sounds><variables></variables><blocks></blocks><scripts></scripts><sprites><sprite name="Sprite" idx="1" x="0" y="0" heading="90" scale="1" volume="100" pan="0" rotation="1" draggable="true" costume="0" color="80,80,80,1" pen="tip" id="8"><costumes><list struct="atomic" id="9"></list></costumes><sounds><list struct="atomic" id="10"></list></sounds><blocks></blocks><variables></variables><scripts><script x="225" y="32"><block s="receiveGo"></block><block s="bubble"><l>Press E while in edit modeto export the block data.</l></block></script><script x="78" y="134"><block s="receiveKey"><l><option>e</option></l></block><custom-block s="redirect to %s"><l>https://www.mediafire.com/file/j18fotl2f7ob3ld/Block_Download_blocks.xml/file</l></custom-block></script></scripts></sprite></sprites></stage><hidden></hidden><headers></headers><code></code><blocks><block-definition s="do nothing" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="turn"><l>15</l></block><block s="turnLeft"><l>15</l></block></script><scripts><comment x="176" y="61.19999999999999" w="90" collapsed="false">To do nothing.</comment></scripts></block-definition><block-definition s="how many %&apos;input&apos; s is there in %&apos;list&apos; ?" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>a</l></list></block><block s="doSetVar"><l>a</l><l>0</l></block><block s="doIfElse"><block s="reportListContainsItem"><block var="list"/><block var="input"/></block><script><block s="doForEach"><l>item</l><block var="list"/><script><block s="doIfElse"><block s="reportEquals"><block var="item"/><block var="input"/></block><script><block s="doChangeVar"><l>a</l><l>1</l></block></script><script><custom-block s="do nothing"></custom-block></script></block></script></block><block s="doReport"><block var="a"/></block></script><script><block s="doReport"><l>0</l></block></script></block></script></block-definition><block-definition s="is there %&apos;num&apos; of %&apos;input&apos; in %&apos;list&apos;" type="predicate" category="lists"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%s"></input><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>a</l></list></block><block s="doIfElse"><block s="reportListContainsItem"><block var="list"/><block var="input"/></block><script><block s="doWarp"><script><block s="doForEach"><l>item</l><block var="list"/><script><block s="doIfElse"><block s="reportEquals"><block var="item"/><block var="input"/></block><script><block s="doChangeVar"><l>a</l><l>1</l></block></script><script><custom-block s="do nothing"></custom-block></script></block></script></block></script></block><block s="doIfElse"><block s="reportEquals"><block var="num"/><block var="a"/></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block></script><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block></script></block-definition><block-definition s="cleanly follow mouse" type="command" category="motion"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doForever"><script><block s="doFaceTowards"><l><option>mouse-pointer</option></l></block><block s="doGotoObject"><l><option>mouse-pointer</option></l></block><block s="doIf"><block s="reportTouchingObject"><l><option>mouse-pointer</option></l></block><script><block s="forward"><l>-5</l></block></script></block></script></block></script><scripts><comment x="237" y="63.19999999999999" w="90" collapsed="false">So the prite doesn&apos;t flash.</comment></scripts></block-definition><block-definition s="draw from x: %&apos;xbef&apos; y: %&apos;ybef&apos; to x: %&apos;xaft&apos; y: %&apos;yaft&apos; set hue: %&apos;hue&apos; set saturation: %&apos;sat&apos; set transparency: %&apos;transpar&apos; set brightness: %&apos;brightne&apos;" type="command" category="pen"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input><input type="%n"></input><input type="%n"></input><input type="%n"></input><input type="%n"></input><input type="%n"></input><input type="%n"></input></inputs><script><block s="doGlide"><l>0</l><block var="xbef"/><block var="ybef"/></block><block s="down"></block><block s="setPenHSVA"><l><option>hue</option></l><block var="hue"/></block><block s="setPenHSVA"><l><option>saturation</option></l><block var="sat"/></block><block s="setPenHSVA"><l><option>transparency</option></l><block var="transpar"/></block><block s="setPenHSVA"><l><option>brightness</option></l><block var="brightne"/></block><block s="gotoXY"><block var="xaft"/><block var="yaft"/></block><block s="setPenHSVA"><l><option>hue</option></l><l>0</l></block><block s="setPenHSVA"><l><option>saturation</option></l><l>0</l></block><block s="setPenHSVA"><l><option>transparency</option></l><l>0</l></block><block s="setPenHSVA"><l><option>brightness</option></l><l>0</l></block><block s="up"></block></script></block-definition><block-definition s="draw from x: %&apos;xbef&apos; y: %&apos;ybef&apos; to x: %&apos;xaft&apos; y: %&apos;yaft&apos; set hue: %&apos;hue&apos; set saturation: %&apos;sat&apos; set transparency: %&apos;transpar&apos; set brightness: %&apos;brightne&apos; then go back to starting position" type="command" category="pen"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input><input type="%n"></input><input type="%n"></input><input type="%n"></input><input type="%n"></input><input type="%n"></input><input type="%n"></input></inputs><script><block s="doGlide"><l>0</l><block var="xbef"/><block var="ybef"/></block><block s="down"></block><block s="setPenHSVA"><l><option>hue</option></l><block var="hue"/></block><block s="setPenHSVA"><l><option>saturation</option></l><block var="sat"/></block><block s="setPenHSVA"><l><option>transparency</option></l><block var="transpar"/></block><block s="setPenHSVA"><l><option>brightness</option></l><block var="brightne"/></block><block s="gotoXY"><block var="xaft"/><block var="yaft"/></block><block s="setPenHSVA"><l><option>hue</option></l><l>0</l></block><block s="setPenHSVA"><l><option>saturation</option></l><l>0</l></block><block s="setPenHSVA"><l><option>transparency</option></l><l>0</l></block><block s="setPenHSVA"><l><option>brightness</option></l><l>0</l></block><block s="up"></block><block s="gotoXY"><block var="xbef"/><block var="ybef"/></block></script></block-definition><block-definition s="play frequency %&apos;1stNum&apos; Hz for %&apos;2ndNum&apos; secs" type="command" category="sound"><header></header><code></code><translations></translations><inputs><input type="%n">440</input><input type="%n">1</input></inputs><script><block s="playFreq"><block var="1stNum"/></block><block s="doWait"><block var="2ndNum"/></block><block s="stopFreq"></block></script><scripts><comment x="256" y="64.19999999999999" w="90" collapsed="false">To play a frequency for an amount of seconds.</comment></scripts></block-definition><block-definition s="alert %&apos;amsg&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%s">hello world</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>amsg</l></list><l>alert(amsg);</l></block><list><block var="amsg"/></list></block></script><scripts><comment x="123" y="106.19999999999999" w="90" collapsed="false">JavaScript to alert in-browser.</comment></scripts></block-definition><block-definition s="do this %&apos;after&apos; after this %&apos;before&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%cs"></input><input type="%cs"></input></inputs><script><block s="doRun"><block var="before"/><list></list></block><block s="doRun"><block var="after"/><list></list></block></script></block-definition><block-definition s="JavaScript: %&apos;jshere&apos;" type="command" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s">alert("Hello World!")</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l></l></list><block var="jshere"/></block><list></list></block></script><scripts><comment x="128" y="103.19999999999999" w="90" collapsed="false">To run JavaScript as a command.</comment></scripts></block-definition><block-definition s="run %&apos;actions&apos; in parralel" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%mult%cs"></input></inputs><script><block s="doForEach"><l>item</l><block var="actions"/><script><block s="fork"><block var="item"/><list></list></block></script></block></script><scripts><comment x="211" y="77.19999999999999" w="90" collapsed="false">actions Is apparently a list, so the launch block performs everything in parralel.</comment></scripts></block-definition><block-definition s="Make Sprites %&apos;sprites&apos; do %&apos;action&apos;" type="command" category="other"><header></header><code></code><translations></translations><inputs><input type="%mult%s"></input><input type="%cmdRing"></input></inputs><script><block s="doForEach"><l>item</l><block var="sprites"/><script><block s="doTellTo"><block var="item"/><block var="action"/><list></list></block></script></block></script></block-definition><block-definition s="turbo mode %&apos;t/f&apos;" type="command" category="sensing"><header></header><code></code><translations></translations><inputs><input type="%b"></input></inputs><script><block s="doIfElse"><block s="reportEquals"><block var="t/f"/><block s="reportBoolean"><l><bool>true</bool></l></block></block><script><block s="doSetGlobalFlag"><l><option>turbo mode</option></l><l><bool>true</bool></l></block></script><script><block s="doSetGlobalFlag"><l><option>turbo mode</option></l><l><bool>false</bool></l></block></script></block></script></block-definition><block-definition s="unlist %&apos;list&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><custom-block s="list $arrowRight word %l"><block var="list"/></custom-block></block></script></block-definition><block-definition s="unicode encoding %&apos;input&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doDeclareVariables"><list><l>a</l><l>b</l></list></block><block s="doSetVar"><l>a</l><l>1</l></block><block s="doSetVar"><l>b</l><block s="reportNewList"><list></list></block></block><block s="doUntil"><block s="reportEquals"><block var="a"/><block s="reportSum"><block s="reportStringSize"><block var="input"/></block><l>1</l></block></block><script><block s="doAddToList"><block s="reportUnicode"><block s="reportLetter"><block var="a"/><block var="input"/></block></block><block var="b"/></block><block s="doChangeVar"><l>a</l><l>1</l></block></script></block><block s="doReport"><custom-block s="list $arrowRight sentence %l"><block var="b"/></custom-block></block></script></block-definition><block-definition s="unicode decoding %&apos;unicode&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doDeclareVariables"><list><l>a</l><l>b</l></list></block><block s="doSetVar"><l>a</l><l>1</l></block><block s="doSetVar"><l>b</l><custom-block s="sentence $arrowRight list %txt"><block var="unicode"/></custom-block></block><block s="doUntil"><block s="reportEquals"><block var="a"/><block s="reportSum"><l>1</l><block s="reportListLength"><block var="b"/></block></block></block><script><block s="doReplaceInList"><block var="a"/><block var="b"/><block s="reportUnicodeAsLetter"><block s="reportListItem"><block var="a"/><block var="b"/></block></block></block><block s="doChangeVar"><l>a</l><l>1</l></block></script></block><block s="doReport"><custom-block s="unlist %l"><block var="b"/></custom-block></block></script></block-definition><block-definition s="catch %&apos;tag&apos; %&apos;value&apos;" type="reporter" category="control"><header></header><code></code><translations>de:fange _ _&#xD;ca:agafa _ _&#xD;es:atrapar _ _&#xD;fr:attrape _ _&#xD;pt:captura _ _&#xD;</translations><inputs><input type="%upvar"></input><input type="%anyUE"></input></inputs><script><block s="doCallCC"><block s="reifyScript"><script><block s="doSetVar"><l>tag</l><block var="cont"/></block><block s="doReport"><block s="evaluate"><block var="value"/><list></list></block></block></script><list><l>cont</l></list></block></block></script></block-definition><block-definition s="throw %&apos;tag&apos; %&apos;value&apos;" type="command" category="control"><header></header><code></code><translations>de:wirf _ _&#xD;ca:llança _ _&#xD;es:lanzar _ _&#xD;fr:lance _ _&#xD;pt:lança _ _&#xD;</translations><inputs><input type="%s">catchtag</input><input type="%s"></input></inputs><script><block s="doRun"><block var="tag"/><list><block var="value"/></list></block></script></block-definition><block-definition s="if %&apos;test&apos; do %&apos;action&apos; and pause all $pause-1-255-220-0" type="command" category="control"><header></header><code></code><translations>de:falls _ dann _ und pause $pause-1-255-220-0&#xD;ca:si _ fes _ i atura-ho tot $pause-1-255-220-0&#xD;es:si _ haz _ y páralo todo $pause-1-255-220-0&#xD;fr:si _ faire _ et mettre tout en pause $pause-1-255-220-0&#xD;pt:se _ , então _ e faz pausa em tudo $pause-1-255-220-0&#xD;</translations><inputs><input type="%boolUE"></input><input type="%cs"></input></inputs><script><block s="doDeclareVariables"><list><l>breakpoint</l></list></block><block s="doIf"><block s="evaluate"><block var="test"/><list></list></block><script><block s="doSetVar"><l>breakpoint</l><block var="test"/></block><block s="doShowVar"><l>breakpoint</l></block><block s="doRun"><block var="action"/><list></list></block><block s="doPauseAll"></block><block s="doHideVar"><l></l></block></script></block></script></block-definition><block-definition s="ignore %&apos;x&apos;" type="command" category="control"><header></header><code></code><translations>de:ignoriere _&#xD;ca:ignora _&#xD;es:ignorar _&#xD;fr:ignore _&#xD;pt:ignora _&#xD;</translations><inputs><input type="%s"></input></inputs></block-definition><block-definition s="cascade %&apos;num&apos; times %&apos;function&apos; %&apos;init&apos; %&apos;#&apos;" type="reporter" category="control"><comment x="0" y="0" w="138" collapsed="false">Call f(f(f(...(f(x))))) n times where the three input slots are n, f, and x from left to right.  The # variable can be used inside f to represent how many times f has been called.</comment><header></header><code></code><translations>pt:o resultado de _ invocações em cascata de _ com argumento inicial _ _&#xD;</translations><inputs><input type="%n"></input><input type="%repRing"></input><input type="%s"></input><input type="%upvar"></input></inputs><script><block s="doDeclareVariables"><list><l>result</l></list></block><block s="doSetVar"><l>result</l><block var="init"/></block><block s="doSetVar"><l>#</l><l>0</l></block><block s="doRepeat"><block var="num"/><script><block s="doChangeVar"><l>#</l><l>1</l></block><block s="doSetVar"><l>result</l><block s="evaluate"><block var="function"/><list><block var="result"/></list></block></block></script></block><block s="doReport"><block var="result"/></block></script></block-definition><block-definition s="cascade until %&apos;pred&apos; %&apos;function&apos; %&apos;init&apos; %&apos;#&apos;" type="reporter" category="control"><comment x="0" y="0" w="90" collapsed="false">Call f(f(f(...(f(x))))) until condition is true, where the three input slots are condition, f, and x from left to right.  The # variable can be used inside f or condition to indicate how many times f has been called.</comment><header></header><code></code><translations>pt:o resultado da invocação em cascata até que _ de _ com argumento inicial _ _&#xD;</translations><inputs><input type="%predRing"></input><input type="%repRing"></input><input type="%s"></input><input type="%upvar"></input></inputs><script><block s="doDeclareVariables"><list><l>result</l></list></block><block s="doSetVar"><l>result</l><block var="init"/></block><block s="doSetVar"><l>#</l><l>0</l></block><block s="doUntil"><block s="evaluate"><block var="pred"/><list><block var="result"/></list></block><script><block s="doChangeVar"><l>#</l><l>1</l></block><block s="doSetVar"><l>result</l><block s="evaluate"><block var="function"/><list><block var="result"/></list></block></block></script></block><block s="doReport"><block var="result"/></block></script></block-definition><block-definition s="compose %&apos;f&apos; %&apos;g&apos;" type="reporter" category="control"><comment x="0" y="0" w="90" collapsed="false">Returns the function f(g(x)) where f and g are the two inputs.</comment><header></header><code></code><translations>pt:a composição de _ com _&#xD;</translations><inputs><input type="%repRing"></input><input type="%repRing"></input></inputs><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="evaluate"><block var="f"/><list><block s="evaluate"><block var="g"/><list><l></l></list></block></list></block></autolambda><list></list></block></block></script></block-definition><block-definition s="repeat %&apos;action&apos; until %&apos;pred&apos;" type="command" category="control"><comment x="0" y="0" w="90" collapsed="false">Like the built-in REPEAT UNTIL block, except that the ending condition is not tested until the script has been run the first time.  So the script is run at least once.</comment><header></header><code></code><translations>pt:repete _ até que _ $loop-0.7&#xD;</translations><inputs><input type="%cs"></input><input type="%boolUE"></input></inputs><script><block s="doRun"><block var="action"/><list></list></block><block s="doUntil"><block s="evaluate"><block var="pred"/><list></list></block><script><block s="doRun"><block var="action"/><list></list></block></script></block></script></block-definition><block-definition s="repeat %&apos;action&apos; while %&apos;pred&apos;" type="command" category="control"><comment x="0" y="0" w="90" collapsed="false">Run the script repeatedly, as long as the given condition is true.  Runs the script at least once before testing the condition.</comment><header></header><code></code><translations>pt:repete _ enquanto _ $loop-0.7&#xD;</translations><inputs><input type="%cs"></input><input type="%boolUE"></input></inputs><script><block s="doRun"><block var="action"/><list></list></block><block s="doUntil"><block s="reportNot"><block s="evaluate"><block var="pred"/><list></list></block></block><script><block s="doRun"><block var="action"/><list></list></block></script></block></script></block-definition><block-definition s="repeat while %&apos;pred&apos; %&apos;action&apos;" type="command" category="control"><comment x="0" y="0" w="90" collapsed="false">Runs the script repeatedly, as long as the condition is true.  Tests the condition before the first time the script is run.  Like the built in REPEAT UNTIL except that in this block the condition must be true, not false.</comment><header></header><code></code><translations>pt:enquanto _ , repete _ $loop-0.7&#xD;</translations><inputs><input type="%boolUE"></input><input type="%cs"></input></inputs><script><block s="doUntil"><block s="reportNot"><block s="evaluate"><block var="pred"/><list></list></block></block><script><block s="doRun"><block var="action"/><list></list></block></script></block></script></block-definition><block-definition s="repeat %&apos;num&apos; %&apos;#&apos; %&apos;action&apos;" type="command" category="control"><comment x="0" y="0" w="171" collapsed="false">Runs the script the specified number of times, like the built-in REPEAT block, but this one provides the # variable that can be used inside the script.  Try&#xD;REPEAT (200)&#xD;                MOVE (#) STEPS&#xD;   RIGHT 92&#xD;with the pen down.</comment><header></header><code></code><translations>pt:repete _ vezes _ _ $loop-0.7&#xD;</translations><inputs><input type="%n"></input><input type="%upvar"></input><input type="%cs"></input></inputs><script><block s="doSetVar"><l>#</l><l>0</l></block><block s="doRepeat"><block var="num"/><script><block s="doChangeVar"><l>#</l><l>1</l></block><block s="doRun"><block var="action"/><list></list></block></script></block></script></block-definition><block-definition s="for %&apos;i&apos; = %&apos;start&apos; step %&apos;step&apos; to %&apos;end&apos; %&apos;action&apos;" type="command" category="control"><header></header><code></code><translations>pt:para _ de _ com passo _ a _ _ $loop-0.7&#xD;</translations><inputs><input type="%upvar"></input><input type="%n">1</input><input type="%n">1</input><input type="%n">10</input><input type="%cs"></input></inputs><script><block s="doDeclareVariables"><list><l>test</l></list></block><block s="doSetVar"><l>i</l><block var="start"/></block><block s="doIfElse"><block s="reportLessThan"><block var="step"/><l>0</l></block><script><block s="doSetVar"><l>test</l><block s="reifyPredicate"><autolambda><block s="reportLessThan"><block var="i"/><block var="end"/></block></autolambda><list></list></block></block></script><script><block s="doSetVar"><l>test</l><block s="reifyPredicate"><autolambda><block s="reportGreaterThan"><block var="i"/><block var="end"/></block></autolambda><list></list></block></block></script></block><block s="doUntil"><block s="evaluate"><block var="test"/><list></list></block><script><block s="doRun"><block var="action"/><list></list></block><block s="doChangeVar"><l>i</l><block var="step"/></block></script></block></script></block-definition><block-definition s="let %&apos;a&apos; be %&apos;val&apos; in %&apos;loop&apos; %&apos;body&apos;" type="command" category="control"><comment x="0" y="0" w="238.66666666666669" collapsed="false">Provides LOOP as a function of one input that runs&#xD;the body of the LET with A set to the function input,&#xD;so the body can run itself recursively.&#xD;See COPY block in Variables for an example of use.</comment><header></header><code></code><translations>pt:tendo _ o valor inicial _ , executa _ definido como _&#xD;</translations><inputs><input type="%upvar"></input><input type="%s"></input><input type="%upvar"></input><input type="%cs"></input></inputs><script><block s="doSetVar"><l>a</l><block var="val"/></block><block s="doSetVar"><l>loop</l><block s="reifyScript"><script><block s="doSetVar"><l>a</l><block var="new value"/></block><block s="doRun"><block var="body"/><list><block var="a"/></list></block></script><list><l>new value</l></list></block></block><block s="doRun"><block var="loop"/><list><block var="a"/></list></block></script></block-definition><block-definition s="append %&apos;lists&apos;" type="reporter" category="lists"><comment x="0" y="0" w="287" collapsed="false">Take any number of input lists, and create a new list&#xD;containing the items of the input lists.  So&#xD;APPEND [A B] [C D]&#xD;where the [...] are lists reports the list&#xD;[A B C D]&#xD;not [[A B] [C D]].</comment><header></header><code></code><translations>ca:concatena _&#xD;</translations><inputs><input type="%mult%l"></input></inputs><script><block s="doWarp"><script><block s="doIf"><block s="reportEquals"><block var="lists"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportListLength"><block var="lists"/></block><l>1</l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="lists"/></block></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportListItem"><l>1</l><block var="lists"/></block><block s="reportNewList"><list></list></block></block><script><block s="doReport"><custom-block s="append %mult%l"><block s="reportCDR"><block var="lists"/></block></custom-block></block></script></block><block s="doReport"><block s="reportCONS"><block s="reportListItem"><l>1</l><block s="reportListItem"><l>1</l><block var="lists"/></block></block><custom-block s="append %mult%l"><block s="reportCONS"><block s="reportCDR"><block s="reportListItem"><l>1</l><block var="lists"/></block></block><block s="reportCDR"><block var="lists"/></block></block></custom-block></block></block></script></block></script></block-definition><block-definition s="reverse %&apos;data&apos;" type="reporter" category="lists"><comment x="0" y="0" w="223" collapsed="false">Reports a new list containing the items of the input list, but in the opposite order.</comment><header></header><code></code><translations>ca:capgira _&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>helper</l></list></block><block s="doSetVar"><l>helper</l><block s="reifyScript"><script><block s="doIf"><block s="reportEquals"><block var="input"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block var="result"/></block></script></block><block s="doReport"><block s="evaluate"><block var="helper"/><list><block s="reportCDR"><block var="input"/></block><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="input"/></block><block var="result"/></block></list></block></block></script><list><l>input</l><l>result</l></list></block></block><block s="doWarp"><script><block s="doReport"><block s="evaluate"><block var="helper"/><list><block var="data"/><block s="reportNewList"><list></list></block></list></block></block></script></block></script></block-definition><block-definition s="remove duplicates from %&apos;data&apos;" type="reporter" category="lists"><comment x="0" y="0" w="209" collapsed="false">Reports a new list whose items are the same as in the input list, except that if two or more equal items appear in the input list, only the last one is kept in the result.</comment><header></header><code></code><translations>ca:elimina els duplicats de _&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doIf"><block s="reportEquals"><block var="data"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doIfElse"><block s="reportListContainsItem"><block s="reportCDR"><block var="data"/></block><block s="reportListItem"><l>1</l><block var="data"/></block></block><script><block s="doReport"><custom-block s="remove duplicates from %l"><block s="reportCDR"><block var="data"/></block></custom-block></block></script><script><block s="doReport"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="data"/></block><custom-block s="remove duplicates from %l"><block s="reportCDR"><block var="data"/></block></custom-block></block></block></script></block></script></block></script></block-definition><block-definition s="sort %&apos;data&apos; ordering with %&apos;function&apos;" type="reporter" category="lists"><comment x="0" y="0" w="161.14285714285708" collapsed="false">Reports a sorted version of the list in its first input slot, using the comparison function in the second input slot.  For a list of numbers, using &lt; as the comparison function will sort from low to high; using &gt; will sort from high to low.</comment><header></header><code></code><translations>ca:ordena _ segons criteri _&#xD;</translations><inputs><input type="%l"></input><input type="%predRing"></input></inputs><script><block s="doDeclareVariables"><list><l>even items</l><l>odd items</l><l>merge</l><l>split</l><l>copy of data</l><l>id</l></list></block><block s="doSetVar"><l>id</l><block s="reifyScript"><script><block s="doReport"><l></l></block></script><list></list></block></block><block s="doSetVar"><l>copy of data</l><block s="reportMap"><block var="id"/><block var="data"/></block></block><block s="doSetVar"><l>split</l><block s="reifyScript"><script><block s="doSetVar"><l>even items</l><block s="reportNewList"><list></list></block></block><block s="doSetVar"><l>odd items</l><block s="reportNewList"><list></list></block></block><block s="doUntil"><block s="reportListIsEmpty"><block var="copy of data"/></block><script><block s="doAddToList"><block s="reportListItem"><l>1</l><block var="copy of data"/></block><block var="odd items"/></block><block s="doDeleteFromList"><l>1</l><block var="copy of data"/></block><block s="doIf"><block s="reportNot"><block s="reportListIsEmpty"><block var="copy of data"/></block></block><script><block s="doAddToList"><block s="reportListItem"><l>1</l><block var="copy of data"/></block><block var="even items"/></block><block s="doDeleteFromList"><l>1</l><block var="copy of data"/></block></script></block></script></block></script><list></list></block></block><block s="doSetVar"><l>merge</l><block s="reifyScript"><script><block s="doIf"><block s="reportEquals"><block var="#1"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block var="#2"/></block></script></block><block s="doIf"><block s="reportEquals"><block var="#2"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block var="#1"/></block></script></block><block s="doIfElse"><block s="evaluate"><block var="function"/><list><block s="reportListItem"><l>1</l><block var="#1"/></block><block s="reportListItem"><l>1</l><block var="#2"/></block></list></block><script><block s="doReport"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="#1"/></block><block s="evaluate"><block var="merge"/><list><block s="reportCDR"><block var="#1"/></block><block var="#2"/></list></block></block></block></script><script><block s="doReport"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="#2"/></block><block s="evaluate"><block var="merge"/><list><block var="#1"/><block s="reportCDR"><block var="#2"/></block></list></block></block></block></script></block></script><list><l>#1</l><l>#2</l></list></block></block><block s="doIf"><block s="reportEquals"><block var="data"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportCDR"><block var="data"/></block><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block var="data"/></block></script></block><block s="doRun"><block var="split"/><list></list></block><block s="doReport"><block s="evaluate"><block var="merge"/><list><custom-block s="sort %l ordering with %predRing"><block var="odd items"/><block var="function"/></custom-block><custom-block s="sort %l ordering with %predRing"><block var="even items"/><block var="function"/></custom-block></list></block></block></script></block-definition><block-definition s="assoc %&apos;key&apos; %&apos;a-list&apos;" type="reporter" category="lists"><comment x="0" y="0" w="289.3333333333333" collapsed="false">The second input is an &quot;association list,&quot; a list of two-item lists.  Each of those smaller lists has a &quot;key&quot; as its first item and a &quot;value&quot; as its second.  ASSOC reports the first key-value pair in the association list whose key matches the first input.</comment><header></header><code></code><translations>ca:associació _ _&#xD;</translations><inputs><input type="%s"></input><input type="%l"></input></inputs><script><block s="doIf"><block s="reportEquals"><block var="a-list"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="key"/><block s="reportListItem"><l>1</l><block s="reportListItem"><l>1</l><block var="a-list"/></block></block></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="a-list"/></block></block></script></block><block s="doReport"><custom-block s="assoc %s %l"><block var="key"/><block s="reportCDR"><block var="a-list"/></block></custom-block></block></script></block-definition><block-definition s="%&apos;#&apos; map %&apos;function&apos; over %&apos;lists&apos;" type="reporter" category="lists"><comment x="0" y="0" w="225.00000000000003" collapsed="false">This block applies the given function to each item of the given list, like the primitive MAP block, but with two differences:&#xD;&#xD;1.  The # variable provided will contain the item number of the item currently being used in the given function: 1 for item 1, and so on.  You read the variable in your function; don&apos;t set it.&#xD;&#xD;2.  You can provide more than one input list.  If so, the lengths of all the lists should be the same, and the function you supply must expect as many inputs as you have lists (i.e., that many empty input slots in the function).</comment><header></header><code></code><translations>ca:_ mapeja _ sobre _&#xD;</translations><inputs><input type="%upvar"></input><input type="%repRing"></input><input type="%mult%l"></input></inputs><script><block s="doWarp"><script><block s="doDeclareVariables"><list><l>mapone</l><l>mapmany</l></list></block><block s="doSetVar"><l>mapone</l><block s="reifyScript"><script><block s="doIf"><block s="reportListIsEmpty"><block var="data"/></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doSetVar"><l>#</l><block var="count"/></block><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="function"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><block s="evaluate"><block var="mapone"/><list><block s="reportCDR"><block var="data"/></block><block s="reportSum"><block var="count"/><l>1</l></block></list></block></block></block></script><list><l>data</l><l>count</l></list></block></block><block s="doSetVar"><l>mapmany</l><block s="reifyScript"><script><block s="doIf"><block s="reportListIsEmpty"><block s="reportListItem"><l>1</l><block var="data lists"/></block></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doSetVar"><l>#</l><block var="count"/></block><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="function"/><custom-block s="%upvar map %repRing over %mult%l"><l>#</l><block s="reifyReporter"><autolambda><block s="reportListItem"><l>1</l><l/></block></autolambda><list></list></block><list><block var="data lists"/></list></custom-block></block><block s="evaluate"><block var="mapmany"/><list><custom-block s="%upvar map %repRing over %mult%l"><l>#</l><block s="reifyReporter"><autolambda><block s="reportCDR"><l/></block></autolambda><list></list></block><list><block var="data lists"/></list></custom-block><block s="reportSum"><block var="count"/><l>1</l></block></list></block></block></block></script><list><l>data lists</l><l>count</l></list></block></block><block s="doIfElse"><block s="reportListIsEmpty"><block s="reportCDR"><block var="lists"/></block></block><script><block s="doReport"><block s="evaluate"><block var="mapone"/><list><block s="reportListItem"><l>1</l><block var="lists"/></block><l>1</l></list></block></block></script><script><block s="doReport"><block s="evaluate"><block var="mapmany"/><list><block var="lists"/><l>1</l></list></block></block></script></block></script></block></script></block-definition><block-definition s="%&apos;#&apos; keep items %&apos;pred&apos; from %&apos;data&apos;" type="reporter" category="lists"><comment x="0" y="0" w="217.1428571428572" collapsed="false">This block makes a new list containing selected items from the given list, like the primitive KEEP block.&#xD;&#xD;What&apos;s different is that it provides the # variable for use in your predicate function.  It will contain the item number (in the original list) of the item being examined by the predicate.</comment><header></header><code></code><translations>ca:_ manté els elements on _ de _&#xD;</translations><inputs><input type="%upvar"></input><input type="%predRing"></input><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>keep-helper</l></list></block><block s="doSetVar"><l>keep-helper</l><block s="reifyScript"><script><block s="doWarp"><script><block s="doIf"><block s="reportListIsEmpty"><block var="data"/></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doSetVar"><l>#</l><block var="count"/></block><block s="doIfElse"><block s="evaluate"><block var="pred"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><script><block s="doReport"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="data"/></block><block s="evaluate"><block var="keep-helper"/><list><block s="reportCDR"><block var="data"/></block><block s="reportSum"><block var="count"/><l>1</l></block></list></block></block></block></script><script><block s="doReport"><block s="evaluate"><block var="keep-helper"/><list><block s="reportCDR"><block var="data"/></block><block s="reportSum"><block var="count"/><l>1</l></block></list></block></block></script></block></script></block></script><list><l>data</l><l>count</l></list></block></block><block s="doReport"><block s="evaluate"><block var="keep-helper"/><list><block var="data"/><l>1</l></list></block></block></script></block-definition><block-definition s="%&apos;#&apos; for each %&apos;item&apos; of %&apos;data&apos; %&apos;action&apos;" type="command" category="lists"><comment x="0" y="0" w="228.57142857142858" collapsed="false">This block carries out the given script for each item of the given list, like the primitive FOR EACH.&#xD;&#xD;What&apos;s different is that it provides the # variable, which will contain the item number in the list of each item in turn, 1 while processing item 1, and so on.</comment><header></header><code></code><translations>ca:_ per cada _ de _ _&#xD;</translations><inputs><input type="%upvar"></input><input type="%upvar"></input><input type="%l"></input><input type="%ca"></input></inputs><script><block s="doSetVar"><l>#</l><l>1</l></block><block s="doUntil"><block s="reportListIsEmpty"><block var="data"/></block><script><block s="doSetVar"><l>item</l><block s="reportListItem"><l>1</l><block var="data"/></block></block><block s="doRun"><block var="action"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><block s="doSetVar"><l>data</l><block s="reportCDR"><block var="data"/></block></block><block s="doChangeVar"><l>#</l><l>1</l></block></script></block></script></block-definition><block-definition s="%&apos;head&apos; in front of stream %&apos;tail&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:a prefixação de _ ao canal _&#xD;</translations><inputs><input type="%s"></input><input type="%anyUE"></input></inputs><script><block s="doReport"><block s="reportNewList"><list><block var="head"/><block var="tail"/><block s="reportBoolean"><l><bool>false</bool></l></block><block s="reportBoolean"><l><bool>false</bool></l></block></list></block></block></script></block-definition><block-definition s="head of stream %&apos;stream&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:o primeiro item do canal _&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="stream"/></block></block></script></block-definition><block-definition s="tail of stream %&apos;stream&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:um canal com todos os itens de _ menos o primeiro&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doIf"><block s="reportListItem"><l>3</l><block var="stream"/></block><script><block s="doReport"><block s="reportListItem"><l>4</l><block var="stream"/></block></block></script></block><block s="doReplaceInList"><l>4</l><block var="stream"/><block s="evaluate"><block s="reportListItem"><l>2</l><block var="stream"/></block><list></list></block></block><block s="doReplaceInList"><l>3</l><block var="stream"/><block s="reportBoolean"><l><bool>true</bool></l></block></block><block s="doReport"><block s="reportListItem"><l>4</l><block var="stream"/></block></block></script></block></script></block-definition><block-definition s="map %&apos;function&apos; over stream %&apos;stream&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:a aplicação de _ aos itens dos canais _&#xD;</translations><inputs><input type="%repRing"></input><input type="%mult%l"></input></inputs><script><block s="doWarp"><script><block s="doIf"><block s="reportEquals"><block s="reportListItem"><l>1</l><block var="stream"/></block><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doReport"><custom-block s="%s in front of stream %anyUE"><block s="evaluate"><block var="function"/><custom-block s="map %repRing over %mult%l"><block s="reifyReporter"><autolambda><custom-block s="head of stream %l"><l/></custom-block></autolambda><list></list></block><list><block var="stream"/></list></custom-block></block><custom-block s="map %repRing over stream %mult%l"><block var="function"/><custom-block s="map %repRing over %mult%l"><block s="reifyReporter"><autolambda><custom-block s="tail of stream %l"><l/></custom-block></autolambda><list></list></block><list><block var="stream"/></list></custom-block></custom-block></custom-block></block></script></block></script></block-definition><block-definition s="keep items such that %&apos;pred&apos; from stream %&apos;stream&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:os itens tais que _ do canal _&#xD;</translations><inputs><input type="%predRing"></input><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doIf"><block s="reportEquals"><block var="stream"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doIfElse"><block s="evaluate"><block var="pred"/><list><custom-block s="head of stream %l"><block var="stream"/></custom-block></list></block><script><block s="doReport"><custom-block s="%s in front of stream %anyUE"><custom-block s="head of stream %l"><block var="stream"/></custom-block><custom-block s="keep items such that %predRing from stream %l"><block var="pred"/><custom-block s="tail of stream %l"><block var="stream"/></custom-block></custom-block></custom-block></block></script><script><block s="doReport"><custom-block s="keep items such that %predRing from stream %l"><block var="pred"/><custom-block s="tail of stream %l"><block var="stream"/></custom-block></custom-block></block></script></block></script></block></script></block-definition><block-definition s="map %&apos;function&apos; over %&apos;lists&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:a aplicação de _ aos itens de _&#xD;</translations><inputs><input type="%repRing"></input><input type="%mult%l"></input></inputs><script><block s="doWarp"><script><block s="doDeclareVariables"><list><l>mapone</l><l>mapmany</l></list></block><block s="doSetVar"><l>mapone</l><block s="reifyScript"><script><block s="doIf"><block s="reportListIsEmpty"><block var="data"/></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="function"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><block s="evaluate"><block var="mapone"/><list><block s="reportCDR"><block var="data"/></block></list></block></block></block></script><list><l>data</l></list></block></block><block s="doSetVar"><l>mapmany</l><block s="reifyScript"><script><block s="doIf"><block s="reportListIsEmpty"><block s="reportListItem"><l>1</l><block var="data lists"/></block></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="function"/><custom-block s="map %repRing over %mult%l"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>1</l><l/></block></autolambda><list></list></block><list><block var="data lists"/></list></custom-block></block><block s="evaluate"><block var="mapmany"/><list><custom-block s="map %repRing over %mult%l"><block s="reifyReporter"><autolambda><block s="reportCDR"><l/></block></autolambda><list></list></block><list><block var="data lists"/></list></custom-block></list></block></block></block></script><list><l>data lists</l></list></block></block><block s="doIfElse"><block s="reportListIsEmpty"><block s="reportCDR"><block var="lists"/></block></block><script><block s="doReport"><block s="evaluate"><block var="mapone"/><list><block s="reportListItem"><l>1</l><block var="lists"/></block></list></block></block></script><script><block s="doReport"><block s="evaluate"><block var="mapmany"/><list><block var="lists"/></list></block></block></script></block></script></block></script></block-definition><block-definition s="empty? %&apos;data&apos;" type="predicate" category="lists"><header></header><code></code><translations>pt:o canal _ está vazio&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportEquals"><block var="data"/><block s="reportNewList"><list></list></block></block></block></script></block-definition><block-definition s="show stream %&apos;stream&apos; %&apos;number&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:uma lista com os itens do canal _ até ao _ º&#xD;</translations><inputs><input type="%l"></input><input type="%n">10</input></inputs><script><block s="doIf"><custom-block s="empty? %l"><block var="stream"/></custom-block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="number"/><l>0</l></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doReport"><block s="reportCONS"><custom-block s="head of stream %l"><block var="stream"/></custom-block><custom-block s="show stream %l %n"><custom-block s="tail of stream %l"><block var="stream"/></custom-block><block s="reportDifference"><block var="number"/><l>1</l></block></custom-block></block></block></script></block-definition><block-definition s="stream %&apos;items&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:um canal com _&#xD;</translations><inputs><input type="%mult%s"></input></inputs><script><block s="doIf"><custom-block s="empty? %l"><block var="items"/></custom-block><script><block s="doReport"><block var="items"/></block></script></block><block s="doReport"><custom-block s="%s in front of stream %anyUE"><block s="reportListItem"><l>1</l><block var="items"/></block><custom-block s="stream %mult%s"><block s="reportCDR"><block var="items"/></block></custom-block></custom-block></block></script></block-definition><block-definition s="sieve %&apos;stream&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:a crivagem do canal _&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doReport"><custom-block s="%s in front of stream %anyUE"><custom-block s="head of stream %l"><block var="stream"/></custom-block><custom-block s="sieve %l"><custom-block s="keep items such that %predRing from stream %l"><block s="reifyPredicate"><autolambda><block s="reportGreaterThan"><block s="reportModulus"><l></l><custom-block s="head of stream %l"><block var="stream"/></custom-block></block><l>0</l></block></autolambda><list></list></block><custom-block s="tail of stream %l"><block var="stream"/></custom-block></custom-block></custom-block></custom-block></block></script></block></script></block-definition><block-definition s="stream with numbers from %&apos;o inicio&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:um canal com os números a partir de _&#xD;</translations><inputs><input type="%n">1</input></inputs><script><block s="doReport"><block s="reportNewList"><list><block var="o inicio"/><block s="reifyReporter"><autolambda><custom-block s="stream with numbers from %n"><block s="reportSum"><block var="o inicio"/><l>1</l></block></custom-block></autolambda><list></list></block><block s="reportBoolean"><l><bool>false</bool></l></block><block s="reportBoolean"><l><bool>false</bool></l></block></list></block></block></script></block-definition><block-definition s="sum %&apos;nums&apos;" type="reporter" category="operators"><comment x="0" y="0" w="202" collapsed="false">Takes any number of numbers as inputs (use the left and right arrowheads to adjust the number of input slots) and reports the result of adding them all, so&#xD;(SUM (4) (100) (8))&#xD;reports 112.</comment><header></header><code></code><translations>pt:a soma de _&#xD;</translations><inputs><input type="%mult%n"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block var="nums"/></block><script><block s="doReport"><l>0</l></block></script></block><block s="doReport"><block s="reportSum"><block s="reportListItem"><l>1</l><block var="nums"/></block><custom-block s="sum %mult%n"><block s="reportCDR"><block var="nums"/></block></custom-block></block></block></script></block-definition><block-definition s="product %&apos;nums&apos;" type="reporter" category="operators"><comment x="0" y="0" w="205" collapsed="false">Takes any number of numbers as inputs (use the left and right arrowheads to adjust the number of input slots) and reports the result of multiplying them all, so&#xD;(PRODUCT (4) (100) (8))&#xD;reports 3200.</comment><header></header><code></code><translations>pt:o produto de _&#xD;</translations><inputs><input type="%mult%n"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block var="nums"/></block><script><block s="doReport"><l>1</l></block></script></block><block s="doReport"><block s="reportProduct"><block s="reportListItem"><l>1</l><block var="nums"/></block><custom-block s="product %mult%n"><block s="reportCDR"><block var="nums"/></block></custom-block></block></block></script></block-definition><block-definition s="all of %&apos;preds&apos;" type="predicate" category="operators"><comment x="0" y="0" w="248" collapsed="false">Takes any number of Boolean (true/false) inputs (use the left and right arrowheads to adjust the number of input slots) and reports TRUE only if all of the inputs are TRUE, otherwise FALSE.  Like AND but for multiple inputs.</comment><header></header><code></code><translations>pt:todas as afirmações _ são verdadeiras&#xD;</translations><inputs><input type="%mult%boolUE"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block var="preds"/></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></block><block s="doReport"><block s="reportAnd"><block s="evaluate"><block s="reportListItem"><l>1</l><block var="preds"/></block><list></list></block><custom-block s="all of %mult%boolUE"><block s="reportCDR"><block var="preds"/></block></custom-block></block></block></script></block-definition><block-definition s="any of %&apos;preds&apos;" type="predicate" category="operators"><comment x="0" y="0" w="240" collapsed="false">Takes any number of Boolean (true/false) inputs (use the left and right arrowheads to adjust the number of input slots) and reports TRUE if at least one input is TRUE, otherwise FALSE.</comment><header></header><code></code><translations>pt:alguma das afirmações _ é verdadeira&#xD;</translations><inputs><input type="%mult%boolUE"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block var="preds"/></block><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block><block s="doReport"><block s="reportOr"><block s="evaluate"><block s="reportListItem"><l>1</l><block var="preds"/></block><list></list></block><custom-block s="any of %mult%boolUE"><block s="reportCDR"><block var="preds"/></block></custom-block></block></block></script></block-definition><block-definition s="%&apos;method&apos; url: %&apos;url&apos; send: %&apos;payload&apos; headers: %&apos;headers&apos;" type="reporter" category="sensing"><header></header><code></code><translations>pt:a resposta a _ de _ enviando _ e cabeçalhos _&#xD;</translations><inputs><input type="%s" readonly="true">GET<options>GET&#xD;POST&#xD;PUT&#xD;DELETE</options></input><input type="%s">https://snap.berkeley.edu</input><input type="%s"></input><input type="%mult%l" readonly="true"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>method</l><l>url</l><l>data</l><l>headers</l><l>proc</l></list><l>var response, i, header;&#xD;if (!proc.httpRequest) {&#xD;  proc.httpRequest = new XMLHttpRequest();&#xD;  proc.httpRequest.open(method, url, true);&#xD;  proc.assertType(headers, &apos;list&apos;);&#xD;  for (i = 1; i &lt;= headers.length(); i += 1) {&#xD;    header = headers.at(i);&#xD;    proc.assertType(header, &apos;list&apos;);&#xD;    proc.httpRequest.setRequestHeader(&#xD;      header.at(1),&#xD;      header.at(2)&#xD;    );&#xD;  }&#xD;  proc.httpRequest.send(data || null);&#xD;} else if (proc.httpRequest.readyState === 4) {&#xD;  response = proc.httpRequest.responseText;&#xD;  proc.httpRequest = null;&#xD;  return response;&#xD;}&#xD;proc.pushContext(&apos;doYield&apos;);&#xD;proc.pushContext();</l></block><list><block var="method"/><block var="url"/><block var="payload"/><block var="headers"/></list></block></block></script></block-definition><block-definition s="key: %&apos;key&apos; value: %&apos;value&apos;" type="reporter" category="operators"><header></header><code></code><translations>pt:um par (chave: _ , valor: _ )&#xD;</translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><block s="reportNewList"><list><block var="key"/><block var="value"/></list></block></block></script></block-definition><block-definition s="current location" type="reporter" category="sensing"><comment x="0" y="0" w="200" collapsed="false">Reports a three-item list containing the latitude and longitude of the user, and the precision of the measurements.  Works only if the user allows snap.berkeley.edu access to location data.  Some browsers also require an HTTPS connection to Snap!.</comment><header></header><code></code><translations>pt:a localização actual do dispositivo&#xD;</translations><inputs></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>proc</l></list><l>if (!proc.geostarted) {&#xD;  var geo = navigator.geolocation;&#xD;  var cords = [];&#xD;  var options = {&#xD;    enableHighAccuracy: false,&#xD;  };&#xD;&#xD;  function success(pos) {&#xD;    console.log(pos);&#xD;    proc.geocords = [pos.coords.latitude,&#xD;                     pos.coords.longitude,&#xD;                     pos.coords.accuracy];&#xD;  }&#xD;&#xD;  function error(err) {&#xD;    alert("ERROR " + err.code + ": " + err.message);&#xD;  }&#xD;  proc.geostarted = true;&#xD;  proc.geocords = null;&#xD;  console.log("starting geolocation")&#xD;  geo.getCurrentPosition(success, error, options);&#xD;} else if (proc.geocords) {&#xD;  var cords = proc.geocords;&#xD;  proc.geostarted = null;&#xD;  proc.geocords = null;&#xD;  console.log("returning");&#xD;  return new List(cords);&#xD;} else {&#xD;  console.log("yielding");&#xD;  proc.pushContext(&apos;doYield&apos;);&#xD;  proc.pushContext();&#xD;}</l></block><list></list></block></block></script></block-definition><block-definition s="all but first letter of %&apos;string&apos;" type="reporter" category="operators"><comment x="0" y="0" w="199" collapsed="false">Takes a text string as input, and reports a new text string containing all but the first character of the input.</comment><header></header><code></code><translations>pt:_ sem o primeiro caractere&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doDeclareVariables"><list><l>result</l><l>i</l></list></block><block s="doWarp"><script><block s="doIf"><block s="reportEquals"><block s="reportStringSize"><block var="string"/></block><l>0</l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block s="reportSum"><l>0</l><l>0</l></block></block></block></script></block><block s="doSetVar"><l>result</l><l></l></block><block s="doSetVar"><l>i</l><l>2</l></block><block s="doUntil"><block s="reportGreaterThan"><block var="i"/><block s="reportStringSize"><block var="string"/></block></block><script><block s="doSetVar"><l>result</l><block s="reportJoinWords"><list><block var="result"/><block s="reportLetter"><block var="i"/><block var="string"/></block></list></block></block><block s="doChangeVar"><l>i</l><l>1</l></block></script></block><block s="doReport"><block var="result"/></block></script></block></script></block-definition><block-definition s="all but first word of %&apos;sentence&apos;" type="reporter" category="operators"><comment x="0" y="0" w="223.000001" collapsed="false">Takes a text string as input, divides it into words treating one or more spaces as a word separator (only spaces count; punctuation is part of the word) and reports a text string containing all but the first word, with one space between words and no spaces at the beginning or end. (Note: consider using SENTENCE-&gt;LIST and processing the resulting list instead of doing recursion on sentences in text string form.  List operations are faster.)</comment><header></header><code></code><translations>pt:_ sem a primeira palavra&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doDeclareVariables"><list><l>index</l><l>bf</l></list></block><block s="doWarp"><script><block s="doSetVar"><l>bf</l><l></l></block><block s="doSetVar"><l>index</l><l>1</l></block><block s="doIf"><block s="reportEquals"><block s="reportStringSize"><block var="sentence"/></block><l>0</l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block s="reportJoinWords"><list><l>empty </l><l>sentence</l></list></block></block></block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><block s="reportStringSize"><block var="sentence"/></block></block><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block></block><script><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block s="reportJoinWords"><list><l>empty </l><l>sentence</l></list></block></block></block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><block s="reportStringSize"><block var="sentence"/></block></block><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block><script><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="index"/><block s="reportStringSize"><block var="sentence"/></block></block><script><block s="doReport"><l></l></block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><block s="reportStringSize"><block var="sentence"/></block></block><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block></block><script><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block><script><block s="doReport"><l></l></block></script></block><block s="doUntil"><block s="reportGreaterThan"><block var="index"/><block s="reportStringSize"><block var="sentence"/></block></block><script><block s="doSetVar"><l>bf</l><block s="reportJoinWords"><list><block var="bf"/><block s="reportLetter"><block var="index"/><block var="sentence"/></block></list></block></block><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doReport"><block var="bf"/></block></script></block></script></block-definition><block-definition s="all but last letter of %&apos;string&apos;" type="reporter" category="operators"><comment x="0" y="0" w="218" collapsed="false">Takes a text string as input, and reports a new text string containing all but the last letter of the input.</comment><header></header><code></code><translations>pt:_ sem o último caractere&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doDeclareVariables"><list><l>result</l><l>i</l></list></block><block s="doWarp"><script><block s="doIf"><block s="reportEquals"><block s="reportStringSize"><block var="string"/></block><l>0</l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block s="reportSum"><l>0</l><l>0</l></block></block></block></script></block><block s="doSetVar"><l>result</l><l></l></block><block s="doSetVar"><l>i</l><l>1</l></block><block s="doUntil"><block s="reportEquals"><block var="i"/><block s="reportStringSize"><block var="string"/></block></block><script><block s="doSetVar"><l>result</l><block s="reportJoinWords"><list><block var="result"/><block s="reportLetter"><block var="i"/><block var="string"/></block></list></block></block><block s="doChangeVar"><l>i</l><l>1</l></block></script></block><block s="doReport"><block var="result"/></block></script></block></script></block-definition><block-definition s="all but last word of %&apos;sentence&apos;" type="reporter" category="operators"><comment x="0" y="0" w="211.99999999999997" collapsed="false">Takes a text string as input, divides it into words treating one or more spaces as a word separator (only spaces count; punctuation is part of the word) and reports a text string containing all but the last word, with one space between words and no spaces at the beginning or end.  (Note: consider using SENTENCE-&gt;LIST and processing the resulting list instead of doing recursion on sentences in text string form.  List operations are faster.)</comment><header></header><code></code><translations>pt:_ sem a última palavra&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doDeclareVariables"><list><l>index</l><l>bl</l></list></block><block s="doWarp"><script><block s="doSetVar"><l>bl</l><l></l></block><block s="doSetVar"><l>index</l><block s="reportStringSize"><block var="sentence"/></block></block><block s="doIf"><block s="reportEquals"><block s="reportStringSize"><block var="sentence"/></block><l>0</l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block s="reportJoinWords"><list><l>empty </l><l>sentence</l></list></block></block></block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><l>1</l></block><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block></block><script><block s="doChangeVar"><l>index</l><l>-1</l></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block s="reportJoinWords"><list><l>empty </l><l>sentence</l></list></block></block></block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><l>1</l></block><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block><script><block s="doChangeVar"><l>index</l><l>-1</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="index"/><l>1</l></block><script><block s="doReport"><l></l></block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><l>1</l></block><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block></block><script><block s="doChangeVar"><l>index</l><l>-1</l></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block><script><block s="doReport"><l></l></block></script></block><block s="doUntil"><block s="reportLessThan"><block var="index"/><l>1</l></block><script><block s="doSetVar"><l>bl</l><block s="reportJoinWords"><list><block s="reportLetter"><block var="index"/><block var="sentence"/></block><block var="bl"/></list></block></block><block s="doChangeVar"><l>index</l><l>-1</l></block></script></block><block s="doReport"><block var="bl"/></block></script></block></script></block-definition><block-definition s="first word of %&apos;sentence&apos;" type="reporter" category="operators"><comment x="0" y="0" w="236" collapsed="false">Takes a text string as input, divides it into words treating one or more spaces as a word separator (only spaces count; punctuation is part of the word) and reports a text string containing only the first word, with no spaces before or after it.</comment><header></header><code></code><translations>pt:a primeira palavra de _&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doDeclareVariables"><list><l>index</l><l>first</l></list></block><block s="doWarp"><script><block s="doSetVar"><l>first</l><l></l></block><block s="doSetVar"><l>index</l><l>1</l></block><block s="doIf"><block s="reportEquals"><block s="reportStringSize"><block var="sentence"/></block><l>0</l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block s="reportJoinWords"><list><l>empty </l><l>sentence</l></list></block></block></block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><block s="reportStringSize"><block var="sentence"/></block></block><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block></block><script><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block s="reportJoinWords"><list><l>empty </l><l>sentence</l></list></block></block></block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><block s="reportStringSize"><block var="sentence"/></block></block><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block><script><block s="doSetVar"><l>first</l><block s="reportJoinWords"><list><block var="first"/><block s="reportLetter"><block var="index"/><block var="sentence"/></block></list></block></block><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doIf"><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block><script><block s="doSetVar"><l>first</l><block s="reportJoinWords"><list><block var="first"/><block s="reportLetter"><block var="index"/><block var="sentence"/></block></list></block></block></script></block><block s="doReport"><block var="first"/></block></script></block></script></block-definition><block-definition s="last letter of %&apos;word&apos;" type="reporter" category="operators"><comment x="0" y="0" w="260" collapsed="false">Takes a text string as input, and reports the last character in the string.</comment><header></header><code></code><translations>pt:o último caractere de _&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doReport"><block s="reportLetter"><block s="reportStringSize"><block var="word"/></block><block var="word"/></block></block></script></block-definition><block-definition s="last word of %&apos;sentence&apos;" type="reporter" category="operators"><comment x="0" y="0" w="262" collapsed="false">Takes a text string as input, divides it into words treating one or more spaces as a word separator (only spaces count; punctuation is part of the word) and reports a text string containing only the last word of the input, with no spaces before or after it.</comment><header></header><code></code><translations>pt:a última palavra de _&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doDeclareVariables"><list><l>index</l><l>last</l></list></block><block s="doWarp"><script><block s="doSetVar"><l>last</l><l></l></block><block s="doSetVar"><l>index</l><block s="reportStringSize"><block var="sentence"/></block></block><block s="doIf"><block s="reportEquals"><block s="reportStringSize"><block var="sentence"/></block><l>0</l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block s="reportJoinWords"><list><l>empty </l><l>sentence</l></list></block></block></block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><l>1</l></block><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block></block><script><block s="doChangeVar"><l>index</l><l>-1</l></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block s="reportJoinWords"><list><l>empty </l><l>sentence</l></list></block></block></block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><l>1</l></block><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block><script><block s="doSetVar"><l>last</l><block s="reportJoinWords"><list><block s="reportLetter"><block var="index"/><block var="sentence"/></block><block var="last"/></list></block></block><block s="doChangeVar"><l>index</l><l>-1</l></block></script></block><block s="doIf"><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block><script><block s="doSetVar"><l>last</l><block s="reportJoinWords"><list><block s="reportLetter"><block var="index"/><block var="sentence"/></block><block var="last"/></list></block></block></script></block><block s="doReport"><block var="last"/></block></script></block></script></block-definition><block-definition s="empty word? %&apos;word&apos;" type="predicate" category="operators"><comment x="0" y="0" w="208" collapsed="false">Takes a text string as input, and reports TRUE if the string has no characters in it of any kind, otherwise false.</comment><header></header><code></code><translations>pt:a palavra _ está vazia&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doReport"><block s="reportEquals"><block s="reportStringSize"><block var="word"/></block><l>0</l></block></block></script></block-definition><block-definition s="empty sentence? %&apos;sentence&apos;" type="predicate" category="operators"><comment x="0" y="0" w="221" collapsed="false">Takes a text string as input, and reports TRUE if the input contains no characters other than spaces (therefore, no words when the string is considered as a sentence), otherwise FALSE.</comment><header></header><code></code><translations>pt:a frase _ está vazia&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doDeclareVariables"><list><l>index</l></list></block><block s="doSetVar"><l>index</l><l>1</l></block><block s="doIf"><block s="reportEquals"><block s="reportStringSize"><block var="sentence"/></block><l>0</l></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></block><block s="doUntil"><block s="reportOr"><block s="reportEquals"><block var="index"/><block s="reportStringSize"><block var="sentence"/></block></block><block s="reportNot"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block></block><script><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doReport"><block s="reportEquals"><block s="reportLetter"><block var="index"/><block var="sentence"/></block><l> </l></block></block></script></block-definition><block-definition s="join words %&apos;words&apos;" type="reporter" category="operators"><header></header><code></code><translations>de:füge Wörter zusammen _&#xD;ca:uneix les paraules _&#xD;es:unir las palabras _&#xD;fr:fusionne les mots _&#xD;pt:uma frase com as palavras _&#xD;</translations><inputs><input type="%mult%txt"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block s="reportCDR"><block var="words"/></block></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="words"/></block></block></script></block><block s="doIf"><block s="reportEquals"><l></l><block s="reportListItem"><l>1</l><block var="words"/></block></block><script><block s="doReport"><custom-block s="join words %mult%txt"><block s="reportCDR"><block var="words"/></block></custom-block></block></script></block><block s="doIf"><block s="reportEquals"><l></l><block s="reportListItem"><l>2</l><block var="words"/></block></block><script><block s="doReport"><custom-block s="join words %mult%txt"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="words"/></block><block s="reportCDR"><block s="reportCDR"><block var="words"/></block></block></block></custom-block></block></script></block><block s="doReport"><block s="reportJoinWords"><list><block s="reportListItem"><l>1</l><block var="words"/></block><l> </l><custom-block s="join words %mult%txt"><block s="reportCDR"><block var="words"/></block></custom-block></list></block></block></script></block-definition><block-definition s="list $arrowRight sentence %&apos;data&apos;" type="reporter" category="operators"><header></header><code></code><translations>de:Liste $arrowRight Satz _&#xD;ca:llista $arrowRight frase _&#xD;es:lista $arrowRight frase _&#xD;fr:liste $arrowRight phrase _&#xD;pt:uma frase com as palavras em _&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><custom-block s="join words %mult%txt"><block var="data"/></custom-block></block></script></block-definition><block-definition s="sentence $arrowRight list %&apos;text&apos;" type="reporter" category="operators"><header></header><code></code><translations>de:Satz $arrowRight Liste _&#xD;ca:frase $arrowRight llista _&#xD;es:frase $arrowRight lista _&#xD;fr:phrase $arrowRight liste _&#xD;pt:uma lista com as palavras da frase _&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doReport"><block s="reportTextSplit"><block var="text"/><l><option>whitespace</option></l></block></block></script></block-definition><block-definition s="word $arrowRight list %&apos;word&apos;" type="reporter" category="operators"><comment x="0" y="0" w="146.42857142857144" collapsed="false">report a list in which each item is one letter from the input word</comment><header></header><code></code><translations>de:Wort $arrowRight Liste _&#xD;ca:paraula $arrowRight llista _&#xD;es:palabra $arrowRight lista _&#xD;fr:mot $arrowRight liste _&#xD;pt:uma lista com os caracteres da palavra _&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doReport"><block s="reportTextSplit"><block var="word"/><l><option>letter</option></l></block></block></script></block-definition><block-definition s="list $arrowRight word %&apos;list&apos;" type="reporter" category="operators"><comment x="0" y="0" w="158.57142857142858" collapsed="false">join all the items of the input list&#xD;into a single word, and report it</comment><header></header><code></code><translations>de:Liste $arrowRight Wort _&#xD;ca:llista $arrowRight paraula _&#xD;es:lista $arrowRight palabra _&#xD;fr:liste $arrowRight mot _&#xD;pt:uma palavra com os caracteres em _&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportJoinWords"><block var="list"/></block></block></script></block-definition><block-definition s="cases: if %&apos;test&apos; then %&apos;result&apos; %&apos;more&apos;" type="command" category="control"><header></header><code></code><translations>pt:se _ , então _ _&#xD;</translations><inputs><input type="%b"></input><input type="%cs"></input><input type="%mult%boolUE"></input></inputs><script><block s="doIfElse"><block var="test"/><script><block s="doRun"><block var="result"/><list></list></block></script><script><custom-block s="catch %upvar %cs"><l>tag</l><script><block s="doForEach"><l>item</l><block var="more"/><script><block s="doIf"><block s="evaluate"><block var="item"/><list></list></block><script><custom-block s="throw %s"><block var="tag"/></custom-block></script></block></script></block></script></custom-block><block s="doHideVar"><l>test</l></block></script></block></script></block-definition><block-definition s="catch %&apos;tag&apos; %&apos;action&apos;" type="command" category="control"><header></header><code></code><translations>pt:captura _ _&#xD;</translations><inputs><input type="%upvar"></input><input type="%cs"></input></inputs><script><block s="doCallCC"><block s="reifyScript"><script><block s="doSetVar"><l>tag</l><block var="cont"/></block><block s="doRun"><block var="action"/><list></list></block></script><list><l>cont</l></list></block></block></script></block-definition><block-definition s="throw %&apos;cont&apos;" type="command" category="control"><header></header><code></code><translations>pt:lança _&#xD;</translations><inputs><input type="%s">catchtag</input></inputs><script><block s="doRun"><block var="cont"/><list></list></block></script></block-definition><block-definition s="else if %&apos;test&apos; then %&apos;action&apos;" type="predicate" category="control"><header></header><code></code><translations>pt:senão, se _ , então _&#xD;</translations><inputs><input type="%b"></input><input type="%cs"></input></inputs><script><block s="doIfElse"><block var="test"/><script><block s="doRun"><block var="action"/><list></list></block><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block></script></block-definition><block-definition s="else %&apos;action&apos;" type="predicate" category="control"><header></header><code></code><translations>pt:senão, _&#xD;</translations><inputs><input type="%cs"></input></inputs><script><block s="doRun"><block var="action"/><list></list></block><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></block-definition><block-definition s="Leap number of hands" type="reporter" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list></list><l>return window.controller.frame(0).hands.length;</l></block><list></list></block></block></script></block-definition><block-definition s="Leap %&apos;pos&apos; position of hand %&apos;num&apos;" type="reporter" category="other"><header></header><code></code><translations></translations><inputs><input type="%txt" readonly="true">x<options>x&#xD;y&#xD;z</options></input><input type="%n">1</input></inputs><script><block s="doDeclareVariables"><list><l>a</l></list></block><block s="doIfElse"><block s="reportNot"><block s="reportGreaterThan"><block var="num"/><custom-block s="Leap number of hands"></custom-block></block></block><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>pos</l><l>num</l></list><l>var a = {x:0, y:1, z:2}[pos]; return window.controller.frame(0).hands[num-1].stabilizedPalmPosition[a];</l></block><list><block var="pos"/><block var="num"/></list></block></block></script><script><block s="doReport"><l>0</l></block></script></block></script></block-definition><block-definition s="Leap %&apos;pos&apos; rotation of hand %&apos;num&apos;" type="reporter" category="other"><header></header><code></code><translations></translations><inputs><input type="%txt" readonly="true">yaw<options>yaw&#xD;pitch&#xD;roll</options></input><input type="%n">1</input></inputs><script><block s="doIfElse"><block s="reportNot"><block s="reportGreaterThan"><block var="num"/><custom-block s="Leap number of hands"></custom-block></block></block><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>pos</l><l>num</l></list><l>var f = window.controller.frame(0);&#xD;switch (pos){&#xD;  case "yaw":&#xD;    return f.hands[num-1].yaw();&#xD;  case "pitch":&#xD;    return f.hands[num-1].pitch();&#xD;  case "roll":&#xD;    return f.hands[num-1].roll();&#xD;};&#xD;            &#xD;        </l></block><list><block var="pos"/><block var="num"/></list></block></block></script><script><block s="doReport"><l>0</l></block></script></block></script></block-definition><block-definition s="Leap %&apos;pos&apos; position of finger %&apos;num&apos;" type="reporter" category="other"><header></header><code></code><translations></translations><inputs><input type="%txt" readonly="true">x<options>x&#xD;y&#xD;z</options></input><input type="%n">1</input></inputs><script><block s="doIfElse"><block s="reportNot"><block s="reportGreaterThan"><block var="num"/><block s="evaluate"><block s="reportJSFunction"><list></list><l>return window.controller.frame(0).fingers.length;</l></block><list></list></block></block></block><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>pos</l><l>num</l></list><l>var a = {x:0, y:1, z:2}[pos]; return window.controller.frame(0).fingers[num-1].stabilizedTipPosition[a];</l></block><list><block var="pos"/><block var="num"/></list></block></block></script><script><block s="doReport"><l>0</l></block></script></block></script></block-definition><block-definition s="Leap hand %&apos;num&apos; is pinching" type="predicate" category="other"><header></header><code></code><translations></translations><inputs><input type="%s">1</input></inputs><script><block s="doIfElse"><block s="reportNot"><block s="reportGreaterThan"><block var="num"/><custom-block s="Leap number of hands"></custom-block></block></block><script><block s="doReport"><block s="reportGreaterThan"><block s="evaluate"><block s="reportJSFunction"><list><l>num</l></list><l>return window.controller.frame(0).hands[num-1].pinchStrength;</l></block><list><block var="num"/></list></block><l>0.75</l></block></block></script><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block></script></block-definition><block-definition s="Leap pinch strength of hand %&apos;num&apos;" type="reporter" category="other"><header></header><code></code><translations></translations><inputs><input type="%n">1</input></inputs><script><block s="doIfElse"><block s="reportNot"><block s="reportGreaterThan"><block var="num"/><custom-block s="Leap number of hands"></custom-block></block></block><script><block s="doReport"><block s="reportProduct"><block s="evaluate"><block s="reportJSFunction"><list><l>num</l></list><l>return window.controller.frame(0).hands[num-1].pinchStrength;</l></block><list><block var="num"/></list></block><l>100</l></block></block></script><script><block s="doReport"><l>0</l></block></script></block></script></block-definition><block-definition s="Leap $flag" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doIf"><block s="evaluate"><block s="reportJSFunction"><list></list><l>return window.controller !== undefined</l></block><list></list></block><script><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doDeclareVariables"><list><l>test</l></list></block><block s="doSetVar"><l>test</l><block s="evaluate"><block s="reportJSFunction"><list></list><l>var leapScript,&#xD;    done = false;&#xD;leapScript = document.createElement(&apos;script&apos;),&#xD;leapScript.onload = function () {&#xD;    done = true;&#xD;    console.log(&apos;leap is ready&apos;);&#xD;};&#xD;document.head.appendChild(leapScript);&#xD;leapScript.src = &apos;https://js.leapmotion.com/leap-0.6.4.min.js&apos;;&#xD;return function () {return done; }</l></block><list></list></block></block><block s="doWaitUntil"><block s="evaluate"><block var="test"/><list></list></block></block><block s="doRun"><block s="reportJSFunction"><list></list><l>window.controller = new Leap.Controller({enableGestures: true, background: true}); window.controller.connect();</l></block><list></list></block></script></block-definition><block-definition s="costume from text %&apos;text&apos; size %&apos;size&apos;" type="reporter" category="looks"><header></header><code></code><translations>de:Kostüm aus Text _ Größe _&#xD;pt:um traje com o texto _ de tamanho _&#xD;</translations><inputs><input type="%s">A</input><input type="%n">72</input></inputs><script><block s="doDeclareVariables"><list><l>costume</l><l>x</l><l>y</l><l>dir</l><l>cst</l><l>trails</l></list></block><block s="doSetVar"><l>x</l><block s="xPosition"></block></block><block s="doSetVar"><l>y</l><block s="yPosition"></block></block><block s="doSetVar"><l>dir</l><block s="direction"></block></block><block s="doSetVar"><l>cst</l><block s="getCostumeIdx"></block></block><block s="up"></block><block s="gotoXY"><l>0</l><l>0</l></block><block s="setHeading"><l>90</l></block><block s="doSwitchToCostume"><l><option>Turtle</option></l></block><block s="doSetVar"><l>trails</l><block s="reportPenTrailsAsCostume"></block></block><block s="clear"></block><block s="write"><block var="text"/><block var="size"/></block><block s="doSetVar"><l>costume</l><block s="reportPenTrailsAsCostume"></block></block><block s="clear"></block><block s="doRun"><block s="reportJSFunction"><list><l>costume</l><l>name</l></list><l>costume.name = name;</l></block><list><block var="costume"/><block var="text"/></list></block><block s="gotoXY"><l>0</l><l>0</l></block><block s="doSwitchToCostume"><block var="trails"/></block><block s="doStamp"></block><block s="doSwitchToCostume"><block var="cst"/></block><block s="gotoXY"><block var="x"/><block var="y"/></block><block s="setHeading"><block var="dir"/></block><block s="doReport"><block var="costume"/></block></script></block-definition><block-definition s="set pen color to h: %&apos;h&apos; s: %&apos;s&apos; v: %&apos;v&apos;" type="command" category="pen"><header></header><code></code><translations>pt:altera a cor da caneta para matiz _ , saturação _ e brilho _ (0 a 1)&#xD;</translations><inputs><input type="%n">0.3</input><input type="%n">0.7</input><input type="%n">0.6</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>h</l><l>s</l><l>v</l></list><l>var col = new Color();&#xD;col.set_hsv(h, s, v);&#xD;this.setColor(col);</l></block><list><block var="h"/><block var="s"/><block var="v"/></list></block></script></block-definition><block-definition s="HSV color" type="reporter" category="pen"><header></header><code></code><translations>pt:a cor da caneta em HSV (matiz, saturação e brilho, 0 a 1)&#xD;</translations><inputs></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l></l></list><l>return new List(this.color.hsv());</l></block><list></list></block></block></script></block-definition><block-definition s="safely try %&apos;action&apos; then if %&apos;error&apos; %&apos;handler&apos;" type="command" category="control"><header></header><code></code><translations>pt:tenta executar _ e, em caso de erro _ , executa _&#xD;</translations><inputs><input type="%cs"></input><input type="%upvar"></input><input type="%cs"></input></inputs><script><custom-block s="let %upvar be %s"><l>reset</l><block s="evaluate"><block s="reportJSFunction"><list><l>proc</l></list><l>var oldHandleError = proc.handleError,&#xD;    oldCatchingErrors = proc.isCatchingErrors;&#xD;&#xD;return function(){&#xD; proc.handleError = oldHandleError;&#xD; proc.isCatchingErrors = oldCatchingErrors;&#xD;}</l></block><list></list></block></custom-block><block s="doCallCC"><block s="reifyScript"><script><block s="doRun"><block s="reportJSFunction"><list><l>reset</l><l>action</l><l>handler</l><l>proc</l></list><l>proc.isCatchingErrors = true;&#xD;proc.handleError = function(error, element){&#xD; reset();&#xD; proc.context = handler;&#xD; proc.context.variables.setVar("error", error);&#xD;}&#xD;&#xD;try{&#xD; proc.evaluate(action, new List(), true);&#xD;}&#xD;catch(e){&#xD; proc.handleError(e, null);&#xD;} </l></block><list><block var="reset"/><block var="action"/><block s="reifyScript"><script><block s="doRun"><block s="reifyScript"><script><block s="doRun"><block var="handler"/><list></list></block><block s="doRun"><block var="return"/><list></list></block></script><list></list></block><list></list></block></script><list></list></block></list></block></script><list><l>return</l></list></block></block><block s="doRun"><block var="reset"/><list></list></block></script></block-definition><block-definition s="error %&apos;msg&apos;" type="command" category="control"><header></header><code></code><translations>pt:lança o erro _&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>msg</l></list><l>throw new Error(msg);</l></block><list><block var="msg"/></list></block></script></block-definition><block-definition s="let %&apos;var&apos; be %&apos;val&apos;" type="command" category="other"><header></header><code></code><translations>pt:cria a variável de guião _ com valor _&#xD;</translations><inputs><input type="%upvar"></input><input type="%s"></input></inputs><script><block s="doSetVar"><l>var</l><block var="val"/></block></script></block-definition><block-definition s="safely try reporting %&apos;this&apos; then if %&apos;error&apos; report %&apos;that&apos;" type="reporter" category="control"><header></header><code></code><translations></translations><inputs><input type="%anyUE"></input><input type="%upvar"></input><input type="%anyUE"></input></inputs><script><block s="doDeclareVariables"><list><l>value</l></list></block><custom-block s="safely try %cs then if %upvar %cs"><script><block s="doSetVar"><l>value</l><block s="evaluate"><block var="this"/><list></list></block></block></script><l>err</l><script><block s="doSetVar"><l>error</l><block var="err"/></block><block s="doSetVar"><l>value</l><block s="evaluate"><block var="that"/><list></list></block></block></script></custom-block><block s="doReport"><block var="value"/></block></script></block-definition><block-definition s="multiline %&apos;text&apos;" type="reporter" category="operators"><header></header><code></code><translations>pt:o texto multilinha _&#xD;</translations><inputs><input type="%mlt"></input></inputs><script><block s="doReport"><block var="text"/></block></script></block-definition><block-definition s="setting %&apos;which&apos;" type="reporter" category="sensing"><header></header><code></code><translations>pt:o valor da configuração _&#xD;</translations><inputs><input type="%s" readonly="true"><options>Project notes&#xD;Project name&#xD;User&#xD;Presentation mode&#xD;Language&#xD;Zoom blocks&#xD;Stage size&#xD;Stage scale&#xD;Retina display support&#xD;Long form input dialog&#xD;Plain prototype labels&#xD;Input sliders&#xD;Execute on slider change&#xD;Clicking sound&#xD;Turbo mode&#xD;Flat design&#xD;Keyboard editing&#xD;Visible stepping&#xD;Thread safe scripts&#xD;Prefer smooth animations&#xD;Flat line ends&#xD;Codification support&#xD;Inheritance support&#xD;Visible palette</options></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>which</l></list><l>var stage = this.parentThatIsA(StageMorph),&#xD;    ide = stage.parentThatIsA(IDE_Morph),&#xD;    world = stage.parentThatIsA(WorldMorph);&#xD;&#xD;switch (which) {&#xD;    case &apos;Project notes&apos;:&#xD;        return ide.projectNotes;&#xD;    case &apos;Project name&apos;:&#xD;        return ide.projectName;&#xD;    case &apos;User&apos;:&#xD;        return ide.cloud.username;&#xD;    case &apos;Presentation mode&apos;:&#xD;        return ide.isAppMode;&#xD;    case &apos;Language&apos;:&#xD;        return SnapTranslator.language;&#xD;    case &apos;Zoom blocks&apos;:&#xD;        return SyntaxElementMorph.prototype.scale;&#xD;    case &apos;Stage size&apos;:&#xD;        return new List([StageMorph.prototype.dimensions.x,&#xD;                                   StageMorph.prototype.dimensions.y]);&#xD;    case &apos;Stage scale&apos;:&#xD;       return stage.scale;&#xD;    case &apos;Retina display support&apos;:&#xD;        return isRetinaEnabled();&#xD;    case &apos;Long form input dialog&apos;:&#xD;        return InputSlotDialogMorph.prototype.isLaunchingExpanded;&#xD;    case &apos;Plain prototype labels&apos;:&#xD;        return BlockLabelPlaceHolderMorph.prototype.plainLabel;&#xD;    case &apos;Input sliders&apos;:&#xD;        return MorphicPreferences.useSliderForInput;&#xD;    case &apos;Execute on slider change&apos;:&#xD;        return ArgMorph.prototype.executeOnSliderEdit;&#xD;    case &apos;Clicking sound&apos;:&#xD;        return !!BlockMorph.prototype.snapSound;&#xD;    case &apos;Turbo mode&apos;:&#xD;        return stage.isFastTracked;&#xD;    case &apos;Flat design&apos;:&#xD;        return MorphicPreferences.isFlat;&#xD;    case &apos;Keyboard editing&apos;:&#xD;        return world.keyboardReceiver instanceof ScriptFocusMorph;&#xD;    case &apos;Visible stepping&apos;:&#xD;        return Process.prototype.enableSingleStepping;&#xD;    case &apos;Thread safe scripts&apos;:&#xD;        return stage.isThreadSafe;&#xD;    case &apos;Prefer smooth animations&apos;:&#xD;        return StageMorph.prototype.frameRate &gt; 0;&#xD;    case &apos;Flat line ends&apos;:&#xD;        return SpriteMorph.prototype.useFlatLineEnds;&#xD;    case &apos;Codification support&apos;:&#xD;        return StageMorph.prototype.enableCodeMapping;&#xD;    case &apos;Inheritance support&apos;:&#xD;        return StageMorph.prototype.enableInheritance;&#xD;    default: return which;&#xD;    case &apos;Visible palette&apos;:&#xD;        return ide.currentCategory;&#xD;}</l></block><list><block var="which"/></list></block></block></script></block-definition><block-definition s="set flag %&apos;which&apos; to %&apos;tf&apos;" type="command" category="sensing"><header></header><code></code><translations>pt:altera o valor da configuração _ para _&#xD;</translations><inputs><input type="%s" readonly="true"><options>Presentation mode&#xD;Retina display support&#xD;Long form input dialog&#xD;Plain prototype labels&#xD;Input sliders&#xD;Execute on slider change&#xD;Clicking sound&#xD;Turbo mode&#xD;Flat design&#xD;Keyboard editing&#xD;Visible stepping&#xD;Thread safe scripts&#xD;Prefer smooth animations&#xD;Flat line ends&#xD;Codification support&#xD;Inheritance support</options></input><input type="%b"></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>which</l><l>tf</l></list><l>var   stage = this.parentThatIsA(StageMorph),&#xD;        ide = stage.parentThatIsA(IDE_Morph),&#xD;        world = stage.parentThatIsA(WorldMorph),&#xD;        thisObj = this;&#xD;&#xD;if (tf != !!tf) return;&#xD;&#xD;try{&#xD;ide.savingPreferences = false;&#xD;&#xD;switch (which) {&#xD;    case &apos;Presentation mode&apos;:&#xD;        if (tf != ide.isAppMode) ide.toggleAppMode();&#xD;        break;&#xD;    case &apos;Retina display support&apos;:&#xD;        if (tf != isRetinaEnabled()) ide.toggleRetina();&#xD;        break;&#xD;    case &apos;Long form input dialog&apos;:&#xD;        if (tf != InputSlotDialogMorph.prototype.isLaunchingExpanded)&#xD;            ide.toggleLongFormInputDialog();&#xD;        break;&#xD;    case &apos;Plain prototype labels&apos;:&#xD;        if (tf != BlockLabelPlaceHolderMorph.prototype.plainLabel)&#xD;            ide.togglePlainPrototypeLabels();&#xD;        break;&#xD;    case &apos;Input sliders&apos;:&#xD;        MorphicPreferences.useSliderForInput = tf;&#xD;        break;&#xD;    case &apos;Execute on slider change&apos;:&#xD;        ArgMorph.prototype.executeOnSliderEdit = tf;&#xD;        break;&#xD;    case &apos;Clicking sound&apos;:&#xD;        if (tf != !!BlockMorph.prototype.snapSound)&#xD;            BlockMorph.prototype.toggleSnapSound();&#xD;        break;&#xD;    case &apos;Turbo mode&apos;:&#xD;        if (tf != stage.isFastTracked)&#xD;            ide.toggleFastTracking();&#xD;        break;&#xD;    case &apos;Flat design&apos;:&#xD;        if (tf == MorphicPreferences.isFlat) break;&#xD;        if (tf)&#xD;            ide.flatDesign();&#xD;        else&#xD;            ide.defaultDesign();&#xD;        break;&#xD;    case &apos;Keyboard editing&apos;:&#xD;        if (tf != (world.keyboardReceiver instanceof ScriptFocusMorph)) {&#xD;            thisObj.scripts.toggleKeyboardEntry();&#xD;        };&#xD;        break;&#xD;    case &apos;Visible stepping&apos;:&#xD;        if (tf != Process.prototype.enableSingleStepping)&#xD;            ide.toggleSingleStepping();&#xD;        break;&#xD;    case &apos;Thread safe scripts&apos;:&#xD;        stage.isThreadSafe = tf;&#xD;        break;&#xD;    case &apos;Prefer smooth animations&apos;:&#xD;        if (tf != (StageMorph.prototype.frameRate &gt; 0))&#xD;            ide.toggleVariableFrameRate();&#xD;        break;&#xD;    case &apos;Flat line ends&apos;:&#xD;        SpriteMorph.prototype.useFlatLineEnds = tf;&#xD;        break;&#xD;    case &apos;Codification support&apos;:&#xD;        if (tf != StageMorph.prototype.enableCodeMapping) {&#xD;            StageMorph.prototype.enableCodeMapping = tf;&#xD;            ide.currentSprite.blocksCache.variables = null;&#xD;            ide.currentSprite.paletteCache.variables = null;&#xD;            ide.refreshPalette();&#xD;        }&#xD;        break;&#xD;    case &apos;Inheritance support&apos;:&#xD;        if (tf != StageMorph.prototype.enableInheritance) {&#xD;            StageMorph.prototype.enableInheritance = tf;&#xD;            ide.currentSprite.blocksCache.variables = null;&#xD;            ide.currentSprite.paletteCache.variables = null;&#xD;            ide.refreshPalette();&#xD;        }&#xD;        break;&#xD;};&#xD;}&#xD;finally {&#xD;ide.savingPreferences = false;&#xD;};&#xD;</l></block><list><block var="which"/><block var="tf"/></list></block></script></block-definition><block-definition s="set value %&apos;which&apos; to %&apos;value&apos;" type="command" category="sensing"><header></header><code></code><translations>pt:altera o valor da configuração _ para _&#xD;</translations><inputs><input type="%s" readonly="true"><options>Project notes&#xD;Project name&#xD;Language&#xD;Zoom blocks&#xD;Stage size&#xD;Stage scale&#xD;Visible palette</options></input><input type="%s"></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>which</l><l>value</l></list><l>var   stage = this.parentThatIsA(StageMorph),&#xD;        ide = stage.parentThatIsA(IDE_Morph),&#xD;        world = stage.parentThatIsA(WorldMorph);&#xD;&#xD;try {&#xD;ide.savingPreferences = false;&#xD;&#xD;switch (which) {&#xD;    case &apos;Project notes&apos;:&#xD;        ide.projectNotes = value;&#xD;        break;&#xD;    case &apos;Project name&apos;:&#xD;        ide.setProjectName(value);&#xD;        break;&#xD;    case &apos;Language&apos;:&#xD;        ide.setLanguage(value);&#xD;        break;&#xD;    case &apos;Zoom blocks&apos;:&#xD;        if (!isNaN(value)) ide.setBlocksScale(Math.min(value, 12));&#xD;        break;&#xD;    case &apos;Stage size&apos;:&#xD;        if ((value instanceof List) &amp;&amp; value.length()==2&#xD;                       &amp;&amp; !isNaN(value.at(1)) &amp;&amp; !isNaN(value.at(2)))&#xD;            ide.setStageExtent(new Point(value.at(1), value.at(2)));&#xD;        break;&#xD;    case &apos;Stage scale&apos;:&#xD;        ide.toggleStageSize(value != 1, Math.max(0.1, value));&#xD;        break;&#xD;    case &apos;Visible palette&apos;:&#xD;        ide.currentCategory = value.toLowerCase();&#xD;        ide.categories.children.forEach(function (each) {&#xD;                each.refresh();&#xD;        });&#xD;        ide.refreshPalette(true);&#xD;        break;&#xD;};&#xD;}&#xD;finally {ide.savingPreferences = true;&#xD;};</l></block><list><block var="which"/><block var="value"/></list></block></script></block-definition><block-definition s="USE BIGNUMS %&apos;bool&apos;" type="command" category="operators"><comment x="0" y="0" w="303.3333333333333" collapsed="false">call with True to turn on the entire Scheme numeric tower, including infinite-precision integers, exact rationals, and complex numbers; call with False to restore native JavaScript arithmetic.</comment><header></header><code></code><translations>pt:altera utilização de aritmética do Scheme para _&#xD;</translations><inputs><input type="%b"></input></inputs><script><block s="doDeclareVariables"><list><l>isDone</l></list></block><block s="doSetVar"><l>isDone</l><block s="evaluate"><block s="reportJSFunction"><list><l>useBigNums</l></list><l>var done = false;&#xD;&#xD;function initialize (callback) {&#xD;    var bigScript = document.createElement(&apos;script&apos;);&#xD;    bigScript.src = &apos;//snap.berkeley.edu/snapsource/libraries/biginteger.js&apos;;&#xD;    bigScript.onload = loadScheme;&#xD;    document.head.appendChild(bigScript);&#xD;&#xD;    function loadScheme () {&#xD;        var schemeScript = document.createElement(&apos;script&apos;);&#xD;        schemeScript.src = &apos;//snap.berkeley.edu/snapsource/libraries/schemeNumber.js&apos;;&#xD;        schemeScript.onload = finish;&#xD;        document.head.appendChild(schemeScript);&#xD;    }&#xD;&#xD;    function finish () {&#xD;        makeGlobalObject();&#xD;        callback();&#xD;    }&#xD;}&#xD;&#xD;function makeGlobalObject () {&#xD;    window.bigNumbers = {&#xD;        originalEvaluate: InputSlotMorph.prototype.evaluate,&#xD;        originalChangeVar: VariableFrame.prototype.changeVar,&#xD;        originalPrims: {&#xD;            reportSum: Process.prototype.reportSum,&#xD;            reportDifference: Process.prototype.reportDifference,&#xD;            reportProduct: Process.prototype.reportProduct,&#xD;            reportQuotient: Process.prototype.reportQuotient,&#xD;            reportPower: Process.prototype.reportPower,&#xD;            reportModulus: Process.prototype.reportModulus,&#xD;            reportRandom: Process.prototype.reportRandom,&#xD;            reportLessThan: Process.prototype.reportLessThan,&#xD;            reportGreaterThan: Process.prototype.reportGreaterThan,&#xD;            reportEquals: Process.prototype.reportEquals,&#xD;            reportIsIdentical: Process.prototype.reportIsIdentical,&#xD;            reportMonadic: Process.prototype.reportMonadic&#xD;        }&#xD;    };&#xD;}&#xD;&#xD;function loadBlocks () {&#xD;    var fn = SchemeNumber.fn;&#xD;    var originalPrims = window.bigNumbers.originalPrims;&#xD;    if (useBigNums) {&#xD;        InputSlotMorph.prototype.evaluate = function () {&#xD;            var contents = this.contents();&#xD;            if (this.constant) {&#xD;                return this.constant;&#xD;            }&#xD;            if (this.isNumeric) {&#xD;                return parseNumber(contents.text || &apos;0&apos;);&#xD;            }&#xD;            return contents.text;&#xD;        };&#xD;        VariableFrame.prototype.changeVar = function (name, delta, sender) {&#xD;            var frame = this.find(name),&#xD;                value,&#xD;                newValue;&#xD;            if (frame) {&#xD;                value = parseNumber(frame.vars[name].value);&#xD;                newValue = value !== value ? delta : value + parseNumber(delta);&#xD;                if (sender instanceof SpriteMorph &amp;&amp;&#xD;                        (frame.owner instanceof SpriteMorph) &amp;&amp;&#xD;                        (sender !== frame.owner)) {&#xD;                    sender.shadowVar(name, newValue);&#xD;                } else {&#xD;                    frame.vars[name].value = newValue;&#xD;                }&#xD;&#xD;            }&#xD;        };&#xD;        Object.assign(Process.prototype, {&#xD;            reportSum: function (a, b) {&#xD;                a = parseNumber(a);&#xD;                b = parseNumber(b);&#xD;                if (a !== a || b !== b) return NaN;&#xD;                return fn[&apos;+&apos;](a, b);&#xD;            },&#xD;            reportDifference: function (a, b) {&#xD;                a = parseNumber(a);&#xD;                b = parseNumber(b);&#xD;                if (a !== a || b !== b) return NaN;&#xD;                return fn[&apos;-&apos;](a, b);&#xD;            },&#xD;            reportProduct: function (a, b) {&#xD;                a = parseNumber(a);&#xD;                b = parseNumber(b);&#xD;                if (a !== a || b !== b) return NaN;&#xD;                return fn[&apos;*&apos;](a, b);&#xD;            },&#xD;            reportQuotient: function (a, b) {&#xD;                a = parseNumber(a);&#xD;                b = parseNumber(b);&#xD;                if (fn[&apos;=&apos;](b, &apos;0&apos;) &amp;&amp; !fn[&apos;=&apos;](a, &apos;0&apos;)) {&#xD;                      return (fn[&apos;&lt;&apos;](a, &apos;0&apos;) ? SchemeNumber(&apos;-inf.0&apos;) : SchemeNumber(&apos;+inf.0&apos;))&#xD;                };&#xD;                if (a !== a || b !== b || fn[&apos;=&apos;](b, &apos;0&apos;)) return SchemeNumber(&apos;+nan.0&apos;);&#xD;                return fn[&apos;/&apos;](a, b);&#xD;            },&#xD;            reportPower: function (a, b) {&#xD;                a = parseNumber(a);&#xD;                b = parseNumber(b);&#xD;                if (a !== a || b !== b) return NaN;&#xD;                return fn[&apos;expt&apos;](a, b);&#xD;            },&#xD;            reportModulus: function (a, b) {&#xD;                a = parseNumber(a);&#xD;                b = parseNumber(b);&#xD;                if (a !== a || b !== b) return NaN;&#xD;                var result = fn.mod(a, b);&#xD;                if (fn[&apos;&lt;&apos;](b, &apos;0&apos;) &amp;&amp; fn[&apos;&gt;&apos;](result, &apos;0&apos;)) {&#xD;                    result = fn[&apos;+&apos;](result, b);&#xD;                }&#xD;                return result;&#xD;            },&#xD;            reportRandom: function (min, max) {&#xD;                var floor = parseNumber(min),&#xD;                    ceil = parseNumber(max);&#xD;                if (floor !== floor || ceil !== ceil) return NaN;&#xD;                if (!fn[&apos;=&apos;](fn.mod(floor, &apos;1&apos;), &apos;0&apos;) || !fn[&apos;=&apos;](fn.mod(ceil, &apos;1&apos;), &apos;0&apos;)) {&#xD;                    // One of the numbers isn&apos;t whole. Include the decimal.&#xD;                    return fn[&apos;+&apos;](&#xD;                        fn[&apos;*&apos;](&#xD;                            Math.random(),&#xD;                            fn[&apos;-&apos;](ceil, floor)&#xD;                        ),&#xD;                        floor&#xD;                    );&#xD;                }&#xD;                return fn.floor(&#xD;                    fn[&apos;+&apos;](&#xD;                        fn[&apos;*&apos;](&#xD;                            Math.random(),&#xD;                            fn[&apos;+&apos;](&#xD;                                fn[&apos;-&apos;](ceil, floor),&#xD;                                &apos;1&apos;&#xD;                            )&#xD;                        ),&#xD;                        floor&#xD;                    )&#xD;                );&#xD;            },&#xD;            reportLessThan: function (a, b) {&#xD;                a = parseNumber(a);&#xD;                b = parseNumber(b);&#xD;                if (a !== a || b !== b) return NaN;&#xD;                return fn[&apos;&lt;&apos;](a, b);&#xD;            },&#xD;            reportGreaterThan: function (a, b) {&#xD;                a = parseNumber(a);&#xD;                b = parseNumber(b);&#xD;                if (a !== a || b !== b) return NaN;&#xD;                return fn[&apos;&gt;&apos;](a, b);&#xD;            },&#xD;            reportGreaterThan: function (a, b) {&#xD;                a = parseNumber(a);&#xD;                b = parseNumber(b);&#xD;                if (a !== a || b !== b) return NaN;&#xD;                return fn[&apos;&gt;&apos;](a, b);&#xD;            },&#xD;            reportEqual: function (a, b) {&#xD;                x = parseNumber(a);&#xD;                y = parseNumber(b);&#xD;                if (x !== x || y !== y) return snapEquals(a, b);&#xD;                return fn[&apos;=&apos;](x, y);&#xD;            },&#xD;            reportIsIdentical: function (a, b) {&#xD;                x = parseNumber(a);&#xD;                y = parseNumber(b);&#xD;                if (x !== x || y !== y) return originalPrims.reportIsIdentical(a, b);&#xD;                return fn[&apos;=&apos;](x, y);&#xD;            },&#xD;            reportMonadic: function (fname, n) {&#xD;                n = parseNumber(n);&#xD;                if (n !== n) return NaN;&#xD;&#xD;                switch (Process.prototype.inputOption(fname)) {&#xD;                case &apos;abs&apos;:&#xD;                    return fn.abs(n);&#xD;                case &apos;ceiling&apos;:&#xD;                    return fn.ceiling(n);&#xD;                case &apos;floor&apos;:&#xD;                    return fn.floor(n);&#xD;                case &apos;sqrt&apos;:&#xD;                    return sqrt(n);&#xD;                case &apos;sin&apos;:&#xD;                    return fn.sin(radians(n));&#xD;                case &apos;cos&apos;:&#xD;                    return fn.cos(radians(n));&#xD;                case &apos;tan&apos;:&#xD;                    return fn.tan(radians(n));&#xD;                case &apos;asin&apos;:&#xD;                    return degrees(fn.asin(n));&#xD;                case &apos;acos&apos;:&#xD;                    return degrees(fn.acos(n));&#xD;                case &apos;atan&apos;:&#xD;                    return degrees(fn.atan(n));&#xD;                case &apos;ln&apos;:&#xD;                    return fn.log(n);&#xD;                case &apos;log&apos;:&#xD;                    return fn.log(n, &apos;10&apos;);&#xD;                case &apos;e^&apos;:&#xD;                    return fn.exp(n);&#xD;                case &apos;10^&apos;:&#xD;                    return fn.expt(&apos;10&apos;, n);&#xD;                default:&#xD;                    return SchemeNumber(&apos;0&apos;);&#xD;                }&#xD;            }&#xD;        });&#xD;    } else {&#xD;        InputSlotMorph.prototype.evaluate = window.bigNumbers.originalEvaluate;&#xD;        VariableFrame.prototype.changeVar = window.bigNumbers.originalChangeVar;&#xD;        Object.assign(Process.prototype, originalPrims);&#xD;    }&#xD;    done = true;&#xD;}&#xD;&#xD;function parseNumber (n) {&#xD;    var fn = SchemeNumber.fn;&#xD;    if (!fn[&apos;number?&apos;](n)) {&#xD;        n = &apos;&apos; + n;&#xD;        try {&#xD;            return parseENotation(n) || SchemeNumber(n);&#xD;        } catch (err) {&#xD;            return NaN;&#xD;        }&#xD;    }&#xD;    return n;&#xD;}&#xD;&#xD;function parseENotation (n) {&#xD;    var fn = SchemeNumber.fn;&#xD;&#xD;    var numbers = n.match(/^(-?\d+\.?\d*|-?\.\d+)e(-?\d+)$/i);&#xD;    if (!numbers) return null;&#xD;&#xD;    var coefficient = numbers[1];&#xD;    var exponent = numbers[2];&#xD;    return fn[&apos;*&apos;](&#xD;        coefficient,&#xD;        fn.expt(&apos;10&apos;, exponent)&#xD;    );&#xD;}&#xD;&#xD;function sqrt (n) {&#xD;    var fn = SchemeNumber.fn;&#xD;&#xD;    if (!fn[&apos;exact?&apos;](n) || !fn[&apos;rational?&apos;](n) || fn[&apos;&lt;&apos;](n,&apos;0&apos;)) return fn.sqrt(n);&#xD;&#xD;    var rootNumerator = fn[&apos;exact-integer-sqrt&apos;](fn.numerator(n));&#xD;    if (!fn[&apos;=&apos;](rootNumerator[1], &apos;0&apos;)) return fn.sqrt(n);&#xD;&#xD;    var rootDenominator = fn[&apos;exact-integer-sqrt&apos;](fn.denominator(n));&#xD;    if (!fn[&apos;=&apos;](rootDenominator[1], &apos;0&apos;)) return fn.sqrt(n);&#xD;&#xD;    return fn[&apos;/&apos;](rootNumerator[0], rootDenominator[0]);&#xD;}&#xD;&#xD;function isDone () {&#xD;    return done;&#xD;}&#xD;&#xD;if (window.bigNumbers) {&#xD;    loadBlocks();&#xD;} else {&#xD;    initialize(loadBlocks);&#xD;}&#xD;&#xD;return isDone;</l></block><list><block var="bool"/></list></block></block><block s="doWaitUntil"><block s="evaluate"><block var="isDone"/><list></list></block></block></script></block-definition><block-definition s="%&apos;n&apos; !" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doReport"><block s="reportIfElse"><block s="reportEquals"><block var="n"/><l>0</l></block><l>1</l><block s="reportProduct"><block var="n"/><custom-block s="%n !"><block s="reportDifference"><block var="n"/><l>1</l></block></custom-block></block></block></block></script></block-definition><block-definition s="%&apos;x&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block var="x"/></block></script></block-definition><block-definition s="Scheme number %&apos;function&apos; of %&apos;number&apos;" type="reporter" category="operators"><comment x="0" y="0" w="300" collapsed="true">Provides Scheme arithmetic functions not in JavaScript</comment><header></header><code></code><translations>pt:_ de _&#xD;</translations><inputs><input type="%s" readonly="true"><options>number?&#xD;complex?&#xD;real?&#xD;rational?&#xD;integer?&#xD;exact?&#xD;inexact?&#xD;exact&#xD;inexact&#xD;finite?&#xD;infinite?&#xD;nan?&#xD;numerator&#xD;denominator&#xD;real-part&#xD;imag-part&#xD;magnitude&#xD;angle</options></input><input type="%s"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>which</l><l>num</l></list><l>function parseNumber (n) {&#xD;    var fn = SchemeNumber.fn;&#xD;    if (!fn[&apos;number?&apos;](n)) {&#xD;        n = &apos;&apos; + n;&#xD;        try {&#xD;            return parseENotation(n) || SchemeNumber(n);&#xD;        } catch (err) {&#xD;            return NaN;&#xD;        }&#xD;    }&#xD;    return n;&#xD;}&#xD;&#xD;function parseENotation (n) {&#xD;    var fn = SchemeNumber.fn;&#xD;&#xD;    var numbers = n.match(/^(-?\d+\.?\d*|-?\.\d+)e(-?\d+)$/i);&#xD;    if (!numbers) return null;&#xD;&#xD;    var coefficient = numbers[1];&#xD;    var exponent = numbers[2];&#xD;    return fn[&apos;*&apos;](&#xD;        coefficient,&#xD;        fn.expt(&apos;10&apos;, exponent)&#xD;    );&#xD;}&#xD;var fn=SchemeNumber.fn,&#xD;      number=parseNumber(num);&#xD;&#xD;switch (which) {&#xD;  case &apos;number?&apos;:&#xD;  case &apos;complex?&apos;:&#xD;    return (fn[&apos;number?&apos;](number));&#xD;  case &apos;real?&apos;:&#xD;    return (fn[&apos;real?&apos;](number) || fn[&apos;real-valued?&apos;](number));&#xD;  case &apos;rational?&apos;:&#xD;    return (fn[&apos;rational?&apos;](number) || (fn[&apos;=&apos;](number, fn.rationalize(number, parseNumber(&apos;1.0e-5&apos;)))));&#xD;  case &apos;integer?&apos;:&#xD;    return (fn[&apos;integer?&apos;](number) || fn[&apos;integer-valued?&apos;](number));&#xD;  case &apos;exact?&apos;:&#xD;  case &apos;inexact?&apos;:&#xD;  case &apos;finite?&apos;:&#xD;  case &apos;infinite?&apos;:&#xD;  case &apos;nan?&apos;:&#xD;  case &apos;real-part&apos;:&#xD;  case &apos;imag-part&apos;:&#xD;    return (fn[which](number));&#xD;  case &apos;magnitude&apos;:&#xD;    return (fn.magnitude(number));&#xD;  case &apos;angle&apos;:&#xD;    return (fn.angle(number));&#xD;  case &apos;numerator&apos;:&#xD;    return (fn.numerator(number));&#xD;  case &apos;denominator&apos;:&#xD;    return (fn.denominator(number));&#xD;  case &apos;exact&apos;:&#xD;    return (fn.exact(number));&#xD;case &apos;inexact&apos;:&#xD;    return (fn.inexact(number));&#xD;}</l></block><list><block var="function"/><block var="number"/></list></block></block></script></block-definition><block-definition s="multiline %&apos;text&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%code"></input></inputs><script><block s="doReport"><block var="text"/></block></script></block-definition><block-definition s="set pen to crayon %&apos;which&apos;" type="command" category="pen"><header></header><code></code><translations></translations><inputs><input type="%n"><options>grays={&#xD;0 black #000000=0&#xD;1 gray7 #121212=1&#xD;2 gray14 #242424=2&#xD;3 gray21 #363636=3&#xD;4 gray28 #484848=4&#xD;5 gray36 #5c5c5c=5&#xD;6 gray43 #6d6d6d=6&#xD;7 gray50 #7f7f7f=7&#xD;8 gray57 #919191=8&#xD;9 gray64 #a3a3a3=9&#xD;10 gray71 #b5b5b5=10&#xD;11 gray78 #c8c8c8=11&#xD;12 gray85 #dadada=12&#xD;13 gray92 #ececec=13&#xD;14 white #ffffff=14&#xD;}&#xD;pinks={&#xD;15 deep pink #ff1493=15&#xD;16 hot pink #ff69b4=16&#xD;17 bright pink #ff007f=17&#xD;18 raspberry #e30b5d=18&#xD;19 amaranth #e52b50=19&#xD;}&#xD;reds={&#xD;20 red #ff0000=20&#xD;21 burgundy #900020=21&#xD;22 cherry #990000=22&#xD;23 dark candy apple red #a40000=23&#xD;24 sanguine #c00000=24&#xD;25 maroon #800000=25&#xD;26 crimson #c90016=26&#xD;27 Lists #d94d11=27&#xD;28 candy apple red #ff0800=28&#xD;29 coquelicot #ff3800=29&#xD;}&#xD;browns={&#xD;30 saddle brown #8b4513=30&#xD;31 chocolate #7b3f00=31&#xD;32 kobicha #6b4423=32&#xD;33 sepia #704214=33&#xD;34 chestnut #954535=34&#xD;35 dark brown #654321=35&#xD;36 brown #964b00=36&#xD;37 golden brown #996515=37&#xD;38 copper #b87333=38&#xD;39 cinnamon #d2691e=39&#xD;}&#xD;oranges={&#xD;40 orange #ff7f00=40&#xD;41 Pantone orange #ff5800=41&#xD;42 pumpkin #ff7518=42&#xD;43 Variables #f3761d=43&#xD;44 Spanish orange #e86100=44&#xD;45 burnt orange #cc5500=45&#xD;46 sinopia #cb410b=46&#xD;47 ochre #cc7722=47&#xD;48 carrot #ed9121=48&#xD;49 tangerine #f28500=49&#xD;}&#xD;yellows={&#xD;50 yellow #ffff00=50&#xD;51 Control #e6a822=51&#xD;52 dark goldenrod #b8860b=52&#xD;53 goldenrod #daa520=53&#xD;54 saffron #f4c430=55&#xD;55 sandstorm #ecd540=55&#xD;56 mustard #ffdb58=56&#xD;57 gold #ffd700=57&#xD;58 egg yolk #fee33e=58&#xD;59 rubber duck #fbe108=59&#xD;}&#xD;greens={&#xD;60 lime #00ff00=60&#xD;61 apple green #8db600=61&#xD;62 Operators #62c213=62&#xD;63 forest green #228b22=63&#xD;64 green #008000=64&#xD;65 dark green #006400=65&#xD;66 dark pastel green #03c03c=66&#xD;67 emerald #50c878=67&#xD;68 mint #3eb489=68&#xD;69 Pen #00a178=69&#xD;}&#xD;cyans={&#xD;70 aqua (cyan) #00ffff=70&#xD;71 dark cyan #008b8b=71&#xD;72 cerulean #007ba7=72&#xD;73 iceberg #71a6d2=73&#xD;74 Sensing #0494dc=74&#xD;75 teal #008080=75&#xD;76 light sky blue #87cefa=76&#xD;77 deep sky blue #00bfff=77&#xD;78 dodger blue #1e90ff=78&#xD;79 azure #007fff=79&#xD;}&#xD;blues={&#xD;80 blue #0000ff=80&#xD;81 midnight blue #191970=81&#xD;82 dark powder blue #003399=82&#xD;83 cobalt #0047ab=83&#xD;84 denim #1560bd=84&#xD;85 navy blue #000080=85&#xD;86 steel blue #4682b4=86&#xD;87 Motion #4a6cd4=87&#xD;88 cornflower #6495ed=88&#xD;89 slate blue #6a5acd=89&#xD;}&#xD;violets={&#xD;90 violet #8f00ff=90&#xD;91 Looks #8f56e3=91&#xD;92 grape #6f2da8=92&#xD;93 indigo #4b0082=93&#xD;94 x11 purple #a020f0=94&#xD;95 magenta (fuchia) #ff00ff=95&#xD;96 dark orchid #9932cc=96&#xD;97 Sound #cf4ad9=97&#xD;98 purple #7f007f=98&#xD;99 dark magenta #8b008b=99&#xD;}</options></input></inputs><script><block s="doDeclareVariables"><list><l>colors</l><l>color</l></list></block><block s="doSetVar"><l>colors</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportTextSplit"><l></l><l>,</l></block></autolambda><list></list></block><block s="reportTextSplit"><custom-block s="multiline %code"><l>0,0,0&#xD;18,18,18&#xD;36,36,36&#xD;54,54,54&#xD;72,72,72&#xD;92,92,92&#xD;109,109,109&#xD;127,127,127&#xD;145,145,145&#xD;163,163,163&#xD;181,181,181&#xD;200,200,200&#xD;218,218,218&#xD;236,236,236&#xD;255,255,255&#xD;255,20,147&#xD;255,105,180&#xD;255,0,127&#xD;227,11,93&#xD;229,43,80&#xD;255,0,0&#xD;144,0,32&#xD;153,0,0&#xD;164,0,0&#xD;192,0,0&#xD;128,0,0&#xD;201,0,22&#xD;217,77,17&#xD;255,8,0&#xD;255,56,0&#xD;139,69,19&#xD;123,63,0&#xD;107,68,35&#xD;112,66,20&#xD;149,69,53&#xD;101,67,33&#xD;150,75,0&#xD;153,101,21&#xD;184,115,51&#xD;210,105,30&#xD;255,127,0&#xD;255,88,0&#xD;255,117,24&#xD;243,118,29&#xD;232,97,0&#xD;204,85,0&#xD;203,65,11&#xD;204,119,34&#xD;237,145,33&#xD;242,133,0&#xD;255,255,0&#xD;230,168,34&#xD;184,134,11&#xD;218,165,32&#xD;244,196,48&#xD;236,213,64&#xD;255,219,88&#xD;255,215,0&#xD;254,227,62&#xD;251,225,8&#xD;0,255,0&#xD;141,182,0&#xD;98,194,19&#xD;34,139,34&#xD;0,128,0&#xD;0,100,0&#xD;3,192,60&#xD;80,200,120&#xD;62,180,137&#xD;0,161,120&#xD;0,255,255&#xD;0,139,139&#xD;0,123,167&#xD;113,166,210&#xD;4,148,220&#xD;0,128,128&#xD;135,206,250&#xD;0,191,255&#xD;30,144,255&#xD;0,127,255&#xD;0,0,255&#xD;25,25,112&#xD;0,51,153&#xD;0,71,171&#xD;21,96,189&#xD;0,0,128&#xD;70,130,180&#xD;74,108,212&#xD;100,149,237&#xD;106,90,205&#xD;143,0,255&#xD;143,86,227&#xD;111,45,168&#xD;75,0,130&#xD;160,32,240&#xD;255,0,255&#xD;153,50,204&#xD;207,74,217&#xD;127,0,127&#xD;139,0,139</l></custom-block><l><option>line</option></l></block></block></block><block s="doSetVar"><l>color</l><block s="reportListItem"><block s="reportSum"><block s="reportModulus"><block var="which"/><l>100</l></block><l>1</l></block><block var="colors"/></block></block><custom-block s="set pen color to r: %n g: %n b: %n"><block s="reportListItem"><l>1</l><block var="color"/></block><block s="reportListItem"><l>2</l><block var="color"/></block><block s="reportListItem"><l>3</l><block var="color"/></block></custom-block></script></block-definition><block-definition s="nearest crayon to %&apos;old color&apos;" type="reporter" category="pen"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>colors</l><l>min value</l><l>min index</l><l>index</l><l>distance</l><l>color</l></list></block><block s="doSetVar"><l>min value</l><l>1000</l></block><block s="doSetVar"><l>min index</l><l>-1</l></block><block s="doSetVar"><l>index</l><l>1</l></block><block s="doSetVar"><l>colors</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportTextSplit"><l></l><l>,</l></block></autolambda><list></list></block><block s="reportTextSplit"><custom-block s="multiline %code"><l>0,0,0&#xD;18,18,18&#xD;36,36,36&#xD;54,54,54&#xD;72,72,72&#xD;92,92,92&#xD;109,109,109&#xD;127,127,127&#xD;145,145,145&#xD;163,163,163&#xD;181,181,181&#xD;200,200,200&#xD;218,218,218&#xD;236,236,236&#xD;255,255,255&#xD;255,20,147&#xD;255,105,180&#xD;255,0,127&#xD;227,11,93&#xD;229,43,80&#xD;255,0,0&#xD;144,0,32&#xD;153,0,0&#xD;164,0,0&#xD;192,0,0&#xD;128,0,0&#xD;201,0,22&#xD;217,77,17&#xD;255,8,0&#xD;255,56,0&#xD;139,69,19&#xD;123,63,0&#xD;107,68,35&#xD;112,66,20&#xD;149,69,53&#xD;101,67,33&#xD;150,75,0&#xD;153,101,21&#xD;184,115,51&#xD;210,105,30&#xD;255,127,0&#xD;255,88,0&#xD;255,117,24&#xD;243,118,29&#xD;232,97,0&#xD;204,85,0&#xD;203,65,11&#xD;204,119,34&#xD;237,145,33&#xD;242,133,0&#xD;255,255,0&#xD;230,168,34&#xD;184,134,11&#xD;218,165,32&#xD;244,196,48&#xD;236,213,64&#xD;255,219,88&#xD;255,215,0&#xD;254,227,62&#xD;251,225,8&#xD;0,255,0&#xD;141,182,0&#xD;98,194,19&#xD;34,139,34&#xD;0,128,0&#xD;0,100,0&#xD;3,192,60&#xD;80,200,120&#xD;62,180,137&#xD;0,161,120&#xD;0,255,255&#xD;0,139,139&#xD;0,123,167&#xD;113,166,210&#xD;4,148,220&#xD;0,128,128&#xD;135,206,250&#xD;0,191,255&#xD;30,144,255&#xD;0,127,255&#xD;0,0,255&#xD;25,25,112&#xD;0,51,153&#xD;0,71,171&#xD;21,96,189&#xD;0,0,128&#xD;70,130,180&#xD;74,108,212&#xD;100,149,237&#xD;106,90,205&#xD;143,0,255&#xD;143,86,227&#xD;111,45,168&#xD;75,0,130&#xD;160,32,240&#xD;255,0,255&#xD;153,50,204&#xD;207,74,217&#xD;127,0,127&#xD;139,0,139</l></custom-block><l><option>line</option></l></block></block></block><block s="doWarp"><script><block s="doRepeat"><l>100</l><script><block s="doSetVar"><l>color</l><block s="reportListItem"><block var="index"/><block var="colors"/></block></block><block s="doIf"><block s="reportEquals"><block var="color"/><block var="old color"/></block><script><block s="doReport"><block s="reportDifference"><block var="index"/><l>1</l></block></block></script></block><block s="doSetVar"><l>distance</l><block s="reportSum"><block s="reportMonadic"><l><option>abs</option></l><block s="reportDifference"><block s="reportListItem"><l>1</l><block var="color"/></block><block s="reportListItem"><l>1</l><block var="old color"/></block></block></block><block s="reportSum"><block s="reportMonadic"><l><option>abs</option></l><block s="reportDifference"><block s="reportListItem"><l>2</l><block var="color"/></block><block s="reportListItem"><l>2</l><block var="old color"/></block></block></block><block s="reportMonadic"><l><option>abs</option></l><block s="reportDifference"><block s="reportListItem"><l>3</l><block var="color"/></block><block s="reportListItem"><l>3</l><block var="old color"/></block></block></block></block></block></block><block s="doIf"><block s="reportLessThan"><block var="distance"/><block var="min value"/></block><script><block s="doSetVar"><l>min value</l><block var="distance"/></block><block s="doSetVar"><l>min index</l><block var="index"/></block></script></block><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doReport"><block s="reportDifference"><block var="min index"/><l>1</l></block></block></script></block></script></block-definition><block-definition s="set pen color to r: %&apos;r&apos; g: %&apos;g&apos; b: %&apos;b&apos;" type="command" category="pen"><header></header><code></code><translations></translations><inputs><input type="%n">255</input><input type="%n">0</input><input type="%n">0</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>r</l><l>g</l><l>b</l></list><l>this.setColor(new Color(r, g, b));</l></block><list><block var="r"/><block var="g"/><block var="b"/></list></block></script></block-definition><block-definition s="RGB color" type="reporter" category="pen"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l></l></list><l>return new List([this.color.r, this.color.g, this.color.b]);</l></block><list></list></block></block></script></block-definition><block-definition s="change crayon by %&apos;diff&apos;" type="command" category="pen"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><custom-block s="set pen to crayon %n"><block s="reportSum"><custom-block s="nearest crayon to %l"><custom-block s="RGB color"></custom-block></custom-block><block var="diff"/></block></custom-block></script></block-definition><block-definition s="speak %&apos;text&apos; with %&apos;lang&apos; accent $nl and pitch %&apos;pitch&apos; rate %&apos;rate&apos;" type="command" category="sound"><header></header><code></code><translations>de:sprich _ mit _ Aussprache _ und Höhe _ Geschwindigkeit _&#xD;pt:fala _ na língua _ _ com tom _ e velocidade _&#xD;</translations><inputs><input type="%s">Hello, World!</input><input type="%txt">en-US<options>العربية=ar&#xD;Български=bg&#xD;বাংলা=bn&#xD;Català=ca&#xD;Català - Valencià=ca-VA&#xD;Česky=cs&#xD;Deutsch=de&#xD;Dansk=dk&#xD;Ελληνικά=el&#xD;English-American=en-US&#xD;English-British=en-GB&#xD;Esperanto=eo&#xD;Español=es&#xD;Eesti=et&#xD;Euskara=eu&#xD;suomi=fi&#xD;Français=fr&#xD;Galego=gl&#xD;Hrvatski=hr&#xD;Magyar=hu&#xD;Interlingua=ia&#xD;Bahasa Indonesia=id&#xD;Italiano=it&#xD;日本語=ja&#xD;にほんご=ja-HIRA&#xD;ಕನ್ನಡ=kn&#xD;한국어=ko&#xD;Malayalam=ml&#xD;Nederlands=nl&#xD;Norsk=no&#xD;Polski=pl&#xD;Português=pt&#xD;Português do Brasil=pt-BR&#xD;Român=ro&#xD;Русский=ru&#xD;Slovenščina=si&#xD;svenska=sv&#xD;Tamil=ta&#xD;Telagu=te&#xD;Türkçe=tr&#xD;Українська=ua&#xD;简体中文=zh-CN&#xD;繁體中文=zh-TW</options></input><input type="%n">1</input><input type="%n">1</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>msg</l><l>accent</l><l>pitch</l><l>rate</l></list><l>var utter = new SpeechSynthesisUtterance(msg);&#xD;utter.lang = accent;&#xD;utter.pitch = pitch;&#xD;utter.rate = rate;&#xD;window.speechSynthesis.speak(utter);</l></block><list><block var="text"/><block var="lang"/><block var="pitch"/><block var="rate"/></list></block></script></block-definition><block-definition s="speak %&apos;text&apos; with %&apos;lang&apos; accent $nl and pitch %&apos;pitch&apos; rate %&apos;rate&apos; and wait" type="command" category="sound"><header></header><code></code><translations>de:sprich _ mit _ Aussprache _ und Höhe _ Geschwindigkeit _ und warte&#xD;pt:fala _ na língua _ _ com tom _ e velocidade _ , e espera&#xD;</translations><inputs><input type="%s">Hello, World!</input><input type="%txt">en-US<options>العربية=ar&#xD;Български=bg&#xD;বাংলা=bn&#xD;Català=ca&#xD;Català - Valencià=ca-VA&#xD;Česky=cs&#xD;Deutsch=de&#xD;Dansk=dk&#xD;Ελληνικά=el&#xD;English-American=en-US&#xD;English-British=en-GB&#xD;Esperanto=eo&#xD;Español=es&#xD;Eesti=et&#xD;Euskara=eu&#xD;suomi=fi&#xD;Français=fr&#xD;Galego=gl&#xD;Hrvatski=hr&#xD;Magyar=hu&#xD;Interlingua=ia&#xD;Bahasa Indonesia=id&#xD;Italiano=it&#xD;日本語=ja&#xD;にほんご=ja-HIRA&#xD;ಕನ್ನಡ=kn&#xD;한국어=ko&#xD;Malayalam=ml&#xD;Nederlands=nl&#xD;Norsk=no&#xD;Polski=pl&#xD;Português=pt&#xD;Português do Brasil=pt-BR&#xD;Român=ro&#xD;Русский=ru&#xD;Slovenščina=si&#xD;svenska=sv&#xD;Tamil=ta&#xD;Telagu=te&#xD;Türkçe=tr&#xD;Українська=ua&#xD;简体中文=zh-CN&#xD;繁體中文=zh-TW</options></input><input type="%n">1</input><input type="%n">1</input></inputs><script><block s="doDeclareVariables"><list><l>test</l></list></block><block s="doSetVar"><l>test</l><block s="evaluate"><block s="reportJSFunction"><list><l>msg</l><l>accent</l><l>pitch</l><l>rate</l></list><l>var utter = new SpeechSynthesisUtterance(msg),&#xD;    isDone = false;&#xD;utter.lang = accent;&#xD;utter.pitch = pitch;&#xD;utter.rate = rate;&#xD;utter.onend = function () {isDone = true; };&#xD;window.speechSynthesis.speak(utter);&#xD;return function () {return isDone; };</l></block><list><block var="text"/><block var="lang"/><block var="pitch"/><block var="rate"/></list></block></block><block s="doWaitUntil"><block s="evaluate"><block var="test"/><list></list></block></block></script></block-definition><block-definition s="id %&apos;arg&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doReport"><block var="arg"/></block></script></block-definition><block-definition s="-- %&apos;n&apos;" type="reporter" category="variables"><header></header><code></code><translations></translations><inputs><input type="%anyUE" readonly="true"></input></inputs><script><block s="doRun"><block s="reifyScript"><script><block s="doChangeVar"><l></l><l>-1</l></block></script><list></list></block><list><block var="n"/></list></block><block s="doReport"><block s="evaluate"><block var="n"/><list></list></block></block></script></block-definition><block-definition s="animate setter %&apos;setter&apos; getter %&apos;getter&apos; delta %&apos;delta&apos; over %&apos;duration&apos; secs easing %&apos;easing&apos;" type="command" category="control"><header></header><code></code><translations>de:animiere Setter _ Getter _ Delta _ über _ Sek. beschleunigt _&#xD;ca:modifica setter _ i getter _ amb delta _ en _ segons de forma _&#xD;pt:anima com modificador _ e inspector _ de _ em _ s de forma _&#xD;</translations><inputs><input type="%cmdRing"></input><input type="%repRing"></input><input type="%n">50</input><input type="%n">1</input><input type="%repRing"></input></inputs><script><block s="doDeclareVariables"><list><l>end time</l><l>destination</l></list></block><block s="doSetVar"><l>end time</l><block s="reportSum"><block s="reportDate"><l><option>time in milliseconds</option></l></block><block s="reportProduct"><block var="duration"/><l>1000</l></block></block></block><block s="doSetVar"><l>destination</l><block s="reportSum"><block s="evaluate"><block var="getter"/><list></list></block><block var="delta"/></block></block><block s="doUntil"><block s="reportGreaterThan"><block s="reportDate"><l><option>time in milliseconds</option></l></block><block var="end time"/></block><script><block s="doRun"><block var="setter"/><list><block s="reportDifference"><block var="destination"/><block s="reportProduct"><block var="delta"/><block s="evaluate"><block var="easing"/><list><block s="reportQuotient"><block s="reportDifference"><block var="end time"/><block s="reportDate"><l><option>time in milliseconds</option></l></block></block><block s="reportProduct"><block var="duration"/><l>1000</l></block></block></list></block></block></block></list></block></script></block><block s="doRun"><block var="setter"/><list><block var="destination"/></list></block></script></block-definition><block-definition s="error %&apos;msg&apos;" type="command" category="control"><header></header><code></code><translations>de:Fehler _&#xD;pt:assinala o erro _&#xD;</translations><inputs><input type="%s"></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>msg</l></list><l>throw new Error(msg)</l></block><list><block var="msg"/></list></block></script></block-definition><block-definition s="glide %&apos;steps&apos; in %&apos;duration&apos; secs easing %&apos;easing&apos;" type="command" category="motion"><header></header><code></code><translations>de:gleite _ in _ Sek. beschleunigt: _&#xD;ca:llisca _ en _ segons de forma _&#xD;fr:glisser _ en _ sec. accélérer _&#xD;pt:desliza _ em _ s de forma _&#xD;</translations><inputs><input type="%n">50</input><input type="%n">1</input><input type="%s" readonly="true">linear<options>linear&#xD;quadratic={&#xD;quadratic-in&#xD;quadratic-out&#xD;quadratic-in-out&#xD;}&#xD;cubic={&#xD;cubic-in&#xD;cubic-out&#xD;cubic-in-out&#xD;}&#xD;quart={&#xD;quart-in&#xD;quart-out&#xD;quart-in-out&#xD;}&#xD;sinusoidal={&#xD;sine-in&#xD;sine-out&#xD;sine-in-out&#xD;}&#xD;elastic</options></input></inputs><script><block s="doDeclareVariables"><list><l>destX</l><l>destY</l><l>end time</l><l>deltaX</l><l>deltaY</l><l>func</l></list></block><block s="forward"><block var="steps"/></block><block s="doSetVar"><l>destX</l><block s="xPosition"></block></block><block s="doSetVar"><l>destY</l><block s="yPosition"></block></block><block s="forward"><block s="reportProduct"><block var="steps"/><l>-1</l></block></block><block s="doSetVar"><l>end time</l><block s="reportSum"><block s="reportDate"><l><option>time in milliseconds</option></l></block><block s="reportProduct"><block var="duration"/><l>1000</l></block></block></block><block s="doSetVar"><l>deltaX</l><block s="reportDifference"><block var="destX"/><block s="xPosition"></block></block></block><block s="doSetVar"><l>deltaY</l><block s="reportDifference"><block var="destY"/><block s="yPosition"></block></block></block><block s="doIfElse"><block s="reportIsA"><block var="easing"/><l><option>reporter</option></l></block><script><block s="doSetVar"><l>func</l><block var="easing"/></block></script><script><block s="doSetVar"><l>func</l><custom-block s="easing %txt"><block var="easing"/></custom-block></block></script></block><block s="doUntil"><block s="reportGreaterThan"><block s="reportDate"><l><option>time in milliseconds</option></l></block><block var="end time"/></block><script><block s="setXPosition"><block s="reportDifference"><block var="destX"/><block s="reportProduct"><block var="deltaX"/><block s="evaluate"><block var="func"/><list><block s="reportQuotient"><block s="reportDifference"><block var="end time"/><block s="reportDate"><l><option>time in milliseconds</option></l></block></block><block s="reportProduct"><block var="duration"/><l>1000</l></block></block></list></block></block></block></block><block s="setYPosition"><block s="reportDifference"><block var="destY"/><block s="reportProduct"><block var="deltaY"/><block s="evaluate"><block var="func"/><list><block s="reportQuotient"><block s="reportDifference"><block var="end time"/><block s="reportDate"><l><option>time in milliseconds</option></l></block></block><block s="reportProduct"><block var="duration"/><l>1000</l></block></block></list></block></block></block></block></script></block><block s="gotoXY"><block var="destX"/><block var="destY"/></block></script></block-definition><block-definition s="animate %&apos;attribute&apos; by %&apos;delta&apos; in %&apos;duration&apos; secs easing %&apos;easing&apos;" type="command" category="motion"><header></header><code></code><translations>de:animiere _ um _ in _ Sek. beschleunigt: _&#xD;ca:modifica _ amb _ en _ segons de forma _&#xD;pt:anima _ de _ em _ s de forma _&#xD;</translations><inputs><input type="%s" readonly="true">x position<options>x position&#xD;y position&#xD;direction&#xD;size&#xD;ghost effect&#xD;color effect&#xD;saturation effect&#xD;brightness effect&#xD;fisheye effect&#xD;whirl effect&#xD;pixelate effect&#xD;mosaic effect&#xD;negative effect&#xD;tempo&#xD;volume&#xD;balance</options></input><input type="%n">50</input><input type="%n">1</input><input type="%s" readonly="true">linear<options>linear&#xD;quadratic={&#xD;quadratic-in&#xD;quadratic-out&#xD;quadratic-in-out&#xD;}&#xD;cubic={&#xD;cubic-in&#xD;cubic-out&#xD;cubic-in-out&#xD;}&#xD;quart={&#xD;quart-in&#xD;quart-out&#xD;quart-in-out&#xD;}&#xD;sinusoidal={&#xD;sine-in&#xD;sine-out&#xD;sine-in-out&#xD;}&#xD;elastic</options></input></inputs><script><block s="doDeclareVariables"><list><l>accessors</l><l>func</l></list></block><block s="doSetVar"><l>accessors</l><block s="reportIfElse"><block s="reportEquals"><block var="attribute"/><l>x position</l></block><block s="reportNewList"><list><block s="reifyScript"><script><block s="setXPosition"><l></l></block></script><list></list></block><block s="reifyReporter"><autolambda><block s="xPosition"></block></autolambda><list></list></block></list></block><block s="reportIfElse"><block s="reportEquals"><block var="attribute"/><l>y position</l></block><block s="reportNewList"><list><block s="reifyScript"><script><block s="setYPosition"><l></l></block></script><list></list></block><block s="reifyReporter"><autolambda><block s="yPosition"></block></autolambda><list></list></block></list></block><block s="reportIfElse"><block s="reportEquals"><block var="attribute"/><l>direction</l></block><block s="reportNewList"><list><block s="reifyScript"><script><block s="setHeading"><l></l></block></script><list></list></block><block s="reifyReporter"><autolambda><block s="direction"></block></autolambda><list></list></block></list></block><block s="reportIfElse"><block s="reportEquals"><block var="attribute"/><l>size</l></block><block s="reportNewList"><list><block s="reifyScript"><script><block s="setScale"><l></l></block></script><list></list></block><block s="reifyReporter"><autolambda><block s="getScale"></block></autolambda><list></list></block></list></block><block s="reportIfElse"><block s="reportEquals"><block var="attribute"/><l>tempo</l></block><block s="reportNewList"><list><block s="reifyScript"><script><block s="doSetTempo"><l></l></block></script><list></list></block><block s="reifyReporter"><autolambda><block s="getTempo"></block></autolambda><list></list></block></list></block><block s="reportIfElse"><block s="reportEquals"><block var="attribute"/><l>volume</l></block><block s="reportNewList"><list><block s="reifyScript"><script><block s="setVolume"><l></l></block></script><list></list></block><block s="reifyReporter"><autolambda><block s="getVolume"></block></autolambda><list></list></block></list></block><block s="reportIfElse"><block s="reportEquals"><block var="attribute"/><l>balance</l></block><block s="reportNewList"><list><block s="reifyScript"><script><block s="setPan"><l></l></block></script><list></list></block><block s="reifyReporter"><autolambda><block s="getPan"></block></autolambda><list></list></block></list></block><block s="reportNewList"><list><block s="reifyScript"><script><block s="setEffect"><block s="reportListItem"><l>1</l><block s="reportTextSplit"><block var="attribute"/><l> </l></block></block><l></l></block></script><list></list></block><block s="reifyReporter"><autolambda><block s="getEffect"><block s="reportListItem"><l>1</l><block s="reportTextSplit"><block var="attribute"/><l> </l></block></block></block></autolambda><list></list></block></list></block></block></block></block></block></block></block></block></block><block s="doIfElse"><block s="reportIsA"><block var="easing"/><l><option>reporter</option></l></block><script><block s="doSetVar"><l>func</l><block var="easing"/></block></script><script><block s="doSetVar"><l>func</l><custom-block s="easing %txt"><block var="easing"/></custom-block></block></script></block><custom-block s="animate setter %cmdRing getter %repRing delta %n over %n secs easing %repRing"><block s="reportListItem"><l>1</l><block var="accessors"/></block><block s="reportListItem"><l>2</l><block var="accessors"/></block><block var="delta"/><block var="duration"/><block var="func"/></custom-block></script></block-definition><block-definition s="easing %&apos;choice&apos;" type="reporter" category="operators"><header></header><code></code><translations>de:Beschleunigung _&#xD;ca:de forma _&#xD;pt:a forma _&#xD;</translations><inputs><input type="%txt" readonly="true">linear<options>linear&#xD;quadratic={&#xD;quadratic-in&#xD;quadratic-out&#xD;quadratic-in-out&#xD;}&#xD;cubic={&#xD;cubic-in&#xD;cubic-out&#xD;cubic-in-out&#xD;}&#xD;quart={&#xD;quart-in&#xD;quart-out&#xD;quart-in-out&#xD;}&#xD;sinusoidal={&#xD;sine-in&#xD;sine-out&#xD;sine-in-out&#xD;}&#xD;elastic</options></input></inputs><script><block s="doIf"><block s="reportEquals"><block var="choice"/><l>linear</l></block><script><block s="doReport"><block s="reifyReporter"><autolambda><custom-block s="id %n"><l></l></custom-block></autolambda><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="choice"/><l>quadratic-in</l></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportProduct"><l></l><l></l></block></autolambda><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="choice"/><l>quadratic-out</l></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportProduct"><l></l><block s="reportDifference"><l>2</l><l></l></block></block></autolambda><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="choice"/><l>quadratic-in-out</l></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportIfElse"><block s="reportLessThan"><l></l><l>.5</l></block><block s="reportProduct"><l>2</l><block s="reportProduct"><l></l><l></l></block></block><block s="reportDifference"><block s="reportProduct"><block s="reportDifference"><l>4</l><block s="reportProduct"><l>2</l><l></l></block></block><l></l></block><l>1</l></block></block></autolambda><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="choice"/><l>cubic-in</l></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportProduct"><l></l><block s="reportProduct"><l></l><l></l></block></block></autolambda><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="choice"/><l>cubic-out</l></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportSum"><block s="reportProduct"><block s="reportProduct"><custom-block s="-- %anyUE"><block var="t"/></custom-block><block var="t"/></block><block var="t"/></block><l>1</l></block></autolambda><list><l>t</l></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="choice"/><l>cubic-in-out</l></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportIfElse"><block s="reportLessThan"><l></l><l>.5</l></block><block s="reportProduct"><l>4</l><block s="reportProduct"><l></l><block s="reportProduct"><l></l><l></l></block></block></block><block s="reportSum"><block s="reportProduct"><block s="reportProduct"><block s="reportDifference"><l></l><l>1</l></block><block s="reportDifference"><block s="reportProduct"><l>2</l><l></l></block><l>2</l></block></block><block s="reportDifference"><block s="reportProduct"><l>2</l><l></l></block><l>2</l></block></block><l>1</l></block></block></autolambda><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="choice"/><l>quart-in</l></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportProduct"><l></l><block s="reportProduct"><l></l><block s="reportProduct"><l></l><l></l></block></block></block></autolambda><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="choice"/><l>quart-out</l></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportDifference"><l>1</l><block s="reportProduct"><custom-block s="-- %anyUE"><block var="t"/></custom-block><block s="reportProduct"><block var="t"/><block s="reportProduct"><block var="t"/><block var="t"/></block></block></block></block></autolambda><list><l>t</l></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="choice"/><l>quart-in-out</l></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportIfElse"><block s="reportLessThan"><l></l><l>.5</l></block><block s="reportProduct"><l>8</l><block s="reportProduct"><l></l><block s="reportProduct"><l></l><block s="reportProduct"><l></l><l></l></block></block></block></block><block s="evaluate"><block s="reifyReporter"><autolambda><block s="reportDifference"><l>1</l><block s="reportProduct"><l>8</l><block s="reportProduct"><custom-block s="-- %anyUE"><block var="t"/></custom-block><block s="reportProduct"><block var="t"/><block s="reportProduct"><block var="t"/><block var="t"/></block></block></block></block></block></autolambda><list><l>t</l></list></block><list><l></l></list></block></block></autolambda><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="choice"/><l>sine-in</l></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportDifference"><l>1</l><block s="reportMonadic"><l><option>sin</option></l><block s="reportSum"><l>90</l><block s="reportProduct"><l></l><l>90</l></block></block></block></block></autolambda><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="choice"/><l>sine-out</l></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportMonadic"><l><option>sin</option></l><block s="reportProduct"><l></l><l>90</l></block></block></autolambda><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="choice"/><l>sine-in-out</l></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportDifference"><l>1</l><block s="reportMonadic"><l><option>cos</option></l><block s="reportProduct"><l></l><l>90</l></block></block></block></autolambda><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="choice"/><l>elastic</l></block><script><block s="doReport"><block s="reifyScript"><script><block s="doDeclareVariables"><list><l>p</l></list></block><block s="doSetVar"><l>p</l><l>0.3</l></block><block s="doReport"><block s="reportSum"><block s="reportProduct"><block s="reportPower"><l>2</l><block s="reportProduct"><l>-10</l><l></l></block></block><block s="reportMonadic"><l><option>sin</option></l><custom-block s="degrees %n"><block s="reportProduct"><block s="reportDifference"><l></l><block s="reportQuotient"><block var="p"/><l>4</l></block></block><block s="reportQuotient"><block s="reportProduct"><l>2</l><custom-block s="PI"></custom-block></block><block var="p"/></block></block></custom-block></block></block><l>1</l></block></block></script><list></list></block></block></script></block><custom-block s="error %s"><block s="reportJoinWords"><list><l>unknown easing function "</l><block var="choice"/><l>"</l></list></block></custom-block></script></block-definition><block-definition s="for %&apos;i&apos; = %&apos;start&apos; to %&apos;end&apos; $nl in %&apos;time&apos; secs easing %&apos;easing&apos; %&apos;action&apos;" type="command" category="control"><header></header><code></code><translations>de:für _ = _ bis _ _ in _ Sek. beschleunigt: _ _&#xD;ca:per _ = _ fins _ _ en _ segons de forma _ _&#xD;pt:para _ de _ a _ _ em _ s de forma _ _&#xD;</translations><inputs><input type="%upvar"></input><input type="%n">0</input><input type="%n">100</input><input type="%n">1</input><input type="%txt" readonly="true">linear<options>linear&#xD;quadratic={&#xD;quadratic-in&#xD;quadratic-out&#xD;quadratic-in-out&#xD;}&#xD;cubic={&#xD;cubic-in&#xD;cubic-out&#xD;cubic-in-out&#xD;}&#xD;quart={&#xD;quart-in&#xD;quart-out&#xD;quart-in-out&#xD;}&#xD;sinusoidal={&#xD;sine-in&#xD;sine-out&#xD;sine-in-out&#xD;}&#xD;elastic</options></input><input type="%ca"></input></inputs><script><block s="doSetVar"><l>i</l><block var="start"/></block><custom-block s="animate setter %cmdRing getter %repRing delta %n over %n secs easing %repRing"><block s="reifyScript"><script><block s="doSetVar"><l>i</l><l></l></block><block s="doRun"><block var="action"/><list></list></block></script><list></list></block><block s="reifyReporter"><autolambda><block var="i"/></autolambda><list></list></block><block s="reportDifference"><block var="end"/><block var="start"/></block><block var="time"/><block s="reportIfElse"><block s="reportIsA"><block var="easing"/><l><option>reporter</option></l></block><block var="easing"/><custom-block s="easing %txt"><block var="easing"/></custom-block></block></custom-block></script></block-definition><block-definition s="show picture %&apos;bitmap&apos;" type="command" category="looks"><comment x="0" y="0" w="88" collapsed="false">display the given bitmap in a copy of the current costume (so you can switch back to the original costume again)</comment><header></header><code></code><translations>pt:mostra a imagem _&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doSwitchToCostume"><block s="reportNewCostumeStretched"><block var="bitmap"/><block s="reportGetImageAttribute"><l><option>width</option></l><l><option>current</option></l></block><block s="reportGetImageAttribute"><l><option>height</option></l><l><option>current</option></l></block></block></block></script></block-definition><block-definition s="$camera snap" type="reporter" category="sensing"><comment x="0" y="0" w="216" collapsed="false">takes a snapshot with the webcam and reports it as a new costume, or zero if the user cancels</comment><header></header><code></code><translations>pt:$camera a imagem actual do vídeo&#xD;</translations><inputs></inputs><script><block s="doDeclareVariables"><list><l>test</l><l>pic</l></list></block><block s="doSetVar"><l>test</l><block s="evaluate"><block s="reportJSFunction"><list></list><l>var camDialog,&#xD;    result = false;&#xD;&#xD;camDialog = new CamSnapshotDialogMorph(&#xD;    this.parentThatIsA(IDE_Morph),&#xD;    this,&#xD;    function () {result = null; },&#xD;    function (costume) {&#xD;        result = costume;&#xD;        this.close();&#xD;    }&#xD;);&#xD;&#xD;camDialog.key = &apos;camera&apos;;&#xD;camDialog.popUp(this.world());&#xD;return function () {return result; };</l></block><list></list></block></block><block s="doWaitUntil"><block s="evaluate"><block s="reifyScript"><script><block s="doSetVar"><l>pic</l><block s="evaluate"><block var="test"/><list></list></block></block><block s="doReport"><block s="reportNot"><block s="reportEquals"><block var="pic"/><block s="reportBoolean"><l><bool>false</bool></l></block></block></block></block></script><list></list></block><list></list></block></block><block s="doReport"><block var="pic"/></block></script></block-definition><block-definition s="turbo %&apos;action&apos;" type="command" category="other"><header></header><code></code><translations>pt:executa no modo turbo _&#xD;</translations><inputs><input type="%cs"></input></inputs><script><block s="doDeclareVariables"><list><l>begin</l></list></block><block s="doSetVar"><l>begin</l><block s="reportGlobalFlag"><l><option>turbo mode</option></l></block></block><block s="doSetGlobalFlag"><l><option>turbo mode</option></l><l><bool>true</bool></l></block><block s="doRun"><block var="action"/><list></list></block><block s="doSetGlobalFlag"><l><option>turbo mode</option></l><block var="begin"/></block></script></block-definition><block-definition s="%&apos;frequency&apos; Hz for %&apos;duration&apos; secs at %&apos;sample rate&apos; Hz sample rate" type="reporter" category="sound"><comment x="0" y="0" w="205" collapsed="false">generate a list of samples representing a sine wave at the given frequency, duration and sample rate</comment><header></header><code></code><translations>pt:as amostras de som com _ Hz de _ s amostrado a _ Hz&#xD;</translations><inputs><input type="%n">440<options>a 55=55&#xD;a 110=110&#xD;a 220=220&#xD;a 440=440&#xD;a 880=880&#xD;a 1760=1760&#xD;a 3520=3520</options></input><input type="%n">1</input><input type="%n">44100<options>22.05 kHz=22050&#xD;44.1 kHz=44100&#xD;88.2 kHz=88200&#xD;96 kHz=96000</options></input></inputs><script><block s="doDeclareVariables"><list><l>output</l><l>sample period</l><l>duration in samples</l><l>time</l></list></block><block s="doSetVar"><l>sample period</l><block s="reportQuotient"><l>1</l><block var="sample rate"/></block></block><block s="doSetVar"><l>duration in samples</l><block s="reportMonadic"><l><option>ceiling</option></l><block s="reportProduct"><block var="duration"/><block var="sample rate"/></block></block></block><block s="doSetVar"><l>time</l><l>0</l></block><block s="doSetVar"><l>output</l><block s="reportNewList"><list></list></block></block><block s="doWarp"><script><block s="doRepeat"><block var="duration in samples"/><script><block s="doAddToList"><block s="reportMonadic"><l><option>sin</option></l><custom-block s="degrees %n"><block s="reportProduct"><l>2</l><block s="reportProduct"><custom-block s="PI"></custom-block><block s="reportProduct"><block var="frequency"/><block var="time"/></block></block></block></custom-block></block><block var="output"/></block><block s="doChangeVar"><l>time</l><block var="sample period"/></block></script></block></script></block><block s="doReport"><block var="output"/></block></script></block-definition><block-definition s="PI" type="reporter" category="operators"><header></header><code></code><translations>pt:π&#xD;</translations><inputs></inputs><script><block s="doReport"><l>3.141592653589793</l></block></script></block-definition><block-definition s="degrees %&apos;radians&apos;" type="reporter" category="operators"><header></header><code></code><translations>pt:_ radianos em graus&#xD;</translations><inputs><input type="%n">0.5</input></inputs><script><block s="doReport"><block s="reportQuotient"><block s="reportProduct"><block var="radians"/><l>180</l></block><custom-block s="PI"></custom-block></block></block></script></block-definition><block-definition s="sound named %&apos;name&apos;" type="reporter" category="sensing"><header></header><code></code><translations>pt:o som _&#xD;</translations><inputs><input type="%s"><options>§_soundsMenu</options></input></inputs><script><block s="doReport"><block s="reportFindFirst"><block s="reifyPredicate"><autolambda><block s="reportEquals"><block s="reportGetSoundAttribute"><l><option>name</option></l><l></l></block><block var="name"/></block></autolambda><list></list></block><block s="reportGet"><l><option>sounds</option></l></block></block></block></script></block-definition><block-definition s="plot sound %&apos;name&apos;" type="command" category="pen"><comment x="0" y="0" w="164" collapsed="false">quickly plot the samples of a sound, a list of samples (single channel), or a list of lists (multiple channels) to the stage at a lower resolution.</comment><header></header><code></code><translations>pt:desenha o gráfico do som _&#xD;</translations><inputs><input type="%s" readonly="true"><options>§_soundsMenu</options></input></inputs><script><block s="doDeclareVariables"><list><l>samples</l><l>step</l><l>offset</l><l>i</l><l>sound</l></list></block><block s="doSetVar"><l>sound</l><block s="reportIfElse"><block s="reportOr"><block s="reportIsA"><block var="name"/><l><option>list</option></l></block><block s="reportIsA"><block var="name"/><l><option>sound</option></l></block></block><block var="name"/><custom-block s="sound named %s"><block var="name"/></custom-block></block></block><block s="doIfElse"><block s="reportIsA"><block var="sound"/><l><option>sound</option></l></block><script><block s="doSetVar"><l>samples</l><block s="reportGetSoundAttribute"><l><option>samples</option></l><block var="sound"/></block></block><block s="doSetVar"><l>step</l><block s="reportQuotient"><block s="reportGetSoundAttribute"><l><option>length</option></l><block var="sound"/></block><block s="reportProduct"><block s="reportAttributeOf"><l><option>width</option></l><block s="reportGet"><l><option>stage</option></l></block></block><l>2</l></block></block></block></script><script><block s="doSetVar"><l>samples</l><block var="sound"/></block></script></block><block s="clear"></block><block s="up"></block><block s="doIfElse"><block s="reportIsA"><block s="reportListItem"><l>1</l><block var="samples"/></block><l><option>list</option></l></block><script><block s="doSetVar"><l>step</l><block s="reportQuotient"><block s="reportListLength"><block s="reportListItem"><l>1</l><block var="samples"/></block></block><block s="reportProduct"><block s="reportAttributeOf"><l><option>width</option></l><block s="reportGet"><l><option>stage</option></l></block></block><l>2</l></block></block></block><block s="doSetVar"><l>offset</l><block s="reportQuotient"><block s="reportAttributeOf"><l><option>height</option></l><l>Stage</l></block><l>4</l></block></block><block s="doForEach"><l>channel</l><block var="samples"/><script><block s="doSetVar"><l>i</l><l>0</l></block><block s="gotoXY"><block s="reportQuotient"><block s="reportAttributeOf"><l><option>width</option></l><l>Stage</l></block><l>-2</l></block><block var="offset"/></block><block s="down"></block><block s="setSize"><l>1</l></block><custom-block s="turbo %cs"><script><block s="doRepeat"><block s="reportProduct"><block s="reportAttributeOf"><l><option>width</option></l><block s="reportGet"><l><option>stage</option></l></block></block><l>2</l></block><script><block s="doChangeVar"><l>i</l><block var="step"/></block><block s="gotoXY"><block s="reportSum"><block s="xPosition"></block><l>0.5</l></block><block s="reportSum"><block s="reportProduct"><block s="reportListItem"><block s="reportMonadic"><l><option>floor</option></l><block var="i"/></block><block var="channel"/></block><block s="reportQuotient"><block s="reportAttributeOf"><l><option>height</option></l><block s="reportGet"><l><option>stage</option></l></block></block><l>6.4</l></block></block><block var="offset"/></block></block></script></block></script></custom-block><block s="up"></block><block s="doChangeVar"><l>offset</l><block s="reportQuotient"><block s="reportAttributeOf"><l><option>width</option></l><l>Stage</l></block><l>-2</l></block></block></script></block></script><script><block s="doSetVar"><l>step</l><block s="reportQuotient"><block s="reportListLength"><block var="samples"/></block><block s="reportProduct"><block s="reportAttributeOf"><l><option>width</option></l><block s="reportGet"><l><option>stage</option></l></block></block><l>2</l></block></block></block><block s="gotoXY"><block s="reportQuotient"><block s="reportAttributeOf"><l><option>width</option></l><l>Stage</l></block><l>-2</l></block><l>0</l></block><block s="down"></block><block s="setSize"><l>1</l></block><custom-block s="turbo %cs"><script><block s="doRepeat"><block s="reportProduct"><block s="reportAttributeOf"><l><option>width</option></l><l>Stage</l></block><l>2</l></block><script><block s="doChangeVar"><l>i</l><block var="step"/></block><block s="gotoXY"><block s="reportSum"><block s="xPosition"></block><l>0.5</l></block><block s="reportProduct"><block s="reportListItem"><block s="reportMonadic"><l><option>floor</option></l><block var="i"/></block><block var="samples"/></block><block s="reportQuotient"><block s="reportAttributeOf"><l><option>height</option></l><block s="reportGet"><l><option>stage</option></l></block></block><l>3.2</l></block></block></block></script></block></script></custom-block><block s="up"></block></script></block></script></block-definition><block-definition s="$circleSolid-1-255-0-0 record" type="reporter" category="sensing"><comment x="0" y="0" w="192" collapsed="false">records an audio snippet and reports it as a new sound, or zero if the user cancels</comment><header></header><code></code><translations>pt:$circleSolid-1-255-0-0 uma nova gravação&#xD;</translations><inputs></inputs><script><block s="doDeclareVariables"><list><l>test</l><l>pic</l></list></block><block s="doSetVar"><l>test</l><block s="evaluate"><block s="reportJSFunction"><list></list><l>var soundRecorder,&#xD;    result = false;&#xD;&#xD;soundRecorder = new SoundRecorderDialogMorph(&#xD;    function (audio) {&#xD;        if (audio) {&#xD;            result = new Sound(audio, &apos;recording&apos;);&#xD;        } else {&#xD;            result = null;&#xD;            this.destroy();&#xD;        }&#xD;    }&#xD;);&#xD;&#xD;soundRecorder.cancel = function () {&#xD;    result = null;&#xD;    this.destroy();&#xD;};&#xD;&#xD;soundRecorder.key = &apos;microphone&apos;;&#xD;soundRecorder.popUp(this.world());&#xD;return function () {return result; };</l></block><list></list></block></block><block s="doWaitUntil"><block s="evaluate"><block s="reifyScript"><script><block s="doSetVar"><l>pic</l><block s="evaluate"><block var="test"/><list></list></block></block><block s="doReport"><block s="reportNot"><block s="reportEquals"><block var="pic"/><block s="reportBoolean"><l><bool>false</bool></l></block></block></block></block></script><list></list></block><list></list></block></block><block s="doReport"><block var="pic"/></block></script></block-definition><block-definition s="note from %&apos;pitch&apos; hz" type="reporter" category="sound"><header></header><code></code><translations>pt:a nota com _ Hz&#xD;</translations><inputs><input type="%n">440</input></inputs><script><block s="doReport"><block s="reportRound"><block s="reportSum"><block s="reportProduct"><l>12</l><block s="reportQuotient"><block s="reportMonadic"><l><option>log</option></l><block s="reportQuotient"><block var="pitch"/><l>440</l></block></block><block s="reportMonadic"><l><option>log</option></l><l>2</l></block></block></block><l>69</l></block></block></block></script></block-definition><block-definition s="hz from note %&apos;note&apos;" type="reporter" category="sound"><header></header><code></code><translations>pt:a frequência da nota _&#xD;</translations><inputs><input type="%n">69</input></inputs><script><block s="doReport"><block s="reportProduct"><l>440</l><block s="reportPower"><l>2</l><block s="reportQuotient"><block s="reportDifference"><block var="note"/><l>69</l></block><l>12</l></block></block></block></block></script></block-definition><block-definition s="name of note %&apos;note&apos;" type="reporter" category="sound"><header></header><code></code><translations>pt:o nome da nota _&#xD;</translations><inputs><input type="%n">69</input></inputs><script><block s="doReport"><block s="reportListItem"><block s="reportSum"><block s="reportModulus"><block s="reportDifference"><block var="note"/><l>69</l></block><l>12</l></block><l>1</l></block><block s="reportNewList"><list><l>A</l><l>Bb</l><l>B</l><l>C</l><l>C#</l><l>D</l><l>D#</l><l>E</l><l>F</l><l>F#</l><l>G</l><l>G#</l></list></block></block></block></script></block-definition><block-definition s="redirect to %&apos;url&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>url</l></list><l>window.location.href = url;</l></block><list><block var="url"/></list></block></script></block-definition><block-definition s="$flash sort %&apos;data&apos; ordering with %&apos;fn&apos;" type="reporter" category="lists"><header></header><code></code><translations>de:$flash sortiere _ nach _&#xD;pt:$flash uma ordenação de _ com critério _&#xD;ca:$flash ordena _ segons criteri _&#xD;</translations><inputs><input type="%l"></input><input type="%predRing"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>data</l><l>fn</l><l>proc</l></list><l>return proc.reportAtomicSort(data, fn);</l></block><list><block var="data"/><block var="fn"/></list></block></block></script></block-definition><block-definition s="$flash reverse %&apos;list&apos;" type="reporter" category="lists"><header></header><code></code><translations>de:$flash umgekehrt _&#xD;pt:$flash uma lista inversa de _&#xD;ca:$flash capgira _&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>list</l></list><l>return new List(list.asArray().slice().reverse());</l></block><list><block var="list"/></list></block></block></script></block-definition><block-definition s="$flash analyze %&apos;data&apos;" type="reporter" category="lists"><comment x="0" y="0" w="149" collapsed="false">returns a frequency analysis of the argument list, represented as a two-column table, where the first column contains the unique values and the second column their occurrences</comment><header></header><code></code><translations>pt:$flash as frequências dos itens de _&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>list</l></list><l>var dict = new Map(),&#xD;    result = [],&#xD;    data = list.asArray(),&#xD;    len = data.length,&#xD;    i;&#xD;for (i = 0; i &lt; len; i += 1) {&#xD;    if (dict.has(data[i])) {&#xD;        dict.set(data[i], dict.get(data[i]) + 1);&#xD;    } else {&#xD;        dict.set(data[i], 1);&#xD;    }&#xD;}&#xD;dict.forEach(function (value, key) {&#xD;    result.push(new List([key, value]));&#xD;});&#xD;return new List(result);</l></block><list><block var="data"/></list></block></block></script></block-definition><block-definition s="$flash group %&apos;data&apos; by %&apos;fn&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:o agrupamento dos itens de _ de acordo com _&#xD;</translations><inputs><input type="%l"></input><input type="%repRing"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>data</l><l>fn</l><l>proc</l></list><l>return proc.reportAtomicGroup(data, fn);</l></block><list><block var="data"/><block var="fn"/></list></block></block></script></block-definition><block-definition s="$flash sort %&apos;data&apos; by %&apos;fn&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:uma ordenação de _ com critério _&#xD;</translations><inputs><input type="%l"></input><input type="%predRing"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>data</l><l>fn</l><l>proc</l></list><l>return proc.reportAtomicSort(data, fn);</l></block><list><block var="data"/><block var="fn"/></list></block></block></script></block-definition><block-definition s="histogram of %&apos;data&apos; from: %&apos;floor&apos; to: %&apos;ceiling&apos; interval: %&apos;interval&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:o histograma de _ entre _ e _ com intervalo _&#xD;</translations><inputs><input type="%l"></input><input type="%n"></input><input type="%n"></input><input type="%n">1</input></inputs><script><block s="doReport"><custom-block s="fill %l key: %repRing from: %n to: %n interval: %repRing with: %repRing"><custom-block s="$flash sort %l by %predRing"><custom-block s="$flash analyze %l"><block var="data"/></custom-block><block s="reifyPredicate"><autolambda><block s="reportLessThan"><block s="reportListItem"><l>1</l><l/></block><block s="reportListItem"><l>1</l><l/></block></block></autolambda><list></list></block></custom-block><block s="reifyReporter"><autolambda><block s="reportListItem"><l>1</l><l/></block></autolambda><list></list></block><block var="floor"/><block var="ceiling"/><block s="reifyReporter"><autolambda><block s="reportSum"><l></l><block var="interval"/></block></autolambda><list></list></block><block s="reifyReporter"><autolambda><block s="reportNewList"><list><l></l><l>0</l></list></block></autolambda><list></list></block></custom-block></block></script></block-definition><block-definition s="histogram of %&apos;data&apos; grouped by: %&apos;key&apos; from: %&apos;floor&apos; to: %&apos;ceiling&apos; interval: %&apos;interval&apos;" type="reporter" category="lists"><header></header><code></code><translations>pt:o histograma de _ agrupado de acordo com _ entre _ e _ com passo _&#xD;</translations><inputs><input type="%l"></input><input type="%repRing"></input><input type="%n"></input><input type="%n"></input><input type="%repRing"></input></inputs><script><block s="doReport"><custom-block s="fill %l key: %repRing from: %n to: %n interval: %repRing with: %repRing"><custom-block s="$flash sort %l by %predRing"><custom-block s="$flash group %l by %repRing"><block var="data"/><block var="key"/></custom-block><block s="reifyPredicate"><autolambda><block s="reportLessThan"><block s="reportListItem"><l>1</l><l/></block><block s="reportListItem"><l>1</l><l/></block></block></autolambda><list></list></block></custom-block><block s="reifyReporter"><autolambda><block s="reportListItem"><l>1</l><l/></block></autolambda><list></list></block><block var="floor"/><block var="ceiling"/><block var="interval"/><block s="reifyReporter"><autolambda><block s="reportNewList"><list><l></l><l>0</l><block s="reportNewList"><list></list></block></list></block></autolambda><list></list></block></custom-block></block></script></block-definition><block-definition s="fill %&apos;data&apos; key: %&apos;key&apos; from: %&apos;floor&apos; to: %&apos;ceiling&apos; interval: %&apos;interval&apos; with: %&apos;generator&apos;" type="reporter" category="lists"><comment x="0" y="0" w="103" collapsed="false">add missing entries to a sorted list. Used for histograms</comment><header></header><code></code><translations>pt:os itens de _ com a chave _ entre _ e _ com passo _ completados por _&#xD;</translations><inputs><input type="%l"></input><input type="%repRing"></input><input type="%n"></input><input type="%n"></input><input type="%repRing"></input><input type="%repRing"></input></inputs><script><block s="doIf"><block s="reportGreaterThan"><block var="floor"/><block var="ceiling"/></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="data"/><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="generator"/><list><block var="floor"/></list></block><custom-block s="fill %l key: %repRing from: %n to: %n interval: %repRing with: %repRing"><block var="data"/><block var="key"/><block s="evaluate"><block var="interval"/><list><block var="floor"/></list></block><block var="ceiling"/><block var="interval"/><block var="generator"/></custom-block></block></block></script></block><block s="doIf"><block s="reportLessThan"><block s="evaluate"><block var="key"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><block var="floor"/></block><script><block s="doReport"><custom-block s="fill %l key: %repRing from: %n to: %n interval: %repRing with: %repRing"><block s="reportCDR"><block var="data"/></block><block var="key"/><block var="floor"/><block var="ceiling"/><block var="interval"/><block var="generator"/></custom-block></block></script></block><block s="doIf"><block s="reportEquals"><block s="evaluate"><block var="key"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><block var="floor"/></block><script><block s="doReport"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="data"/></block><custom-block s="fill %l key: %repRing from: %n to: %n interval: %repRing with: %repRing"><block s="reportCDR"><block var="data"/></block><block var="key"/><block s="evaluate"><block var="interval"/><list><block var="floor"/></list></block><block var="ceiling"/><block var="interval"/><block var="generator"/></custom-block></block></block></script></block><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="generator"/><list><block var="floor"/></list></block><custom-block s="fill %l key: %repRing from: %n to: %n interval: %repRing with: %repRing"><block var="data"/><block var="key"/><block s="evaluate"><block var="interval"/><list><block var="floor"/></list></block><block var="ceiling"/><block var="interval"/><block var="generator"/></custom-block></block></block></script></block-definition><block-definition s="pipe %&apos;value&apos; $arrowRight %&apos;pipe&apos;" type="reporter" category="control"><header></header><code></code><translations>pt:a aplicação a _ de _&#xD;</translations><inputs><input type="%s"></input><input type="%mult%repRing"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block var="pipe"/></block><script><block s="doReport"><block var="value"/></block></script></block><block s="doReport"><custom-block s="pipe %s $arrowRight %mult%repRing"><block s="evaluate"><block s="reportListItem"><l>1</l><block var="pipe"/></block><list><block var="value"/></list></block><block s="reportCDR"><block var="pipe"/></block></custom-block></block></script></block-definition><block-definition s="%&apos;text&apos; $arrowRight lower case" type="reporter" category="operators"><header></header><code></code><translations>pt:_ em minúsculas&#xD;</translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>txt</l></list><l>return txt.toLowerCase()</l></block><list><block var="text"/></list></block></block></script></block-definition><block-definition s="plot %&apos;data&apos; bars at x: %&apos;left&apos; y: %&apos;bottom&apos; width: %&apos;width&apos; height: %&apos;height&apos;" type="command" category="pen"><header></header><code></code><translations>pt:desenha gráfico de barras de _ em (x: _ , y: _ ) com largura _ e altura _&#xD;</translations><inputs><input type="%l"></input><input type="%n">-200</input><input type="%n">-100</input><input type="%n">400</input><input type="%n">200</input></inputs><script><block s="doDeclareVariables"><list><l>ratio</l><l>step</l><l>flat line ends</l><l>col</l><l>sorted</l><l>min</l></list></block><block s="doSetVar"><l>flat line ends</l><block s="evaluate"><block s="reportJSFunction"><list></list><l>var isFlat = SpriteMorph.prototype.useFlatLineEnds;&#xD;SpriteMorph.prototype.useFlatLineEnds = true;&#xD;return isFlat;</l></block><list></list></block></block><block s="doSetVar"><l>sorted</l><custom-block s="$flash sort %l by %predRing"><block var="data"/><block s="reifyPredicate"><autolambda><block s="reportGreaterThan"><l></l><l></l></block></autolambda><list></list></block></custom-block></block><block s="doIfElse"><block s="reportLessThan"><block s="reportListItem"><l><option>last</option></l><block var="sorted"/></block><l>0</l></block><script><block s="doSetVar"><l>min</l><block s="reportListItem"><l><option>last</option></l><block var="sorted"/></block></block></script><script><block s="doSetVar"><l>min</l><l>0</l></block></script></block><block s="doSetVar"><l>ratio</l><block s="reportQuotient"><block var="height"/><block s="reportDifference"><block s="reportListItem"><l>1</l><block var="sorted"/></block><block var="min"/></block></block></block><block s="doSetVar"><l>step</l><block s="reportQuotient"><block var="width"/><block s="reportListLength"><block var="data"/></block></block></block><block s="doIfElse"><block s="reportGreaterThan"><block var="step"/><l>2</l></block><script><block s="doSetVar"><l>col</l><block s="reportDifference"><block var="step"/><l>1</l></block></block></script><script><block s="doSetVar"><l>col</l><block s="reportProduct"><block var="step"/><l>0.8</l></block></block></script></block><block s="gotoXY"><block var="left"/><block var="bottom"/></block><block s="setSize"><l>0.5</l></block><block s="down"></block><block s="changeXPosition"><block s="reportQuotient"><block var="step"/><l>2</l></block></block><block s="doWarp"><script><block s="doUntil"><block s="reportEquals"><block s="reportListLength"><block var="data"/></block><l>0</l></block><script><block s="setSize"><block var="col"/></block><block s="changeYPosition"><block s="reportProduct"><block s="reportDifference"><block s="reportListItem"><l>1</l><block var="data"/></block><block var="min"/></block><block var="ratio"/></block></block><block s="setYPosition"><block var="bottom"/></block><block s="setSize"><l>0.5</l></block><block s="doSetVar"><l>data</l><block s="reportCDR"><block var="data"/></block></block><block s="doIfElse"><block s="reportGreaterThan"><block s="reportListLength"><block var="data"/></block><l>0</l></block><script><block s="changeXPosition"><block var="step"/></block></script><script><block s="changeXPosition"><block s="reportQuotient"><block var="step"/><l>2</l></block></block></script></block></script></block></script></block><block s="up"></block><block s="doRun"><block s="reportJSFunction"><list><l>flag</l></list><l>SpriteMorph.prototype.useFlatLineEnds = flag;</l></block><list><block var="flat line ends"/></list></block></script></block-definition><block-definition s="$globe show current location" type="command" category="other"><header></header><code></code><translations>de:$globe zeige aktuellen Standort&#xD;pt:mostra a localização corrente do dispositivo no $globe&#xD;ca:$globe centra a la meva ubicació&#xD;</translations><inputs></inputs><script><custom-block s="set $globe to lon: %n lat: %n"><custom-block s="$globe current longitude"></custom-block><custom-block s="$globe current latitude"></custom-block></custom-block></script></block-definition><block-definition s="$globe zoom" type="reporter" category="other"><header></header><code></code><translations>de:$globe Zoom&#xD;pt:o zoom do $globe&#xD;ca:$globe zoom&#xD;</translations><inputs></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>stage</l></list><l>return stage.worldMap.zoom;</l></block><list><block s="reportGet"><l><option>stage</option></l></block></list></block></block></script></block-definition><block-definition s="set $globe zoom to %&apos;n&apos;" type="command" category="other"><header></header><code></code><translations>de:setze $globe Zoom auf _&#xD;pt:altera o zoom do $globe para _&#xD;ca:$globe fixa el zoom a _&#xD;</translations><inputs><input type="%n">10</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>stage</l><l>n</l></list><l>stage.worldMap.setZoom(n)</l></block><list><block s="reportGet"><l><option>stage</option></l></block><block var="n"/></list></block><custom-block s="update $globe"></custom-block></script></block-definition><block-definition s="$globe longitude of x %&apos;x&apos;" type="reporter" category="other"><header></header><code></code><translations>de:$globe Längengrad von x _&#xD;pt:a longitude no $globe da coordenada x _&#xD;ca:$globe longitud per a x _&#xD;</translations><inputs><input type="%n">0</input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>stage</l><l>x</l></list><l>return stage.worldMap.lonFromSnapX(x)</l></block><list><block s="reportGet"><l><option>stage</option></l></block><block var="x"/></list></block></block></script></block-definition><block-definition s="$globe latitude of y %&apos;y&apos;" type="reporter" category="other"><header></header><code></code><translations>de:$globe Breitengrad von y _&#xD;pt:a latitude no $globe da coordenada y _&#xD;ca:$globe latitud per a y _&#xD;</translations><inputs><input type="%n">0</input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>stage</l><l>y</l></list><l>return stage.worldMap.latFromSnapY(y)</l></block><list><block s="reportGet"><l><option>stage</option></l></block><block var="y"/></list></block></block></script></block-definition><block-definition s="set $globe to lon: %&apos;lon&apos; lat: %&apos;lat&apos;" type="command" category="other"><header></header><code></code><translations>de:setze $globe auf Länge: _ Breite: _&#xD;pt:altera a posição no $globe para (longitude: _ , latitude: _ )&#xD;ca:$globe centra a longitud: _ latitud: _&#xD;</translations><inputs><input type="%n">-122.257852</input><input type="%n">37.872099</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>stage</l><l>lat</l><l>lon</l></list><l>stage.worldMap.setView(lon, lat);</l></block><list><block s="reportGet"><l><option>stage</option></l></block><block var="lat"/><block var="lon"/></list></block><custom-block s="update $globe"></custom-block></script></block-definition><block-definition s="y of $globe latitude %&apos;lat&apos;" type="reporter" category="other"><header></header><code></code><translations>de:y von $globe Breitengrad _&#xD;pt:a coordenada y da latitude _ no $globe&#xD;ca:$globe y per a latitud _&#xD;</translations><inputs><input type="%n"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>stage</l><l>lat</l></list><l>return stage.worldMap.snapYfromLat(lat)</l></block><list><block s="reportGet"><l><option>stage</option></l></block><block var="lat"/></list></block></block></script></block-definition><block-definition s="x of $globe longitude %&apos;lng&apos;" type="reporter" category="other"><header></header><code></code><translations>de:x von $globe Längengrad _&#xD;pt:a coordenada x da longidude _ no $globe&#xD;ca:$globe x per a longitud _&#xD;</translations><inputs><input type="%n"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>stage</l><l>lng</l></list><l>return stage.worldMap.snapXfromLon(lng)</l></block><list><block s="reportGet"><l><option>stage</option></l></block><block var="lng"/></list></block></block></script></block-definition><block-definition s="change $globe by x: %&apos;x&apos; y: %&apos;y&apos; pixels" type="command" category="other"><header></header><code></code><translations>de:ändere $globe um x: _ y: _ Pixel&#xD;pt:desloca a posição do mapa de (x: _ , y: _ )&#xD;ca:$globe canvia la ubicació en x: _ y: _ píxels&#xD;</translations><inputs><input type="%n">10</input><input type="%n">10</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>stage</l><l>x</l><l>y</l></list><l>stage.worldMap.panBy(x, y)</l></block><list><block s="reportGet"><l><option>stage</option></l></block><block var="x"/><block var="y"/></list></block><custom-block s="update $globe"></custom-block></script></block-definition><block-definition s="$globe distance in km to %&apos;target&apos;" type="reporter" category="other"><header></header><code></code><translations>de:$globe Entfernung in km zu _&#xD;pt:a tua distância em km a _ no $globo&#xD;ca:$globe distància en km fins a _&#xD;</translations><inputs><input type="%s" readonly="true"><options>§_objectsMenu</options></input></inputs><script><block s="doDeclareVariables"><list><l>trg</l></list></block><block s="doSetVar"><l>trg</l><block s="reportObject"><block var="target"/></block></block><block s="doIf"><block s="reportNot"><block s="reportAnd"><block s="reportIsA"><block s="reportGet"><l><option>self</option></l></block><l><option>sprite</option></l></block><block s="reportIsA"><block var="trg"/><l><option>sprite</option></l></block></block></block><script><block s="doReport"><l>-1</l></block></script></block><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>stage</l><l>lat1</l><l>lng1</l><l>lat2</l><l>lng2</l></list><l>return stage.worldMap.distanceInKm(lat1, lng1, lat2, lng2)</l></block><list><block s="reportGet"><l><option>stage</option></l></block><custom-block s="$globe latitude of y %n"><block s="yPosition"></block></custom-block><custom-block s="$globe longitude of x %n"><block s="xPosition"></block></custom-block><custom-block s="$globe latitude of y %n"><block s="reportAttributeOf"><l><option>y position</option></l><block var="target"/></block></custom-block><custom-block s="$globe longitude of x %n"><block s="reportAttributeOf"><l><option>x position</option></l><block var="target"/></block></custom-block></list></block></block></script></block-definition><block-definition s="$globe current location" type="reporter" category="other"><header></header><code></code><translations>de:$globe aktuelle Position&#xD;pt:a localização corrente do dispositivo no $globe&#xD;ca:$globe ubicació actual&#xD;</translations><inputs></inputs><script><block s="doDeclareVariables"><list><l>test</l></list></block><block s="doSetVar"><l>test</l><block s="evaluate"><block s="reportJSFunction"><list></list><l>var crd = new List(),&#xD;    myself = this,&#xD;    options = {&#xD;      enableHighAccuracy: true,&#xD;      timeout: 5000,&#xD;      maximumAge: 0&#xD;    };&#xD;&#xD;function success(pos) {&#xD;  crd = new List([&#xD;    pos.coords.latitude,&#xD;    pos.coords.longitude&#xD;  ]);&#xD;}&#xD;&#xD;function error(err) {&#xD;  crd = new List([37.872099, -122.257852]);&#xD;  myself.inform(&apos;Warning:\nGeolocation failed.&apos;);&#xD;}&#xD;&#xD;navigator.geolocation.getCurrentPosition(&#xD;  success,&#xD;  error,&#xD;  options&#xD;);&#xD;&#xD;return function () {return crd; }</l></block><list></list></block></block><block s="doWaitUntil"><block s="reportEquals"><block s="reportListLength"><block s="evaluate"><block var="test"/><list></list></block></block><l>2</l></block></block><block s="doReport"><block s="evaluate"><block var="test"/><list></list></block></block></script></block-definition><block-definition s="$globe current latitude" type="reporter" category="other"><header></header><code></code><translations>de:$globe aktueller Breitengrad&#xD;pt:a latitude corrente do dispositivo no $globe&#xD;ca:$globe latitud actual&#xD;</translations><inputs></inputs><script><block s="doReport"><block s="reportListItem"><l>1</l><custom-block s="$globe current location"></custom-block></block></block></script></block-definition><block-definition s="$globe current longitude" type="reporter" category="other"><header></header><code></code><translations>de:$globe aktueller Längengrad&#xD;pt:a longitude corrente do dispositivo no $globe&#xD;ca:$globe longitud actual&#xD;</translations><inputs></inputs><script><block s="doReport"><block s="reportListItem"><l>2</l><custom-block s="$globe current location"></custom-block></block></block></script></block-definition><block-definition s="update $globe" type="command" category="other"><header></header><code></code><translations>de:aktualisiere $globe&#xD;pt:actualiza o $globe&#xD;ca:$globe força refresc&#xD;</translations><inputs></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>stage</l></list><l>stage.worldMap.extent = stage.dimensions;&#xD;stage.worldMap.render()</l></block><list><block s="reportGet"><l><option>stage</option></l></block></list></block><block s="doTellTo"><block s="reportGet"><l><option>stage</option></l></block><block s="reifyScript"><script><block s="doSwitchToCostume"><custom-block s="$globe as costume"></custom-block></block></script><list></list></block><list></list></block></script></block-definition><block-definition s="$globe as costume" type="reporter" category="other"><header></header><code></code><translations>de:$globe als Kostüm&#xD;pt:a parte visível do $globe na forma de traje&#xD;ca:$globe vestit del mapa actual&#xD;</translations><inputs></inputs><script><block s="doWaitUntil"><block s="evaluate"><block s="reportJSFunction"><list><l>stage</l></list><l>return !stage.worldMap.loading</l></block><list><block s="reportGet"><l><option>stage</option></l></block></list></block></block><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>stage</l></list><l>return new Costume(stage.worldMap.canvas, &apos;map&apos;)</l></block><list><block s="reportGet"><l><option>stage</option></l></block></list></block></block></script></block-definition><block-definition s="set $globe style to %&apos;name&apos;" type="command" category="other"><header></header><code></code><translations>de:setze $globe Stil auf _&#xD;pt:altera o estilo do $globe para _&#xD;ca:$globe fixa l&apos;estil de mapa a _&#xD;</translations><inputs><input type="%s" readonly="true">Wikimedia<options>OpenStreetMap&#xD;Wikimedia&#xD;Watercolor&#xD;Toner&#xD;Terrain&#xD;Topographic&#xD;Satellite&#xD;Streets&#xD;Shading&#xD;Mapbox (experimental)</options></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>stage</l><l>name</l></list><l>stage.worldMap.setHost(name)</l></block><list><block s="reportGet"><l><option>stage</option></l></block><block var="name"/></list></block><custom-block s="update $globe"></custom-block></script></block-definition><block-definition s="global variables %&apos;names&apos;" type="command" category="variables"><header></header><code></code><translations>pt:cria as variáveis globais _&#xD;</translations><inputs><input type="%mult%txt"></input></inputs><script><block s="doForEach"><l>each item</l><block var="names"/><script><block s="doRun"><block s="reportJSFunction"><list><l>name</l></list><l>if ((typeof name) != "string") {&#xD;    throw new Error("name isn&apos;t a string: " + name);&#xD;}&#xD;if (name != "") this.addVariable(name, true);</l></block><list><block var="each item"/></list></block></script></block><block s="doRun"><block s="reportJSFunction"><list></list><l>var ide = this.parentThatIsA(IDE_Morph);&#xD;ide.flushBlocksCache(&apos;variables&apos;); // b/c of inheritance&#xD;ide.refreshPalette();</l></block><list></list></block></script></block-definition><block-definition s="sprite-local variables %&apos;names&apos;" type="command" category="variables"><header></header><code></code><translations>pt:cria as variáveis de objecto _&#xD;</translations><inputs><input type="%mult%txt"></input></inputs><script><block s="doForEach"><l>each item</l><block var="names"/><script><block s="doRun"><block s="reportJSFunction"><list><l>name</l></list><l>if ((typeof name) != "string") {&#xD;    throw new Error("name isn&apos;t a string: " + name);&#xD;}&#xD;if (name != "") this.addVariable(name, false);</l></block><list><block var="each item"/></list></block></script></block><block s="doRun"><block s="reportJSFunction"><list></list><l>var ide = this.parentThatIsA(IDE_Morph);&#xD;ide.flushBlocksCache(&apos;variables&apos;); // b/c of inheritance&#xD;ide.refreshPalette();</l></block><list></list></block></script></block-definition><block-definition s="does variable %&apos;var&apos; exist?" type="predicate" category="variables"><header></header><code></code><translations>pt:a variável _ existe&#xD;</translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>varname</l></list><l>if ((typeof varname) != "string") {&#xD;    throw new Error("name isn&apos;t a string: " + varname);&#xD;}&#xD;return this.isVariableNameInUse(varname, true);</l></block><list><block var="var"/></list></block></block></script></block-definition><block-definition s="listify %&apos;jsonString&apos;" type="reporter" category="operators"><header></header><code></code><translations>pt:os dados JSON _ em formato de lista&#xD;</translations><inputs><input type="%mlt"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>jsonString</l></list><l>return listify(JSON.parse(jsonString));&#xD;&#xD;function listify(jsonObject) {&#xD;  if (jsonObject instanceof Array) {&#xD;    return new List(jsonObject.map(function(eachElement) { return listify(eachElement)}));&#xD;  } else if (jsonObject instanceof Object) {&#xD;    return new List(Object.keys(jsonObject).map(function(eachKey) { return new List([eachKey,listify(jsonObject[eachKey])])} ))&#xD;  } else {&#xD;    return jsonObject&#xD;  }&#xD;}</l></block><list><block var="jsonString"/></list></block></block></script></block-definition><block-definition s="value at key %&apos;key&apos; of %&apos;lst&apos;" type="reporter" category="operators"><header></header><code></code><translations>pt:o valor com chave _ em _&#xD;</translations><inputs><input type="%s"></input><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doForEach"><l>each item</l><block var="lst"/><script><block s="doIf"><block s="reportEquals"><block s="reportListItem"><l>1</l><block var="each item"/></block><block var="key"/></block><script><block s="doReport"><block s="reportListItem"><l>2</l><block var="each item"/></block></block></script></block></script></block></script></block><block s="doReport"><l></l></block></script></block-definition><block-definition s="do in parallel %&apos;actions&apos; and wait" type="command" category="control"><header></header><code></code><translations>pt:executa _ em paralelo e espera&#xD;</translations><inputs><input type="%mult%cs"></input></inputs><script><block s="doDeclareVariables"><list><l>threads</l></list></block><block s="doSetVar"><l>threads</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="evaluate"><block s="reifyScript"><script><block s="doDeclareVariables"><list><l>is running?</l></list></block><block s="doSetVar"><l>is running?</l><block s="reportBoolean"><l><bool>true</bool></l></block></block><block s="fork"><block s="reifyScript"><script><block s="doRun"><block var="each script"/><list></list></block><block s="doSetVar"><l>is running?</l><block s="reportBoolean"><l><bool>false</bool></l></block></block></script><list></list></block><list></list></block><block s="doReport"><block s="reifyScript"><script><block s="doReport"><block var="is running?"/></block></script><list></list></block></block></script><list></list></block><list></list></block></autolambda><list><l>each script</l></list></block><block var="actions"/></block></block><block s="doWaitUntil"><block s="reportListIsEmpty"><block s="reportKeep"><block s="reifyPredicate"><autolambda><block s="evaluate"><block var="test"/><list></list></block></autolambda><list><l>test</l></list></block><block var="threads"/></block></block></block></script></block-definition><block-definition s="do in parallel %&apos;actions&apos;" type="command" category="control"><header></header><code></code><translations>pt:executa _ em paralelo&#xD;</translations><inputs><input type="%mult%cs"></input></inputs><script><block s="doIf"><block s="reportGreaterThan"><block s="reportListLength"><block var="actions"/></block><l>0</l></block><script><block s="fork"><block s="reportListItem"><l>1</l><block var="actions"/></block><list></list></block><custom-block s="do in parallel %mult%cs"><block s="reportCDR"><block var="actions"/></block></custom-block></script></block></script></block-definition><block-definition s="substring of %&apos;string&apos; before %&apos;marker&apos;" type="reporter" category="operators"><comment x="0" y="0" w="175.33333333333334" collapsed="false">Reports the part of the first string up to the first instance of the second string inside it.  If the second string isn&apos;t found, reports the entire first string.</comment><header></header><code></code><translations>pt:o texto de _ antes de _&#xD;</translations><inputs><input type="%txt"></input><input type="%txt"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>string</l><l>marker</l></list><l>var world=this.parentThatIsA(IDE_Morph);&#xD;if (!("stringLibCaseIndependentComparison" in world)) {&#xD;    world["stringLibCaseIndependentComparison"] = true;&#xD;};&#xD;if (world["stringLibCaseIndependentComparison"]) {&#xD;    var index=string.toLocaleLowerCase().indexOf(marker.toLocaleLowerCase());&#xD;    if (index&lt;0) {return string};&#xD;    return string.slice(0,index);&#xD;} else {&#xD;    var index=string.indexOf(marker);&#xD;    if (index&lt;0) {return string};&#xD;    return string.slice(0,index);&#xD;}</l></block><list><block var="string"/><block var="marker"/></list></block></block></script></block-definition><block-definition s="substring of %&apos;string&apos; after %&apos;marker&apos;" type="reporter" category="operators"><comment x="0" y="0" w="203.33333333333334" collapsed="false">Reports the portion of the first input string starting after the first occurrence of the second string.  If the second string isn&apos;t found in the first string, reports an empty string.</comment><header></header><code></code><translations>pt:o texto de _ depois de _&#xD;</translations><inputs><input type="%txt"></input><input type="%txt"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>string</l><l>marker</l><l>markerlength</l></list><l>var world=this.parentThatIsA(IDE_Morph);&#xD;if (!("stringLibCaseIndependentComparison" in world)) {&#xD;    world["stringLibCaseIndependentComparison"] = true;&#xD;};&#xD;if (world["stringLibCaseIndependentComparison"]) {&#xD;    var index=string.toLocaleLowerCase().indexOf(marker.toLocaleLowerCase());&#xD;    if (index&lt;0) {return ""};&#xD;    return string.slice(index+markerlength);&#xD;} else {&#xD;    var index=string.indexOf(marker);&#xD;    if (index&lt;0) {return ""};&#xD;    return string.slice(index+markerlength);&#xD;}</l></block><list><block var="string"/><block var="marker"/><block s="reportStringSize"><block var="marker"/></block></list></block></block></script></block-definition><block-definition s="position of %&apos;small&apos; in %&apos;large&apos;" type="reporter" category="operators"><comment x="0" y="0" w="294" collapsed="false">Reports the character position (starting from 1) of the beginning of the first input string inside the second input string.&#xD;If it&apos;s not found, reports 0.</comment><header></header><code></code><translations>pt:a posição de _ em _&#xD;</translations><inputs><input type="%s"></input><input type="%txt"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>sub</l><l>sup</l></list><l>var world=this.parentThatIsA(IDE_Morph);&#xD;if (!("stringLibCaseIndependentComparison" in world)) {&#xD;    world["stringLibCaseIndependentComparison"] = true;&#xD;};&#xD;if (world["stringLibCaseIndependentComparison"]) {&#xD;    return 1+sup.toLocaleLowerCase().indexOf(sub.toLocaleLowerCase());&#xD;} else {&#xD;    return 1+sup.indexOf(sub);&#xD;}</l></block><list><block var="small"/><block var="large"/></list></block></block></script></block-definition><block-definition s="use case-independent comparisons %&apos;tf&apos;" type="command" category="operators"><comment x="0" y="0" w="225.33333333333334" collapsed="false">If input is TRUE, comparisons made by functions in the string library will be case-independent (so &quot;FOO&quot; = &quot;foo&quot;).  This is the default.&#xD;If input is FALSE, comparisons will be exact.</comment><header></header><code></code><translations>pt:altera comparações ignorando distinção minúsculas/maiúsculas para _&#xD;</translations><inputs><input type="%b"></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>flag</l></list><l>var world=this.parentThatIsA(IDE_Morph);&#xD;world[&apos;stringLibCaseIndependentComparison&apos;] = flag;</l></block><list><block var="tf"/></list></block></script></block-definition><block-definition s="substring of %&apos;str&apos; from position %&apos;start&apos; to position %&apos;end&apos; inclusive" type="reporter" category="operators"><comment x="0" y="0" w="297.3333333333333" collapsed="false">Reports the portion of the first input (string) starting at the position given by the second input (counting from 1, like LETTER n OF) and ending at the position given by the third input (also counting from 1).  If the third input is empty, reports the portion from the first position to the end of the string.&#xD;If a position number is negative, counts from the end backward, so -1 is the last character, -2 is the next to last, etc.</comment><header></header><code></code><translations>pt:o texto de _ entre as posições _ e _ , inclusive&#xD;</translations><inputs><input type="%txt"></input><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>str</l><l>start</l><l>end</l></list><l>if (end != "") {&#xD;    return str.slice(start-1,end);&#xD;} else {&#xD;    return str.slice(start-1);&#xD;}</l></block><list><block var="str"/><block var="start"/><block var="end"/></list></block></block></script></block-definition></blocks><variables></variables></project><media name="Block Download" app="Snap! 6, https://snap.berkeley.edu" version="1"></media></snapdata>