<snapdata remixID="9294419"><project name="Custom Blocks" app="Snap! 6, https://snap.berkeley.edu" version="1"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAJC0lEQVR4Xu2da0hV2xqGX63sZnbVzGPFbndPfxTZxTTL0gIjTAzFsILULrt2kkFWUGFk/hElS/Io3cFLZWRWhpZIZWJaP7qgXaxTRJbZBa2E1A7jgx2bjpam9a3Dfgds1mo55njHfL5nzTnHXBO21efPnz+DjQSUCFhRQCXyjBUCFJAiqBKggKr4GU4B6YAqAQqoip/hFJAOqBKggKr4GU4B6YAqAQqoip/hFJAOqBKggKr4GU4B6YAqAQqoip/hFJAOqBKggKr4GU4B6YAqAQqoip/hFJAOqBKggKr4GU4B6YAqAQqoip/hFJAOqBKggKr4GU4B6YAqAQqoip/hFJAOqBKggKr4GU4B6YAqAQqoip/hFJAOqBKggKr4GU4B6YAqAQqoip/hFJAOqBKggKr4GU4B6YAqAQqoip/hFJAOqBKggJ2E/8WLF3j8+DE+fPjQSSN2/jCDBw/GqFGj0K1bt84f/AdHpIA/CO7vm5WVleHjx48YOnQobGxsOmHEnzNEfX09nj17BicnJ4wZM+bnhLRzVArYTmBfd79z5w7evXsHd3f3Do706zYvLCyEl5cXrK2tf11oK0kUsIMlMMWcPXt2B0f5tZs/f/5cvjRjx479tcEtpFHADpbg/1FAs8uWMm8K2MkCWllZobi4WE7J7fnf8JnT4dWrV2U206dPl9dPnz51eMFg5tPSPChgBwtvKZt/XUhTcFdXV0yYMAEZGRm4dOkSNmzYAPN5Tk4O8vLy4ODgAH9/f1y4cAE+Pj6yK0ZAb29veV9QUIDq6mpZUbu5uaGkpASbNm1CdnY2ysvLUVNTg/DwcKSlpSEqKgq3b99G9+7dkZCQgNWrV8PFxQXr16+XPmZcCmgptvyEebQk4F8F/+voM27cOCxYsABhYWF48+YNPDw8EBkZiRkzZsiR0tweMaKkp6fLDIOCguT15MmT0i8rKwuZmZlITEzE/fv38eTJE1y+fFnEevToEY4cOYIePXqIdHFxcRg2bBgWL16M+Ph4CvgTam5RQ1rKqczR0VGOmm1tljJvXgO2tWKt9LOUQrZ3Nyxl3hSwvZX7qn9rhYyIiEBycjK6du3aYkJjY+OXv5n3Xbp0kevEr1trfzOn7Obm5i/dr1+/LteLbW0UsK2kLLxfa4U0MplVrLmGO3fuHCoqKmQhYa73oqOjYcTauHEjzpw5g8rKShHQXCv26dMHRibzk5m5xjPbmb6xsbGIiYlBQ0MDQkJCcOrUKdTV1WHr1q0YPXq0jHn+/Hn5m/mp7eHDh98kRwEtXKy2Tu97ApojoJHRLDCMPKYtX75cpDL/9ezZU0Q1AgYGBspK1vykFxwcLKviFStWICkpSRYVzs7OsiAx703/3NxckTclJQXv37/H06dPMWfOHFl5f+8WEAVsa4UtvF9rhTx8+DBCQ0NlFZqamiq3RI4ePQo/Pz8MGDBApDNHKfMQg6enp/QrKipCbW0tAgICkJ+fL3tuhDJ/M7dczCratIMHD6KpqQlLliyRWztG5EmTJkk/cw9y6tSp333ogAJauFhtnZ6lFLKt8zX9Xr58KfcSzb1K7cZFSAcrcOPGDTkatWcB0MHIDm9uvjTm/qO5ea3dKGAnVMAU1M7ODkOGDJGiDhw4UEY1p1NLauZxrKqqKvklxhKOfoYNBewkQ8wpzfwkNmvWLHnS5ObNmxg0aNCXxUBLt1j+Hm0WDS31ae3zH5m2ra0t7O3tYV4tpVHAVirxb19fuAYEwGnuXAwfOfK79TIPpJaWlsqR8O3bt7KwaO0e4HcH+wd1oIDfKPbjLl0wDMB/evXCw6lT4fznnxjk7i5Htq+bOQ2bZm6hjGyDsP8gx765qxTwG3hev36NHoMHo1dj45deH7t2RbWTEyo9PTFmzRr85u4uj+ObJ1bMY1TmoQC2thOggD8oYIWHB8b+8YcIyPbjBChgO0/BA6dPlwt5ts4hQAFb4Zjq6wuXgAD8y8cHw37/vXNoc5T/IUABKYUqAQqoip/hFJAOqBKggKr4GU4B6YAqAQqoip/hFJAOqBKggKr4GU4B6YAqAQqoip/hFJAOqBKggKr4GU4B6YAqAQqoip/hFJAOqBKggKr4GU4B6YAqAQqoip/hFJAOqBKggKr4GU4B6YAqAQqoip/hFJAOqBKggKr4GU4B6YAqAQqoip/hFJAOqBKggKr4GU4B6YAqAQqoip/hFJAOqBKggKr4GU4B6YAqAQqoip/hFJAOqBKggKr4GU4B6YAqAQqoip/hFJAOqBKggKr4GU4B6YAqAQqoip/hFJAOqBKggKr4GU4B6YAqAQqoip/hFJAOqBKggKr4GU4B6YAqAQqoip/hFJAOqBKggKr4GU4B6YAqAQqoip/hFJAOqBKggK3gr66uhqOjIwoKClBTU4N9+/YhKysLhYWF2L17N2JjY1FSUoIHDx4gIyMD6enpsLe3h6+vr/Rxc3PD/PnzZZtdu3bB2toaSUlJ0n/lypVwdnbGzJkz4efnh1WrVsl4VlZW2LZtG0JDQ3Hv3j3k5+cjLy9P+qxdu1Y+y83NxZ49e9CvXz8EBgbi+PHj6N27NxISEuDp6Ynk5GTU1dXh7NmzsLGxQX19PWxtbb+8mt29desWXF1dER8fj6ioKJlPSkoK7t69i/HjxwuRK1eu4NGjRzhw4ACCg4Mxd+5cyTP7UlFRgYsXL8Lb2xt9+/aFi4sLpk2bhkOHDqGoqAhpaWnYuXOn7P+WLVuwdOlS2W8zz4kTJ2Lv3r2IiIjAwoULQQG/IaCPj48U1kAtLi5GTk4OysrKsHnzZsybNw9eXl6Ii4vDokWL5N9G1rCwMKxZswa1tbV49eqVbLN69WopgilidHS0CGEKduLECSQmJooAZvumpiacPn1a5DDFqqysRGpqqgg4efJk9O/fX4Q0Y4WEhMg22dnZIuS1a9cwZcoUmV9zczOOHTsGOzs7+Pv7y+elpaXyaoQwwu/fv1/mYuYfFBSE8PBwmV9VVRVGjBghAnp4eCAyMlLmYr4U69atky+Wg4ODfG5aQ0MDMjMzsWzZMsTExMjr8OHDsWPHDuFj2Jn35gva2NgoIpaXl8s427dvx38BNSrJ1QTMggoAAAAASUVORK5CYII=</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><wear><costume name="map" center-x="240" center-y="180" image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAgAElEQVR4Xu3be1TN+d7AcXclISQUEZEibYmKYaYREaajmlyHSHTkEqKMS2dhjWGNmMwQk4ZUU+6kkVsuTU0hcmnCiG6IXIvcPetrPftZnX04Z9bM88xnrXne/plT7b0/v/3an/Z779/uVK/GPwQQQAABBBD40wWq/+kTGYgAAggggAAC1QgwS4AAAggggICAAAEWQGckAggggAACBJgdQAABBBBAQECAAAugMxIBBBBAAAECzA4ggAACCCAgIECABdAZiQACCCCAAAFmBxBAAAEEEBAQIMAC6IxEAAEEEECAALMDCCCAAAIICAgQYAF0RiKAAAIIIECA2QEEEEAAAQQEBAiwADojEUAAAQQQIMDsAAIIIIAAAgICBFgAnZEIIIAAAggQYHYAAQQQQAABAQECLIDOSAQQQAABBAgwO4AAAggggICAAAEWQGckAggggAACBJgdQAABBBBAQECAAAugMxIBBBBAAAECzA4ggAACCCAgIECABdAZiQACCCCAAAFmBxBAAAEEEBAQIMAC6IxEAAEEEECAALMDCCCAAAIICAgQYAF0RiKAAAIIIECA2QEEEEAAAQQEBAiwADojEUAAAQQQIMDsAAIIIIAAAgICBFgAnZEIIIAAAggQYHYAAQQQQAABAQECLIDOSAQQQAABBAgwO4AAAggggICAAAEWQGckAggggAACBJgdQAABBBBAQECAAAugMxIBBBBAAAECzA4ggAACCCAgIECABdAZiQACCCCAAAFmBxBAAAEEEBAQIMAC6IxEAAEEEECAALMDCCCAAAIICAgQYAF0RiKAAAIIIECA2QEEEEAAAQQEBAiwADojEUAAAQQQIMDsAAIIIIAAAgICBFgAnZEIIIAAAggQYHYAAQQQQAABAQECLIDOSAQQQAABBAgwO4AAAggggICAAAEWQGckAggggAACBJgdQAABBBBAQECAAAugMxIBBBBAAAECzA4ggAACCCAgIECABdAZiQACCCCAAAFmBxBAAAEEEBAQIMAC6IxEAAEEEECAALMDCCCAAAIICAgQYAF0RiKAAAIIIECA2QEEEEAAAQQEBAiwADojEUAAAQQQIMDsAAIIIIAAAgICBFgAnZEIIIAAAggQYHYAAQQQQAABAQECLIDOSAQQQAABBAgwO4AAAggggICAAAEWQGckAggggAACBJgdQAABBBBAQECAAAugMxIBBBBAAAECzA4ggAACCCAgIECABdAZiQACCCCAAAFmBxBAAAEEEBAQIMAC6IxEAAEEEECAALMDCCCAAAIICAgQYAF0RiKAAAIIIECA2QEEEEAAAQQEBAiwADojEUAAAQQQIMDsAAIIIIAAAgICBFgAnZEIIIAAAggQYHYAAQQQQAABAQECLIDOSAQQQAABBAgwO4AAAggggICAAAEWQGckAggggAACBJgdQAABBBBAQECAAAugMxIBBBBAAAECzA4ggAACCCAgIECABdAZiQACCCCAAAFmBxBAAAEEEBAQIMAC6IxEAAEEEECAALMDCCCAAAIICAgQYAF0RiKAAAIIIECA2QEEEEAAAQQEBAiwADojEUAAAQQQIMDsAAIIIIAAAgICBFgAnZEIIIAAAggQYHYAAQQQQAABAQECLIDOSAQQQAABBAgwO4AAAggggICAAAEWQGckAggggAACBJgdQAABBBBAQECAAAugMxIBBBBAAAECzA4ggAACCCAgIECABdAZiQACCCCAAAFmBxBAAAEEEBAQIMAC6IxEAAEEEECAALMDCCCAAAIICAgQYAF0RiKAAAIIIECA2QEEEEAAAQQEBAiwADojEUAAAQQQIMDsAAIIIIAAAgICBFgAnZEIIIAAAggQYHYAAQQQQAABAQECLIDOSAQQQAABBAgwO4AAAggggICAAAEWQGckAggggAACBJgdQAABBBBAQECAAAugMxIBBBBAAAECzA4ggAACCCAgIECABdAZiQACCCCAAAFmBxBAAAEEEBAQIMAC6IxEAAEEEECAALMDCCCAAAIICAgQYAF0RiKAAAIIIECA2QEEEEAAAQQEBAiwADojEUAAAQQQIMDsAAIIIIAAAgICBFgAnZEIIIAAAggQYHYAAQQQQAABAQECLIDOSAQQQAABBAgwO4AAAggggICAAAEWQGckAggggAACBJgdQAABBBBAQECAAAugMxIBBBBAAAECzA4ggAACCCAgIECABdAZiQACCCCAAAFmBxBAAAEEEBAQIMAC6IxEAAEEEECAALMDCCCAAAIICAgQYAF0RiKAAAIIIECA2QEEEEAAAQQEBAiwADojEUAAAQQQIMDsAAIIIIAAAgICBFgAnZEIIIAAAggQYHYAAQQQQAABAQECLIDOSAQQQAABBAgwO4AAAggggICAAAEWQGckAggggAACBJgdQAABBBBAQECAAAugMxIBBBBAAAECzA4ggAACCCAgIECABdAZiQACCCCAAAFmBxBAAAEEEBAQIMAC6IxEAAEEEECAALMDCCCAAAIICAgQYAF0RiKAAAIIIECA2QEEEEAAAQQEBAiwADojEUAAAQQQIMDsAAIIIIAAAgICBFgAnZEIIIAAAggQYHYAAQQQQAABAQECLIDOSAQQQAABBAgwO4AAAggggICAAAEWQGckAggggAACBJgdQAABBBBAQECAAAugMxIBBBBAAAECzA4ggAACCCAgIECABdAZiQACCCCAAAFmBxBAAAEEEBAQIMAC6IxEAAEEEECAALMDCCCAAAIICAgQYAF0RiKAAAIIIECA2QEEEEAAAQQEBAiwADojEUAAAQQQIMDsAAIIIIAAAgICBFgAnZEIIIAAAggQYHYAAQQQQAABAQECLIDOSAQQQAABBAgwO4AAAggggICAAAEWQGckAggggAACBJgdQAABBBBAQECAAAugMxIBBBBAAAECzA4ggAACCCAgIECABdAZiQACCCCAAAFmBxBAAAEEEBAQIMAC6IxEAAEEEECAALMDCCCAAAIICAgQYAF0RiKAAAIIIECA2QEEEEAAAQQEBAiwADojEUAAAQQQIMDsAAIIIIAAAgICBFgAnZEIIIAAAggQYHYAAQQQQAABAQECLIDOSAQQQAABBAgwO4AAAggggICAAAEWQGckAggggAACBJgdQAABBBBAQECAAAugMxIBBBBAAAECzA4ggAACCCAgIECABdAZiQACCCCAAAFmBxBAAAEEEBAQIMAC6IxEAAEEEECAALMDCCCAAAIICAgQYAF0RiKAAAIIIECA2QEEEEAAAQQEBAiwADojEUAAAQQQIMDsAAIIIIAAAgICBFgAnZEIIIAAAggQYHYAAQQQQAABAQECLIDOSAQQQAABBAgwO4AAAggggICAAAEWQGckAggggAACBJgdQAABBBBAQECAAAugMxIBBBBAAAECzA4ggAACCCAgIECABdAZiQACCCCAAAFmBxBAAAEEEBAQIMAC6IxEAAEEEECAALMDCCCAAAIICAgQYAF0RiKAAAIIIECA2QEEEEAAAQQEBAiwADojEUAAAQQQIMDsAAIIIIAAAgICBFgAnZEIIIAAAggQYHYAAQQQQAABAQECLIDOSAQQQAABBAgwO4AAAggggICAAAEWQGckAggggAACBJgdQAABBBBAQECAAAugMxIBBBBAAAECzA4ggAACCCAgIECABdAZiQACCCCAAAFmBxBAAAEEEBAQIMAC6IxEAAEEEECAALMDCCCAAAIICAgQYAF0RiKAAAIIIECA2QEEEEAAAQQEBAiwADojEUAAAQQQIMDsAAIIIIAAAgICBFgAnZEIIIAAAggQYHYAAQQQQAABAQECLIDOSAQQQAABBAgwO4AAAggggICAAAEWQGckAggggAACBJgdQAABBBBAQECAAAugMxIBBBBAAAECzA4ggAACCCAgIECABdAZiQACCCCAAAFmBxBAAAEEEBAQIMAC6IxEAAEEEECAALMDCCCAAAIICAgQYAF0RiKAAAIIIECA2QEEEEAAAQQEBAiwADojEUAAAQQQIMDsAAIIIIAAAgICBFgAnZEIIIAAAggQYHYAAQQQQAABAQECLIDOSAQQQAABBAgwO4AAAggggICAAAEWQGckAggggAACBJgdQAABBBBAQECAAAugMxIBBBBAAAECzA4ggAACCCAgIECABdAZiQACCCCAAAFmBxBAAAEEEBAQIMAC6IxEAAEEEECAALMDCCCAAAIICAgQYAF0RiKAAAIIIECA2QEEEEAAAQQEBAiwADojEUAAAQQQIMDsAAIIIIAAAgICBFgAnZEIIIAAAggQYHYAAQQQQAABAQECLIDOSAQQQAABBAgwO4AAAggggICAAAEWQGckAggggAACBJgdQAABBBBAQECAAAugMxIBBBBAAAECzA4ggAACCCAgIECABdAZiQACCCCAAAFmBxBAAAEEEBAQIMAC6IxEAAEEEECAALMDCCCAAAIICAgQYAF0RiKAAAIIIECA2QEEEEAAAQQEBAiwADojEUAAAQQQIMDsAAIIIIAAAgICBFgAnZEIIIAAAggQYHYAAQQQQAABAQECLIDOSAQQQAABBAgwO4AAAggggICAAAEWQGckAggggAACBJgdQAABBBBAQECAAAugMxIBBBBAAAECzA4ggAACCCAgIECABdAZiQACCCCAAAFmBxBAAAEEEBAQIMAC6IxEAAEEEECAALMDCCCAAAIICAgQYAF0RiKAAAIIIECA2QEEEEAAAQQEBAiwADojEUAAAQQQIMDsAAIIIIAAAgICBFgAnZEIIIAAAggQYHYAAQQQQAABAQECLIDOSAQQQAABBAgwO4AAAggggICAAAEWQGckAggggAACBJgdQAABBBBAQECAAAugMxIBBBBAAAECzA4ggAACCCAgIECABdAZiQACCCCAAAFmBxBAAAEEEBAQIMAC6IxEAAEEEECAALMDCCCAAAIICAgQYAF0RiKAAAIIIECA2QEEEEAAAQQEBAiwADojEUAAAQQQIMDsAAIIIIAAAgICBFgAnZEIIIAAAggQYHYAAQQQQAABAQECLIDOSAQQQAABBAgwO4AAAggggICAAAEWQGckAggggAACBJgdQAABBBBAQECAAAugMxIBBBBAAAECzA4ggAACCCAgIECABdAZiQACCCCAAAFmBxBAAAEEEBAQIMAC6IxEAAEEEECAALMDCCCAAAIICAgQYAF0RiKAAAIIIECA2QEEEEAAAQQEBAiwADojEUAAAQQQIMDsAAIIIIAAAgICBFgAnZEIIIAAAggQYHYAAQQQQAABAQECLIDOSAQQQAABBAgwO4AAAggggICAAAEWQGckAggggAACBJgdQAABBBBAQECAAAugMxIBBBBAAAECzA4ggAACCCAgIECABdAZiQACCCCAAAFmBxBAAAEEEBAQIMAC6IxEAAEEEECAALMDCCCAAAIICAgQYAF0RiKAAAIIIECA2QEEEEAAAQQEBAiwADojEUAAAQQQIMDsAAIIIIAAAgICBFgAnZF/LYE3b96E/bXuEfcGAQT+DAEC/GcoM+MvLUCA/9IPL3cOgf8zAQL8f0bLDf9/EdAGuLS0tE5QUJDj5s2bT9SqVeuNuv/Tp0+39/b2zu/du/f93+MxcODAAT/++GOK7nUfPXpU8/HjxzVbtGjx/N/dbkREhEVRUZFhjRo13kyfPj1P9/LHjh1rvHbt2i4VFRV1//a3v12aMGFCwe85TnWd7OzsBsuXL9c8evSo7gcffFAYGhqal5+fr9+6deunWo/fetuXLl2q17FjxycrVqzo0Lhx42fa4zpy5EiTffv2tf7qq6/O/Nbb+r2X0x5D1euPGTOm9+jRo/OSk5PNV69effp9t/1bH5/fcmwbNmwwT0pKsqxTp87LmTNnnnVycnqgrve+76uf7du3r9mmTZus1ePeqlWrh/Pnz79w69atOgkJCW0WLlyYqy5z8ODBpoWFhQZa2/v379cKCQmxLyoqatSqVav74eHhp+rVq/daXTYgIMBh8uTJeV27di1/1zGvXbu2bffu3e85ODg8/C336X/7MsnJycaHDx82rVatWnUvL69rWiM1JygoSBMeHv52XxYvXtxp6NChxep+pKSkNC0tLdU/ePCgue5jmpqa2jgtLc1kwYIFv/yeY504cWJPPz+/vDVr1nSJiYlJe99tEODfo8t1EKgioA3whQsX6js7O09asmTJrmnTpl1VX/fu3dt/6dKlu6ZMmZK/e/duk+LiYoOxY8cWlJeX17x586ZeXl6eoaWlZYXuE1d8fLxp8+bNK6dNm+Z2/vz5uBs3btTdunWrma2t7f2PPvro3pQpUxwePnxYd/369ekXL140TE9Pbzpo0KCblpaWT7SHNn369G4ajeZOXl6ekb29/Z3ExMSO33777U/GxsYv1GVUfCdNmuQeGRm5z8TE5Jmfn18/FxeXXwMCAq7oHtvDhw9rxcXFtbKxsXnQp0+f+2fOnDGsV6/eqyNHjpi4uLiUqlja2tqOiImJSbK0tHzs5eXVLygoKHvhwoUf+Pn5ZWs0mvuvX7+u9ujRo9ouLi53t2zZYlazZs03I0aMKFHHomJ36NCh5v3797/16tWr6sOHDx/89ddfHwgLC+v14MGDetnZ2YnqcoMGDRpQUlLSOCcnJ17XRL0AUMeUnp7epH///qVmZmbPtBZ3796tnZCQYObk5FSm0WjK1deJiYlmVlZWD5Wn7v158+bN/xzDs2fPaurr679SRlevXjVQ92Hr1q0d3N3dr3bo0KHc2dn5gQrAoEGD7jx//rx6Wlpa4+3bt1toH5/r16/rHz582MTV1bXUysrqsQqf9vaePXtWIzU1tVnfvn1v29raVuj+YoWFhVmnpqa2W79+/eFr164ZBAYGumdnZ8esXLmy47u+36BBg1fqNhYuXNi5oKCg4axZs3I2bNhgVVpaapCYmHjM0dFxWFhY2Il+/fqVdevWbfj27dt3a3dm2LBhLr179y6cOXPmr7NmzbJr1KjRMxUg9aInKCiov6Wl5a1t27alvuuXX113yJAhv9rZ2d2vXbv2m8zMzCbDhg0rOXLkiHGDBg1euLq6limbTZs2tTYwMHg5cuTIt497RkZGo6Kionpt27Z9bGFh8US9UKu6Z+oxVXtTUlKib2xs/ExZv3z5svrhw4ebDBgwoEzdRlRUlHlRUVH92rVrv2rUqNFzte8DBw4sVI+H+rm9vf2n0dHRycq3ffv24wYMGHDxm2++OfnJJ5/08/DwuNyiRYtK9Zhu27atQ2Ji4tGkpKRmnTt3flRWVlanVatWT4uKivQuXLjQ0NHR8Z76Pfjll18ajBs3rkjdtu4eHz9+3Ei9qPnhhx+sp0+fnq122c3N7Y7urmoNCTApQeAPClQN8KRJk/qpdx0nTpzYPW7cOOfCwkIjT0/PX2rXrv16586dHe3t7dWTkuWMGTMyQ0ND3fz9/X/avHlz97i4uD3adxfz5s3rcvHiRRONRnMzMjKy782bN791cnIa5uHhcTEhIcFuyZIlRzZs2GBbq1atV4sWLTo1bty4gd7e3ueioqIcc3NzN6snMfVE8eWXX3a6dOlS0/Dw8Ixdu3aZjho1qjAiIqJDWFjYRXWXPT09P3J1db02efLk6+pr9Q6+T58+wxcvXnxI99jGjx8/cNSoUWeSk5MtR44ceSEjI6NlQUGBkaur61U1Ny8vb7ODg4OXra1t8WeffXa5b9++99Q7KkdHx5EBAQHp58+fN87LyzOZNWvWz1u2bLE2Nze///z581oqUiEhIWc/++wzdz8/v6z169f3XLFixSE/Pz+PyMjI3cuXL++pPIODgzOdnJzuDx482P3x48d1T58+vVXXZOvWrZb5+fnqhcilTZs2OeTm5m5R9+v169fVu3fv/qmnp2dOfHy8fVxc3O4xY8YMHjt27Onk5OQOQ4cOzVPHV/X+xMfH7/Tw8PBRxzBv3jwXKyurm3Pnzj0zevToIQsWLDgaEhIy8O9///vxjRs39oyNjd09evToTy5evLilsLBQz8fHZ1Dz5s0fqsdn9uzZZ/z9/Qf6+/tnrVu3znHbtm27RowYMUTd3uTJk8/7+/sP9vf3/zkpKanDnj179tevX/9tQLX/OnXqNObo0aMJJiYm/3Sm433f115PBTg3N9d43LhxFxMTEy0tLCweqMc9Ly/PwMfHZ0i3bt0KzM3NH4aFhb19N6z+TZo0qcfly5ebBQQEZHt4eNysU6fO27M4gwYN6j9t2rQzc+bM6ZeVlZWgp6f39l1x1X/aAKenp7dUO6/RaEp27Nih8fX1/Tk6OtrxxIkT8bNmzephZGRUeePGjQYtW7Ys9/b2vjp16lQ3Ly+vs+vWrevz/fffbw8JCXGpumc//fSTqdqbwMDAk0uXLu174cKFuHXr1rXJzMxsER0dnaGOISgoqJuKdP/+/Yvv37+vdrgsIiLCasWKFWfVz9WLiRo1alQbMmRIwerVq+1KS0sbpKWl7baysvrs3LlzMfb29iPUY6oCbGtrW3r58uXG/fv3L0hOTrbw9va+HBISMmDSpEnpa9as+cDT0zP71KlTZl5eXrmHDx9uU3WPJ0+efDEwMHDAuHHjTq1cufKjqKionTNnzuyvXkDr7qr2xQEB/oNPvlwdgaoBDgoK6vPixYuaUVFRh0aPHj2we/fuhVZWVvcGDhx4c/HixZrKyspaWVlZ7ZctW7Z/8+bNnZOSkg5MnTq1e/PmzSs+//zzPKXZp0+foatWrTrarVu3R+pJQsXt66+/bpeWltbq8uXLzVVI7t27p9+sWbMnwcHBl4KDg+1KSkrUk0qnEydObGrXrl2leke5d+9e0/T09FY7duw4UlFRUVM9uYeGhtp+8cUX59QcFxcX9+nTp5/65JNPSrWPooWFxXjdY1MhSUhI6Nm7d++8e/fuGejr6z9v3rx5uY2NTdmMGTN+tba2Hq1i9/Tp0xrh4eGWR48ebVtQUKBOge6eMWPGxwkJCcmLFy+269Chw73g4ODLrVu39nd0dLysZp45c6aNt7f36X379tl07NjxVm5urun48eOzoqOjHdQTl4uLy+CJEyeeiYuLs7a3t7+hr6//MjExsevp06cTdU3y8/ONrK2ty9SMHj16eCUmJia1adPmqXoXFRQU9OGxY8f2qJnq6xkzZnx4/PjxPeo05KpVq+zNzMwe6t6fLl26jFTHYGdnNzwlJWWHiqD6nnqyjomJsdm7d+9B9diZmJg8VmGvGmBHR8fr6vF59OhRnTdv3lRbtmzZuSlTpnQ3MzMrT0hI0KjbMzIyeuHo6Php27Ztb48fP/6iu7v7bd3fJgsLiwn5+flRv+X7xcXFdf/xj39ojI2NH6sXYfv377eyt7cvLCsrq9e4cePKyMjITHU7c+bM6ZqSktIpJyfnh9WrV7e7cOGC8ZgxYy6pMxsxMTFme/bsaX/u3DnzgICAn3x9fa9rNJqxX3311b4NGzZ07dWrV4F2T98XYDs7u9sBAQHXunTpMkqZDBgwwO3zzz/PrKysrBkdHW3z8OFDvVevXtXQaDQ31LvWJUuWXFCP84gRI84vWrRooO6eafdmyJAhrpMnT84JDw/vvmbNmmPqbII6BrX/6t2++uhHvVhTsV2wYEEX7Z7n5uYa+Pr6uqnfxe7du5du3LhRs3LlyqPTpk1zycjI2Kl9TMPCwlwMDQ0rMzMzt6t3ttoAx8TEWKvfIe2eL1261KqsrEx/+/btDlX3WMW5evXq1dRcV1fXQXPmzMnSBlh3V7Wntgkw/UDgDwroBtjb2zs3Nja2i5WVVWmdOnVeqwDv2rXLauzYseeGDRt2w9ra2nf58uU/RkVF2aakpOyfMGGCo42Nzd2ZM2de+e8wDl60aFG6ehdpbm7ul5KSEv/pp58Ozc7O/sHX17eXpaWlenepp57gX7x4UePKlSuN1edMNjY2o3ft2rVDe0pRvQNXQbpy5YpRZWVl7Z49e94wNTV9MmzYsFvaJ+IbN24Ybtmy5e1nVNHR0a1jY2M7+/v7n616bKampuX79+/vdPDgwV3qNKK+vv7roKAgB/VEq06tq7mZmZnx69ats5g9e/bb+6BOnd65c8cgOzu7lTbAVS+fnp7+g7qcur3169e3Ky4uNly2bNmZJ0+e1FCnyDUazQhtgCMjI4+oFzN169Z9ceDAgaRevXp5xcbG7tM1uXbtWqP27dvfU4FQ0Tx48OB2dVtXr17VHzFihHtWVtY2dTq1Vq1ar4ODg13UE21iYmLL+Pj4Tk2bNn1c9fhUOKoG+Oeff05U7/y0T9Zan4kTJzp26tTpblRUVI+cnJy4s2fPGk6dOrWfNsDqdOnt27frRUREnPb19XXWaDQqAA7q9tQ7zIqKihqnT59uGBgYOHDjxo1JPXv2/KfPUD/88MMhw4cPP689S6E+zwwJCbno4+MzQPf7U6dOzcvJyWloaGj44vjx4y3UjkRERJxSzuqFVX5+/kb1v9V9jo2Ntd69e/ehkydPNiwuLtZ3cHBQ8W2rPrdXl1Ev4EaNGuXu4uJy+ezZsy1tbGxK1bvMEydOWGZnZyf8u3fADg4Ot/z9/a9r/dzc3NxCQ0Oz1Lv9w4cPJxw9etR406ZNtk5OToXqBal6p6pOjU+bNi1z1apVTu/bM/W57PLlyx2ePHlSV/tiSh2H+jsLJyenm+qFg/raw8Pj13PnzjVWYdcepzqWhg0bPj506NDeuXPn2p0/f76ls7PzdXUZ7WO6cuVKR/ViMzQ0NEO9k9YGOD4+3kqdmtbeny+++MJKPaYHDhywrrrHERERHcvLy+uEh4dn9+rVyyMsLCxNBXjr1q27dXdV+zk8Af6DT75cHQHdAKekpPxoamo6OS0t7ftVq1bZqACfO3fOODc3t3mzZs0eXbp0qaW7u/uFXbt2de3Ro0f+mTNnzFNTUxO1n82qP6755ptvnNq3b1+aneGrojcAAAQGSURBVJ1tcfLkyc09evQYbW9vn//kyZM6d+/eNfT19c1Wl5kwYUJWZGSkk7W1dXFRUVFjBweHAvVkrx4V9fnad999Z2VqalqhnhiMjIyean/x1c9VHNzc3AapU7p6enrPKyoq9BISEvadOnXKaMGCBf2qHtv48eM/VOFSp+/mz5+ftnPnzna6wVJPtE+fPq3dsGHDyuLi4sbffffdjytWrNA8ePBAz9TU9JH28vPnz++cnp7eRk9P74Wtre3N0NDQXFdXV482bdqUlZSUNNqzZ8++jz/+eJi7u3tuRkaGuQpwVFRUe3VaXr3rVJ/pHThwYKeuiZWV1a38/PwmJiYm5aWlpYbHjh3bq91OdWzq3VFhYWGTAwcObPfz8+trYGDwvKCgoMmXX36ZGhcX10H3/tjZ2fmoY1DvzqsGeN68eccWL178Ubdu3a7n5OS0PnLkyNYZM2Y43rx5U51afXjlyhWTCRMmnFaPz/r165MDAwNdLS0tb1+9etU4NTV1p7Oz86fq9tRnwz4+PkM7depUos5sJCUl7fb09HTPyMjYoT1uFUJ1mUaNGj1WZ1batGlzNzY29sT7vq+9njoFHRcX59C6des7lZWVdXr06KFOv77di6oBrvrbO3fu3K7q4xEzM7P7JSUlRmPHjs1es2ZNr+PHj/+g3c3evXt7LFu27FhwcPBHVY+z6ino9wVYXcfU1PS+oaHhs/T09A5r167dqz5b7ty5c/HZs2fN16xZk7x69epu79szdazqxd7YsWOz5syZ8/YMivqnPm6ZPXu2fdOmTSvVZ67l5eV1IyIiTlb9w7/hw4f3VR9PZGVlbc/MzGzYp0+fKZcuXVqpzpBoA6xOQa9cuTLDzc3NKzAw8Kfjx4+3Vqeg3xdgtT9V93jChAm/Dh061LNz585F6gzC6tWrk4ODg12PHj26VXdXtXYEmH4g8AcFfuv/DUk9UTRs2PCl+kwyMTGxxY4dOyw3btyYpv7SVMWh6mGod4J6enrqdNrb76t3iiqY6rLqv+rJRV1Gfa3+4rZ+/fpvb0P7s6q3pX6u/eOcd91VdTvqj4GMjIxeap+gt23b9i/H9p9uR11XnYZWf53dpEmTt3/opf5pj7PqbHU5dbzazxm1T6TKR/viQL3jqvpz3WPXNZk4caKTs7NziY+PT/G77q/6TFp7H3XnvctFWf67Y1Cn9as+dtrH9133W3e29jJqF0pLS2tr/zpdfQ4bGRmZpXs86voGBgavdD3e9/3fu9K6x/O+2wkICOixdu3afznO/zRXa6Rs1R8mbdu2rZX6GKNnz56eO3fu3Kv+cO59e6au27dvXy/1OfS79uJdO/WfjueP/lx3pvJ7+vTp29/Tqrf9rt9f9fP/Ai7HWXNgGxGhAAAAAElFTkSuQmCC" id="2"/></wear><costumes><list struct="atomic" id="3"></list></costumes><sounds><list struct="atomic" id="4"></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="255,0,0,1" pen="tip" id="9"><costumes><list struct="atomic" id="10"></list></costumes><sounds><list struct="atomic" id="11"></list></sounds><blocks></blocks><variables></variables><scripts><script x="20" y="20"><block s="receiveGo"></block><block s="bubble"><l>Press E to expot the block data.</l></block></script><script x="20" y="94"><block s="receiveKey"><l><option>e</option></l></block><custom-block s="redirect to %s"><l>http://www.mediafire.com/file/ni0lf8wthm3lkzi/Custom+Blocks+blocks.xml/file</l></custom-block></script></scripts></sprite><watcher scope="Sprite" s="getScale" style="normal" x="10" y="31.000001999999995" color="143,86,227" hidden="true"/><watcher scope="Sprite" s="reportShown" style="normal" x="10" y="52.00000399999999" color="143,86,227" hidden="true"/><watcher scope="Sprite" s="getCostumeIdx" style="normal" x="10" y="76.00000599999998" color="143,86,227" hidden="true"/><watcher scope="Sprite" s="getPan" style="normal" x="10" y="97.00000799999998" color="207,74,217" hidden="true"/><watcher scope="Sprite" s="getPenDown" style="normal" x="8" y="8.000009999999975" color="0,161,120" hidden="true"/></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="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="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="%&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="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="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="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="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="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="%n" 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="-- %n"><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="-- %n"><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="-- %n"><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="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; 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="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><block-definition s="-/+ %&apos;num&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doReport"><block s="reportDifference"><block s="reportDifference"><block var="num"/><block var="num"/></block><block var="num"/></block></block></script></block-definition><block-definition s="if %&apos;decide1&apos; %&apos;if&apos; else if %&apos;decide2&apos; %&apos;else&apos; otherwise %&apos;otherwise&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%boolUE"></input><input type="%cs"></input><input type="%boolUE"></input><input type="%cs"></input><input type="%cs"></input></inputs><script><block s="doIfElse"><block var="decide1"/><script><block s="doRun"><block var="if"/><list></list></block></script><script><block s="doIfElse"><block var="decide2"/><script><block s="doRun"><block var="else"/><list></list></block></script><script><block s="doRun"><block var="otherwise"/><list></list></block></script></block></script></block></script></block-definition><block-definition s="store key: %&apos;key&apos; value: %&apos;value&apos; in browser" type="command" category="other"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>key</l><l>value</l><l>proc</l></list><l>proc.assertType(key, [&apos;text&apos;, &apos;number&apos;]);&#xD;proc.assertType(value, [&apos;text&apos;, &apos;number&apos;]);&#xD;window.localStorage.setItem(&apos;-snap-project-&apos; + key, &apos;&apos; + value);</l></block><list><block var="key"/><block var="value"/></list></block></script></block-definition><block-definition s="stored data in browser" 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>var str = window.localStorage,&#xD;    len = str.length,&#xD;    result = [],&#xD;    key,&#xD;    i;&#xD;for (i = 0; i &lt; len; i += 1) {&#xD;  key = str.key(i);&#xD;  if (key.startsWith(&apos;-snap-project-&apos;)) {&#xD;    result.push(new List([key.slice(14), str.getItem(key)]));&#xD;  }&#xD;}&#xD;return new List(result);</l></block><list></list></block></block></script></block-definition><block-definition s="remove key: %&apos;key&apos; in browser" type="command" category="other"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>key</l><l>proc</l></list><l>proc.assertType(key, [&apos;text&apos;, &apos;number&apos;]);&#xD;window.localStorage.removeItem(&apos;-snap-project-&apos; + key);</l></block><list><block var="key"/></list></block></script></block-definition><block-definition s="clear data in browser" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doWarp"><script><block s="doForEach"><l>item</l><custom-block s="stored data in browser"></custom-block><script><custom-block s="remove key: %s in browser"><block s="reportListItem"><l>1</l><block var="item"/></block></custom-block></script></block></script></block></script></block-definition><block-definition s="get value from key: %&apos;key&apos; in browser" type="reporter" category="other"><comment x="0" y="0" w="199.33333333333334" collapsed="false">Reports the value previously stored under&#xD;the input key in the browser&apos;s local storage.&#xD;Reports False if the key is not found.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>key</l></list><l>var str = window.localStorage,&#xD;    result = str.getItem(&apos;-snap-project-&apos;+key);&#xD;if (!result) {&#xD;   return false;&#xD;}&#xD;return result;</l></block><list><block var="key"/></list></block></block></script></block-definition><block-definition s="$brush set pen to crayon %&apos;which&apos;" type="command" category="pen"><comment x="0" y="0" w="297.3333333333333" collapsed="false">Reports one of 100 preselected colors, like a box of 100 crayons.&#xD;The colors have names that are meant to be evocative.&#xD;They are organized in families, more or less corresponding&#xD;to spectral (rainbow) colors; the input slot has a two-level menu&#xD;in which you can hover over a family name to see the colors&#xD;of that family, each including a crayon number and an RGB value. &#xD;See Appendix A of the Snap! Reference Manual for more details.</comment><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 cinnamon #b87333=38&#xD;39 copper #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=54&#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;purples={&#xD;90 violet #8000ff=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><custom-block s="✐ initialize variables"></custom-block><block s="doSetVar"><l>✐ last crayon</l><block var="which"/></block><block s="doSetVar"><l>✐ last set as</l><l>crayon</l></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><block s="doIf"><block s="reportNot"><custom-block s="does var %s exist?"><l>✐ crayon colors</l></custom-block></block><script><custom-block s="create %s var %mult%txt"><l>global</l><list><l>✐ crayon colors</l></list></custom-block><block s="doSetVar"><l>✐ crayon colors</l><block s="reportNewList"><list><block s="reportNewList"><list><l>0</l><l>0</l><l>0</l></list></block><block s="reportNewList"><list><l>18</l><l>18</l><l>18</l></list></block><block s="reportNewList"><list><l>36</l><l>36</l><l>36</l></list></block><block s="reportNewList"><list><l>54</l><l>54</l><l>54</l></list></block><block s="reportNewList"><list><l>72</l><l>72</l><l>72</l></list></block><block s="reportNewList"><list><l>92</l><l>92</l><l>92</l></list></block><block s="reportNewList"><list><l>109</l><l>109</l><l>109</l></list></block><block s="reportNewList"><list><l>127</l><l>127</l><l>127</l></list></block><block s="reportNewList"><list><l>145</l><l>145</l><l>145</l></list></block><block s="reportNewList"><list><l>163</l><l>163</l><l>163</l></list></block><block s="reportNewList"><list><l>181</l><l>181</l><l>181</l></list></block><block s="reportNewList"><list><l>200</l><l>200</l><l>200</l></list></block><block s="reportNewList"><list><l>218</l><l>218</l><l>218</l></list></block><block s="reportNewList"><list><l>236</l><l>236</l><l>236</l></list></block><block s="reportNewList"><list><l>255</l><l>255</l><l>255</l></list></block><block s="reportNewList"><list><l>255</l><l>20</l><l>147</l></list></block><block s="reportNewList"><list><l>255</l><l>105</l><l>180</l></list></block><block s="reportNewList"><list><l>255</l><l>0</l><l>127</l></list></block><block s="reportNewList"><list><l>227</l><l>11</l><l>93</l></list></block><block s="reportNewList"><list><l>229</l><l>43</l><l>80</l></list></block><block s="reportNewList"><list><l>255</l><l>0</l><l>0</l></list></block><block s="reportNewList"><list><l>144</l><l>0</l><l>32</l></list></block><block s="reportNewList"><list><l>153</l><l>0</l><l>0</l></list></block><block s="reportNewList"><list><l>164</l><l>0</l><l>0</l></list></block><block s="reportNewList"><list><l>192</l><l>0</l><l>0</l></list></block><block s="reportNewList"><list><l>128</l><l>0</l><l>0</l></list></block><block s="reportNewList"><list><l>201</l><l>0</l><l>22</l></list></block><block s="reportNewList"><list><l>217</l><l>77</l><l>17</l></list></block><block s="reportNewList"><list><l>255</l><l>8</l><l>0</l></list></block><block s="reportNewList"><list><l>255</l><l>56</l><l>0</l></list></block><block s="reportNewList"><list><l>139</l><l>69</l><l>19</l></list></block><block s="reportNewList"><list><l>123</l><l>63</l><l>0</l></list></block><block s="reportNewList"><list><l>107</l><l>68</l><l>35</l></list></block><block s="reportNewList"><list><l>112</l><l>66</l><l>20</l></list></block><block s="reportNewList"><list><l>149</l><l>69</l><l>53</l></list></block><block s="reportNewList"><list><l>101</l><l>67</l><l>33</l></list></block><block s="reportNewList"><list><l>150</l><l>75</l><l>0</l></list></block><block s="reportNewList"><list><l>153</l><l>101</l><l>21</l></list></block><block s="reportNewList"><list><l>184</l><l>115</l><l>51</l></list></block><block s="reportNewList"><list><l>210</l><l>105</l><l>30</l></list></block><block s="reportNewList"><list><l>255</l><l>127</l><l>0</l></list></block><block s="reportNewList"><list><l>255</l><l>88</l><l>0</l></list></block><block s="reportNewList"><list><l>255</l><l>117</l><l>24</l></list></block><block s="reportNewList"><list><l>243</l><l>118</l><l>29</l></list></block><block s="reportNewList"><list><l>232</l><l>97</l><l>0</l></list></block><block s="reportNewList"><list><l>204</l><l>85</l><l>0</l></list></block><block s="reportNewList"><list><l>203</l><l>65</l><l>11</l></list></block><block s="reportNewList"><list><l>204</l><l>119</l><l>34</l></list></block><block s="reportNewList"><list><l>237</l><l>145</l><l>33</l></list></block><block s="reportNewList"><list><l>242</l><l>133</l><l>0</l></list></block><block s="reportNewList"><list><l>255</l><l>255</l><l>0</l></list></block><block s="reportNewList"><list><l>230</l><l>168</l><l>34</l></list></block><block s="reportNewList"><list><l>184</l><l>134</l><l>11</l></list></block><block s="reportNewList"><list><l>218</l><l>165</l><l>32</l></list></block><block s="reportNewList"><list><l>244</l><l>196</l><l>48</l></list></block><block s="reportNewList"><list><l>236</l><l>213</l><l>64</l></list></block><block s="reportNewList"><list><l>255</l><l>219</l><l>88</l></list></block><block s="reportNewList"><list><l>255</l><l>215</l><l>0</l></list></block><block s="reportNewList"><list><l>254</l><l>227</l><l>62</l></list></block><block s="reportNewList"><list><l>251</l><l>225</l><l>8</l></list></block><block s="reportNewList"><list><l>0</l><l>255</l><l>0</l></list></block><block s="reportNewList"><list><l>141</l><l>182</l><l>0</l></list></block><block s="reportNewList"><list><l>98</l><l>194</l><l>19</l></list></block><block s="reportNewList"><list><l>34</l><l>139</l><l>34</l></list></block><block s="reportNewList"><list><l>0</l><l>128</l><l>0</l></list></block><block s="reportNewList"><list><l>0</l><l>100</l><l>0</l></list></block><block s="reportNewList"><list><l>3</l><l>192</l><l>60</l></list></block><block s="reportNewList"><list><l>80</l><l>200</l><l>120</l></list></block><block s="reportNewList"><list><l>62</l><l>180</l><l>137</l></list></block><block s="reportNewList"><list><l>0</l><l>161</l><l>120</l></list></block><block s="reportNewList"><list><l>0</l><l>255</l><l>255</l></list></block><block s="reportNewList"><list><l>0</l><l>139</l><l>139</l></list></block><block s="reportNewList"><list><l>0</l><l>123</l><l>167</l></list></block><block s="reportNewList"><list><l>113</l><l>166</l><l>210</l></list></block><block s="reportNewList"><list><l>4</l><l>148</l><l>220</l></list></block><block s="reportNewList"><list><l>0</l><l>128</l><l>128</l></list></block><block s="reportNewList"><list><l>135</l><l>206</l><l>250</l></list></block><block s="reportNewList"><list><l>0</l><l>191</l><l>255</l></list></block><block s="reportNewList"><list><l>30</l><l>144</l><l>255</l></list></block><block s="reportNewList"><list><l>0</l><l>127</l><l>255</l></list></block><block s="reportNewList"><list><l>0</l><l>0</l><l>255</l></list></block><block s="reportNewList"><list><l>25</l><l>25</l><l>112</l></list></block><block s="reportNewList"><list><l>0</l><l>51</l><l>153</l></list></block><block s="reportNewList"><list><l>0</l><l>71</l><l>171</l></list></block><block s="reportNewList"><list><l>21</l><l>96</l><l>189</l></list></block><block s="reportNewList"><list><l>0</l><l>0</l><l>128</l></list></block><block s="reportNewList"><list><l>70</l><l>130</l><l>180</l></list></block><block s="reportNewList"><list><l>74</l><l>108</l><l>212</l></list></block><block s="reportNewList"><list><l>100</l><l>149</l><l>237</l></list></block><block s="reportNewList"><list><l>106</l><l>90</l><l>205</l></list></block><block s="reportNewList"><list><l>128</l><l>0</l><l>255</l></list></block><block s="reportNewList"><list><l>143</l><l>86</l><l>227</l></list></block><block s="reportNewList"><list><l>111</l><l>45</l><l>168</l></list></block><block s="reportNewList"><list><l>75</l><l>0</l><l>130</l></list></block><block s="reportNewList"><list><l>160</l><l>32</l><l>240</l></list></block><block s="reportNewList"><list><l>255</l><l>0</l><l>255</l></list></block><block s="reportNewList"><list><l>153</l><l>50</l><l>204</l></list></block><block s="reportNewList"><list><l>207</l><l>74</l><l>217</l></list></block><block s="reportNewList"><list><l>127</l><l>0</l><l>127</l></list></block><block s="reportNewList"><list><l>139</l><l>0</l><l>139</l></list></block></list></block></block></script></block><block s="doDeclareVariables"><list><l>color</l></list></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="✐ crayon 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="set pen color to r: %&apos;r&apos; g: %&apos;g&apos; b: %&apos;b&apos;" type="command" category="pen"><comment x="0" y="0" w="220.66666666666666" collapsed="false">Takes three inputs for red, green, and blue&#xD;values, each between 0 and 255.  0,0,0 is black; 255,255,255 is white.  255,255,0 is yellow, and so on.&#xD;&#xD;The SET PEN block in this library lets you set individual red, green, or blue without changing the others, lets you provide a list of three RGB color components, and lets you provide a six-digit hexadecimal number, the form in which RGB color values are usually found online.&#xD;&#xD;See Appendix A of the Snap! Reference Manual for details.</comment><header></header><code></code><translations>pt:altera a cor da tua caneta para vermelho _ , verde _ e azul _ (0 a 255)&#xD;</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="set pen color to h: %&apos;h&apos; s: %&apos;s&apos; v: %&apos;v&apos;" type="command" category="pen"><comment x="0" y="0" w="283.3333333333333" collapsed="false">Takes three inputs for hue, saturation, and value (&quot;brightness&quot;)&#xD;values, each between 0 and 1.  0,0,0 is black; 0,0,1 is white.  0.15,1,1 is yellow, and so on.&#xD;&#xD;The SET PEN block in this library lets you set individual hue, saturation, or value without changing the others, lets you provide a list of three HSV color components, and lets you&#xD;use the very much superior HSL (hue, saturation, lightness)&#xD;color space.&#xD;&#xD;See Appendix A of the Snap! Reference Manual for details.</comment><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="RGB color" type="reporter" category="pen"><comment x="0" y="0" w="266" collapsed="false">Reports the current pen color as a list of three RGB values in the range 0-255.  The PEN block in this library provides a large set of ways to examine the color.&#xD;&#xD;See Appendix A in the Snap! Reference Manual for details.</comment><header></header><code></code><translations>pt:a cor da caneta em RGB (vermelho, verde e azul; 0 a 255)&#xD;</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="HSV color" type="reporter" category="pen"><comment x="0" y="0" w="312" collapsed="false">Reports the current pen color as a list of three HSV values&#xD;in the range 0-1.&#xD;&#xD;See Appendix A in the Snap! Reference Manual for details.</comment><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="$brush set pen %&apos;dimension&apos; to %&apos;value&apos;" type="command" category="pen"><comment x="0" y="0" w="265.3333333333333" collapsed="false">This block allows you to set the pen&apos;s color, transparency (on a scale from 0=opaque to 100=invisible), or size (in pixels).  The color can be set in many ways, including RGB values, HSV values, HSL values, fair HSV or HSL (based on a modified spectrum that gives each spectral color equal space and promotes brown to a color), or X11/W3C color name.&#xD;&#xD;See Appendix A in the Snap! Reference Manual for details.</comment><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true"><options>size&#xD;color&#xD;fair hue&#xD;transparency&#xD;X11/W3C name&#xD;(3D color spaces)={&#xD;fair HSL={&#xD;fair hue&#xD;fair saturation (HSL)&#xD;fair lightness&#xD;fair HSL vector&#xD;}&#xD;fair HSV={&#xD;fair hue&#xD;fair saturation (HSV)&#xD;fair value (brightness)&#xD;fair HSV vector&#xD;}&#xD;HSL={&#xD;hue&#xD;saturation (HSL)&#xD;lightness&#xD;HSL vector&#xD;}&#xD;HSV={&#xD;hue&#xD;saturation (HSV)&#xD;value (brightness)&#xD;HSV vector&#xD;}&#xD;RGB (0-255)={&#xD;red&#xD;green&#xD;blue&#xD;RGB vector&#xD;RGB hex&#xD;}&#xD;}</options></input><input type="%s"></input></inputs><script><custom-block s="✐ initialize variables"></custom-block><block s="doDeclareVariables"><list><l>colors</l><l>brights</l><l>index</l><l>scale</l><l>oldHSV</l><l>newHSV</l><l>color</l><l>pivots</l></list></block><block s="doSetVar"><l>colors</l><block s="reportNewList"><list><block s="reportNewList"><list><l>0</l><l>0</l><l>0</l></list></block><block s="reportNewList"><list><l>128</l><l>128</l><l>128</l></list></block><block s="reportNewList"><list><l>192</l><l>192</l><l>192</l></list></block><block s="reportNewList"><list><l>255</l><l>255</l><l>255</l></list></block><block s="reportNewList"><list><l>255</l><l>0</l><l>0</l></list></block><block s="reportNewList"><list><l>85</l><l>0</l><l>0</l></list></block><block s="reportNewList"><list><l>139</l><l>69</l><l>19</l></list></block><block s="reportNewList"><list><l>70</l><l>5</l><l>0</l></list></block><block s="reportNewList"><list><l>255</l><l>127</l><l>0</l></list></block><block s="reportNewList"><list><l>140</l><l>60</l><l>0</l></list></block><block s="reportNewList"><list><l>255</l><l>255</l><l>0</l></list></block><block s="reportNewList"><list><l>114</l><l>93</l><l>0</l></list></block><block s="reportNewList"><list><l>0</l><l>255</l><l>0</l></list></block><block s="reportNewList"><list><l>0</l><l>30</l><l>0</l></list></block><block s="reportNewList"><list><l>0</l><l>255</l><l>255</l></list></block><block s="reportNewList"><list><l>0</l><l>50</l><l>50</l></list></block><block s="reportNewList"><list><l>0</l><l>0</l><l>255</l></list></block><block s="reportNewList"><list><l>0</l><l>0</l><l>64</l></list></block><block s="reportNewList"><list><l>80</l><l>0</l><l>90</l></list></block><block s="reportNewList"><list><l>255</l><l>0</l><l>255</l></list></block><block s="reportNewList"><list><l>0</l><l>0</l><l>0</l></list></block></list></block></block><block s="doSetVar"><l>brights</l><block s="reportNewList"><list><block s="reportNewList"><list><l>255</l><l>0</l><l>0</l></list></block><block s="reportNewList"><list><l>170</l><l>20</l><l>0</l></list></block><block s="reportNewList"><list><l>139</l><l>69</l><l>19</l></list></block><block s="reportNewList"><list><l>170</l><l>90</l><l>0</l></list></block><block s="reportNewList"><list><l>255</l><l>127</l><l>0</l></list></block><block s="reportNewList"><list><l>255</l><l>160</l><l>0</l></list></block><block s="reportNewList"><list><l>255</l><l>255</l><l>0</l></list></block><block s="reportNewList"><list><l>190</l><l>255</l><l>0</l></list></block><block s="reportNewList"><list><l>0</l><l>255</l><l>0</l></list></block><block s="reportNewList"><list><l>0</l><l>240</l><l>200</l></list></block><block s="reportNewList"><list><l>0</l><l>255</l><l>255</l></list></block><block s="reportNewList"><list><l>0</l><l>127</l><l>255</l></list></block><block s="reportNewList"><list><l>0</l><l>0</l><l>255</l></list></block><block s="reportNewList"><list><l>60</l><l>0</l><l>255</l></list></block><block s="reportNewList"><list><l>128</l><l>0</l><l>255</l></list></block><block s="reportNewList"><list><l>255</l><l>0</l><l>255</l></list></block><block s="reportNewList"><list><l>255</l><l>0</l><l>64</l></list></block><block s="reportNewList"><list><l>255</l><l>0</l><l>0</l></list></block></list></block></block><block s="doSetVar"><l>pivots</l><block s="reportNewList"><list><l>0</l><l>5.8</l><l>12.5</l><l>18</l><l>25</l><l>30.5</l><l>37.5</l><l>44.5</l><l>50</l><l>59</l><l>62.5</l><l>69</l><l>75</l><l>79.25</l><l>87.5</l><l>93.75</l><l>97</l><l>100</l></list></block></block><block s="doIfElse"><block s="reportListContainsItem"><block s="reportNewList"><list><l>color</l><l>hue</l><l>fair hue</l></list></block><block var="dimension"/></block><script><block s="doSetVar"><l>value</l><block s="reportModulus"><block var="value"/><l>100</l></block></block></script><script><block s="doIfElse"><block s="reportListContainsItem"><block s="reportNewList"><list><l>red</l><l>green</l><l>blue</l></list></block><block var="dimension"/></block><script><block s="doIf"><block s="reportLessThan"><block var="value"/><l>0</l></block><script><block s="doSetVar"><l>value</l><l>0</l></block></script></block><block s="doIf"><block s="reportGreaterThan"><block var="value"/><l>255</l></block><script><block s="doSetVar"><l>value</l><l>255</l></block></script></block></script><script><block s="doIf"><block s="reportListContainsItem"><block s="reportNewList"><list><l>saturation (HSV)</l><l>saturation (HSL)</l><l>value (brightness)</l><l>lightness</l><l>fair saturation (HSV)</l><l>fair saturation (HSL)</l><l>fair value (brightness)</l><l>fair lightness</l><l>transparency</l></list></block><block var="dimension"/></block><script><block s="doIf"><block s="reportLessThan"><block var="value"/><l>0</l></block><script><block s="doSetVar"><l>value</l><l>0</l></block></script></block><block s="doIf"><block s="reportGreaterThan"><block var="value"/><l>100</l></block><script><block s="doSetVar"><l>value</l><l>100</l></block></script></block></script><comment w="164.66666666666666" collapsed="false">We have to do this last test to rule out the vector options, which aren&apos;t numbers; their code makes three recursive calls and we catch range issues then.</comment></block></script></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>size</l></block><script><block s="setSize"><block var="value"/></block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>hue</l></block><script><block s="setPenHSVA"><l><option>hue</option></l><block var="value"/></block><block s="doIf"><block s="reportEquals"><block var="✐ last set as"/><l>HSL</l></block><script><block s="doReplaceInList"><l>1</l><block var="✐ HSL"/><block var="value"/></block><custom-block s="✐ update HSV"></custom-block></script></block><block s="doIf"><block s="reportNot"><block s="reportListContainsItem"><block s="reportNewList"><list><l>HSL</l><l>HSV</l></list></block><block var="✐ last set as"/></block></block><script><block s="doSetVar"><l>✐ last set as</l><l>HSV</l></block></script></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><custom-block s="✐ make integer RGB"></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>saturation (HSV)</l></block><script><block s="setPenHSVA"><l><option>saturation</option></l><block var="value"/></block><block s="doReplaceInList"><l>2</l><block var="✐ raw HSV"/><block var="value"/></block><block s="doSetVar"><l>✐ last set as</l><l>HSV</l></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><custom-block s="✐ make integer RGB"></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>value (brightness)</l></block><script><block s="setPenHSVA"><l><option>brightness</option></l><block var="value"/></block><block s="doReplaceInList"><l>3</l><block var="✐ raw HSV"/><block var="value"/></block><block s="doSetVar"><l>✐ last set as</l><l>HSV</l></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><custom-block s="✐ make integer RGB"></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>transparency</l></block><script><block s="setPenHSVA"><l><option>transparency</option></l><block var="value"/></block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>red</l></block><script><block s="doRun"><block s="reifyScript"><script><custom-block s="set pen color to r: %n g: %n b: %n"><custom-block s="min %s %s"><block s="reportRound"><block s="reportListItem"><l>1</l><block s="reportNewList"><list><block var="value"/><l></l></list></block></block></block><l>255</l></custom-block><l></l><l></l></custom-block></script><list></list></block><custom-block s="RGB color"></custom-block></block><block s="doSetVar"><l>✐ last set as</l><l>RGB</l></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>green</l></block><script><block s="doRun"><block s="reifyScript"><script><custom-block s="set pen color to r: %n g: %n b: %n"><l></l><custom-block s="min %s %s"><block s="reportRound"><block s="reportListItem"><l>1</l><block s="reportNewList"><list><block var="value"/><l></l></list></block></block></block><l>255</l></custom-block><l></l></custom-block></script><list></list></block><custom-block s="RGB color"></custom-block></block><block s="doSetVar"><l>✐ last set as</l><l>RGB</l></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>blue</l></block><script><block s="doRun"><block s="reifyScript"><script><custom-block s="set pen color to r: %n g: %n b: %n"><l></l><l></l><custom-block s="min %s %s"><block s="reportRound"><block s="reportListItem"><l>1</l><block s="reportNewList"><list><block var="value"/><l></l></list></block></block></block><l>255</l></custom-block></custom-block></script><list></list></block><custom-block s="RGB color"></custom-block></block><block s="doSetVar"><l>✐ last set as</l><l>RGB</l></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair hue</l></block><script><block s="doSetVar"><l>oldHSV</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportProduct"><l>100</l><l></l></block></autolambda><list></list></block><custom-block s="HSV color"></custom-block></block></block><block s="doIf"><block s="reportNot"><block s="reportListContainsItem"><block s="reportNewList"><list><l>HSL</l><l>HSV</l></list></block><block var="✐ last set as"/></block></block><script><block s="doSetVar"><l>✐ raw HSV</l><block s="reportNewList"><list><l>0</l><l>100</l><l>100</l></list></block></block><block s="doSetVar"><l>oldHSV</l><block s="reportNewList"><list><l>0</l><l>100</l><l>100</l></list></block></block></script></block><block s="doSetVar"><l>value</l><block s="reportModulus"><block var="value"/><l>100</l></block></block><block s="doSetVar"><l>color</l><block s="reportProduct"><block var="value"/><l>3.6</l></block></block><block s="doSetVar"><l>index</l><l>1</l></block><block s="doUntil"><block s="reportGreaterThan"><block s="reportListItem"><block var="index"/><block var="pivots"/></block><block var="value"/></block><script><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doChangeVar"><l>index</l><l>-1</l></block><block s="doSetVar"><l>scale</l><block s="reportQuotient"><block s="reportDifference"><block var="value"/><block s="reportListItem"><block var="index"/><block var="pivots"/></block></block><block s="reportDifference"><block s="reportListItem"><block s="reportSum"><block var="index"/><l>1</l></block><block var="pivots"/></block><block s="reportListItem"><block var="index"/><block var="pivots"/></block></block></block></block><block s="doRun"><block s="reifyScript"><script><custom-block s="set pen color to r: %n g: %n b: %n"><l></l><l></l><l></l></custom-block></script><list></list></block><custom-block s="mmap %repRing over %mult%l"><block s="reifyReporter"><autolambda><custom-block s="min %s %s"><block s="reportRound"><block s="reportSum"><block var="from"/><block s="reportProduct"><block s="reportDifference"><block var="to"/><block var="from"/></block><block var="scale"/></block></block></block><l>255</l></custom-block></autolambda><list><l>from</l><l>to</l></list></block><list><block s="reportListItem"><block var="index"/><block var="brights"/></block><block s="reportListItem"><block s="reportSum"><block var="index"/><l>1</l></block><block var="brights"/></block></list></custom-block></block><block s="doSetVar"><l>newHSV</l><custom-block s="HSV color"></custom-block></block><block s="doIfElse"><block var="✐ fair?"/><script><custom-block s="set pen color to h: %n s: %n v: %n"><block s="reportListItem"><l>1</l><block var="newHSV"/></block><block s="reportQuotient"><block s="reportProduct"><block s="reportListItem"><l>2</l><block var="newHSV"/></block><block s="reportListItem"><l>2</l><block var="✐ raw HSV"/></block></block><l>100</l></block><block s="reportQuotient"><block s="reportProduct"><block s="reportListItem"><l>3</l><block var="newHSV"/></block><block s="reportListItem"><l>3</l><block var="✐ raw HSV"/></block></block><l>100</l></block></custom-block><block s="doSetVar"><l>✐ raw HSV</l><block s="reportNewList"><list><block var="value"/><block s="reportListItem"><l>2</l><block var="✐ raw HSV"/></block><block s="reportListItem"><l>3</l><block var="✐ raw HSV"/></block></list></block></block></script><script><custom-block s="set pen color to h: %n s: %n v: %n"><block s="reportListItem"><l>1</l><block var="newHSV"/></block><block s="reportQuotient"><block s="reportProduct"><block s="reportListItem"><l>2</l><block var="newHSV"/></block><block s="reportListItem"><l>2</l><block var="oldHSV"/></block></block><l>100</l></block><block s="reportQuotient"><block s="reportProduct"><block s="reportListItem"><l>3</l><block var="newHSV"/></block><block s="reportListItem"><l>3</l><block var="oldHSV"/></block></block><l>100</l></block></custom-block><block s="doSetVar"><l>✐ raw HSV</l><block s="reportNewList"><list><block var="value"/><block s="reportListItem"><l>2</l><block var="oldHSV"/></block><block s="reportListItem"><l>3</l><block var="oldHSV"/></block></list></block></block></script></block><block s="doIfElse"><block s="reportEquals"><block var="✐ last set as"/><l>HSL</l></block><script><block s="doSetVar"><l>✐ last set as</l><l>HSV</l></block><custom-block s="✐ update HSL"></custom-block><block s="doSetVar"><l>✐ last set as</l><l>HSL</l></block></script><script><block s="doSetVar"><l>✐ last set as</l><l>HSV</l></block></script></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>true</bool></l></block></block><custom-block s="✐ make integer RGB"></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script><comment w="90" collapsed="true">fair hue</comment></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>color</l><comment w="53.333333333333336" collapsed="true">Color</comment></block><script><block s="doSetVar"><l>✐ color scale</l><block var="value"/></block><block s="doSetVar"><l>color</l><block s="reportProduct"><block var="value"/><l>3</l></block></block><block s="doIfElse"><block s="reportNot"><block s="reportGreaterThan"><block var="color"/><l>42</l></block></block><script><block s="doSetVar"><l>color</l><block s="reportModulus"><block s="reportProduct"><block var="color"/><block s="reportQuotient"><l>15</l><l>14</l></block></block><l>300</l></block></block><block s="doSetVar"><l>index</l><block s="reportMonadic"><l><option>floor</option></l><block s="reportQuotient"><block var="color"/><l>15</l></block></block></block><block s="doSetVar"><l>scale</l><block s="reportDifference"><block var="color"/><block s="reportProduct"><block var="index"/><l>15</l></block></block></block></script><script><block s="doIf"><block s="reportLessThan"><block var="color"/><l>60</l><comment w="96.66666666666667" collapsed="true">spread out pink</comment></block><script><block s="doSetVar"><l>color</l><block s="reportSum"><l>45</l><block s="reportProduct"><block s="reportDifference"><block var="color"/><l>42</l></block><block s="reportQuotient"><l>15</l><l>18</l></block></block></block></block></script></block><block s="doSetVar"><l>color</l><block s="reportModulus"><block var="color"/><l>300</l></block></block><block s="doSetVar"><l>index</l><block s="reportMonadic"><l><option>floor</option></l><block s="reportQuotient"><block var="color"/><l>15</l></block></block></block><block s="doSetVar"><l>scale</l><block s="reportDifference"><block var="color"/><block s="reportProduct"><block var="index"/><l>15</l></block></block></block></script><comment w="77.33333333333333" collapsed="true">grayscale</comment></block><block s="doRun"><block s="reifyScript"><script><custom-block s="set pen color to r: %n g: %n b: %n"><l></l><l></l><l></l></custom-block></script><list></list></block><custom-block s="mmap %repRing over %mult%l"><block s="reifyReporter"><autolambda><custom-block s="min %s %s"><block s="reportRound"><block s="reportSum"><block var="from"/><block s="reportProduct"><block s="reportDifference"><block var="to"/><block var="from"/></block><block s="reportQuotient"><block var="scale"/><l>15</l></block></block></block></block><l>255</l></custom-block></autolambda><list><l>from</l><l>to</l></list></block><list><block s="reportListItem"><block s="reportSum"><block var="index"/><l>1</l></block><block var="colors"/></block><block s="reportListItem"><block s="reportSum"><block var="index"/><l>2</l></block><block var="colors"/></block></list></custom-block></block><block s="doSetVar"><l>✐ last set as</l><l>color</l></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>saturation (HSL)</l></block><script><custom-block s="✐ update HSL"></custom-block><block s="doSetVar"><l>✐ last set as</l><l>HSL</l></block><block s="doReplaceInList"><l>2</l><block var="✐ HSL"/><block var="value"/></block><custom-block s="✐ update HSV"></custom-block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><custom-block s="✐ make integer RGB"></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>lightness</l></block><script><custom-block s="✐ update HSL"></custom-block><block s="doSetVar"><l>✐ last set as</l><l>HSL</l></block><block s="doReplaceInList"><l>3</l><block var="✐ HSL"/><block var="value"/></block><custom-block s="✐ update HSV"></custom-block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><custom-block s="✐ make integer RGB"></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair saturation (HSV)</l></block><script><block s="doIf"><block s="reportEquals"><block var="✐ last set as"/><l>HSL</l></block><script><custom-block s="✐ update HSV"></custom-block></script></block><block s="setPenHSVA"><l><option>saturation</option></l><block s="reportIfElse"><block var="✐ fair?"/><block s="reportProduct"><block var="value"/><block s="reportQuotient"><block s="getPenAttribute"><l><option>saturation</option></l></block><block s="reportListItem"><l>2</l><block var="✐ raw HSV"/></block></block></block><block var="value"/></block></block><block s="doReplaceInList"><l>2</l><block var="✐ raw HSV"/><block var="value"/></block><block s="doSetVar"><l>✐ last set as</l><l>HSV</l></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>true</bool></l></block></block><custom-block s="✐ make integer RGB"></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair value (brightness)</l></block><script><block s="doIf"><block s="reportEquals"><block var="✐ last set as"/><l>HSL</l></block><script><custom-block s="✐ update HSV"></custom-block></script></block><block s="setPenHSVA"><l><option>brightness</option></l><block s="reportIfElse"><block var="✐ fair?"/><block s="reportProduct"><block var="value"/><block s="reportQuotient"><block s="getPenAttribute"><l><option>brightness</option></l></block><block s="reportListItem"><l>3</l><block var="✐ raw HSV"/></block></block></block><block var="value"/></block></block><block s="doReplaceInList"><l>3</l><block var="✐ raw HSV"/><block var="value"/></block><block s="doSetVar"><l>✐ last set as</l><l>HSV</l></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>true</bool></l></block></block><custom-block s="✐ make integer RGB"></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair saturation (HSL)</l></block><script><block s="doIfElse"><block s="reportEquals"><block var="✐ last set as"/><l>HSV</l></block><script><custom-block s="✐ update HSL"></custom-block></script><script><block s="doIf"><block s="reportNot"><block s="reportEquals"><block var="✐ last set as"/><l>HSL</l></block></block><script><block s="doReplaceInList"><l>2</l><block var="✐ HSL"/><l>100</l></block></script></block></script></block><block s="doSetVar"><l>✐ last set as</l><l>HSL</l></block><block s="doReplaceInList"><l>2</l><block var="✐ raw HSL"/><block var="value"/></block><block s="doReplaceInList"><l>2</l><block var="✐ HSL"/><block s="reportIfElse"><block var="✐ fair?"/><block s="reportProduct"><block var="value"/><block s="reportQuotient"><block s="reportListItem"><l>2</l><block var="✐ HSL"/></block><block s="reportListItem"><l>2</l><block var="✐ raw HSL"/></block></block></block><block var="value"/></block></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>true</bool></l></block></block><custom-block s="✐ update HSV"></custom-block><custom-block s="✐ make integer RGB"></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair lightness</l></block><script><block s="doIfElse"><block s="reportEquals"><block var="✐ last set as"/><l>HSV</l></block><script><custom-block s="✐ update HSL"></custom-block></script><script><block s="doIf"><block s="reportNot"><block s="reportEquals"><block var="✐ last set as"/><l>HSL</l></block></block><script><block s="doReplaceInList"><l>3</l><block var="✐ HSL"/><l>50</l></block></script></block></script></block><block s="doSetVar"><l>✐ last set as</l><l>HSL</l></block><block s="doReplaceInList"><l>3</l><block var="✐ raw HSL"/><block var="value"/></block><block s="doReplaceInList"><l>3</l><block var="✐ HSL"/><block s="reportIfElse"><block var="✐ fair?"/><block s="reportProduct"><block var="value"/><block s="reportQuotient"><block s="reportListItem"><l>3</l><block var="✐ HSL"/></block><block s="reportListItem"><l>3</l><block var="✐ raw HSL"/></block></block></block><block var="value"/></block></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>true</bool></l></block></block><custom-block s="✐ update HSV"></custom-block><custom-block s="✐ make integer RGB"></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair HSL vector</l></block><script><custom-block s="$brush set pen %s to %s"><l>fair saturation (HSL)</l><block s="reportListItem"><l>2</l><block var="value"/></block></custom-block><custom-block s="$brush set pen %s to %s"><l>fair lightness</l><block s="reportListItem"><l>3</l><block var="value"/></block></custom-block><custom-block s="$brush set pen %s to %s"><l>fair hue</l><block s="reportListItem"><l>1</l><block var="value"/></block></custom-block><block s="doIf"><block s="reportGreaterThan"><block s="reportListLength"><block var="value"/></block><l>3</l></block><script><block s="setPenHSVA"><l><option>transparency</option></l><block s="reportListItem"><l>4</l><block var="value"/></block></block></script></block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair HSV vector</l></block><script><custom-block s="$brush set pen %s to %s"><l>fair saturation (HSV)</l><block s="reportListItem"><l>2</l><block var="value"/></block></custom-block><custom-block s="$brush set pen %s to %s"><l>fair value (brightness)</l><block s="reportListItem"><l>3</l><block var="value"/></block></custom-block><custom-block s="$brush set pen %s to %s"><l>fair hue</l><block s="reportListItem"><l>1</l><block var="value"/></block></custom-block><block s="doIf"><block s="reportGreaterThan"><block s="reportListLength"><block var="value"/></block><l>3</l></block><script><block s="setPenHSVA"><l><option>transparency</option></l><block s="reportListItem"><l>4</l><block var="value"/></block></block></script></block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>HSL vector</l></block><script><custom-block s="$brush set pen %s to %s"><l>saturation (HSL)</l><block s="reportListItem"><l>2</l><block var="value"/></block></custom-block><custom-block s="$brush set pen %s to %s"><l>lightness</l><block s="reportListItem"><l>3</l><block var="value"/></block></custom-block><custom-block s="$brush set pen %s to %s"><l>hue</l><block s="reportListItem"><l>1</l><block var="value"/></block></custom-block><block s="doIf"><block s="reportGreaterThan"><block s="reportListLength"><block var="value"/></block><l>3</l></block><script><block s="setPenHSVA"><l><option>transparency</option></l><block s="reportListItem"><l>4</l><block var="value"/></block></block></script></block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>HSV vector</l></block><script><custom-block s="$brush set pen %s to %s"><l>saturation (HSV)</l><block s="reportListItem"><l>2</l><block var="value"/></block></custom-block><custom-block s="$brush set pen %s to %s"><l>value (brightness)</l><block s="reportListItem"><l>3</l><block var="value"/></block></custom-block><custom-block s="$brush set pen %s to %s"><l>hue</l><block s="reportListItem"><l>1</l><block var="value"/></block></custom-block><block s="doIf"><block s="reportGreaterThan"><block s="reportListLength"><block var="value"/></block><l>3</l></block><script><block s="setPenHSVA"><l><option>transparency</option></l><block s="reportListItem"><l>4</l><block var="value"/></block></block></script></block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>RGB vector</l></block><script><custom-block s="$brush set pen %s to %s"><l>red</l><block s="reportListItem"><l>1</l><block var="value"/></block></custom-block><custom-block s="$brush set pen %s to %s"><l>green</l><block s="reportListItem"><l>2</l><block var="value"/></block></custom-block><custom-block s="$brush set pen %s to %s"><l>blue</l><block s="reportListItem"><l>3</l><block var="value"/></block></custom-block><block s="doIf"><block s="reportGreaterThan"><block s="reportListLength"><block var="value"/></block><l>3</l></block><script><block s="setPenHSVA"><l><option>transparency</option></l><block s="reportListItem"><l>4</l><block var="value"/></block></block></script></block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>RGB hex</l></block><script><block s="doSetVar"><l>value</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportIfElse"><block s="reportIsA"><l></l><l><option>number</option></l></block><l></l><block s="reportSum"><l>10</l><block s="reportDifference"><block s="reportUnicode"><l></l></block><block s="reportIfElse"><block s="reportLessThan"><l></l><l>a</l></block><block s="reportUnicode"><l>A</l></block><block s="reportUnicode"><l>a</l></block></block></block></block></block></autolambda><list></list></block><block s="reportTextSplit"><block var="value"/><l><option>letter</option></l></block></block></block><block s="doIf"><block s="reportEquals"><block s="reportListLength"><block var="value"/></block><l>3</l></block><script><block s="doSetVar"><l>value</l><block s="reportConcatenatedLists"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportNewList"><list><l></l><l></l></list></block></autolambda><list></list></block><block var="value"/></block></block></block></script></block><block s="doIf"><block s="reportIsA"><block s="reportFindFirst"><block s="reifyPredicate"><autolambda><block s="reportOr"><block s="reportLessThan"><l></l><l>0</l></block><block s="reportGreaterThan"><l></l><l>15</l></block></block></autolambda><list></list></block><block var="value"/></block><l><option>number</option></l></block><script><custom-block s="error %txt"><l>Badly formed hex color.</l></custom-block></script></block><block s="doIf"><block s="reportGreaterThan"><block s="reportListLength"><block var="value"/></block><l>6</l></block><script><custom-block s="error %txt"><l>More than six hex digits.</l></custom-block></script></block><block s="doRepeat"><block s="reportDifference"><l>6</l><block s="reportListLength"><block var="value"/></block></block><script><block s="doSetVar"><l>value</l><block s="reportCONS"><l>0</l><block var="value"/></block></block></script></block><custom-block s="$brush set pen %s to %s"><l>red</l><block s="reportSum"><block s="reportProduct"><l>16</l><block s="reportListItem"><l>1</l><block var="value"/></block></block><block s="reportListItem"><l>2</l><block var="value"/></block></block></custom-block><custom-block s="$brush set pen %s to %s"><l>green</l><block s="reportSum"><block s="reportProduct"><l>16</l><block s="reportListItem"><l>3</l><block var="value"/></block></block><block s="reportListItem"><l>4</l><block var="value"/></block></block></custom-block><custom-block s="$brush set pen %s to %s"><l>blue</l><block s="reportSum"><block s="reportProduct"><l>16</l><block s="reportListItem"><l>5</l><block var="value"/></block></block><block s="reportListItem"><l>6</l><block var="value"/></block></block></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>X11/W3C name</l><comment w="90" collapsed="true">X11/W3C name</comment></block><script><block s="doIf"><block s="reportNot"><custom-block s="does var %s exist?"><l>✐ X11</l></custom-block></block><script><custom-block s="create %s var %mult%txt"><l>global</l><list><l>✐ X11</l></list></custom-block></script></block><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="✐ X11"/><l><option>list</option></l></block></block><script><block s="doSetVar"><l>✐ X11</l><block s="reportNewList"><list><block s="reportNewList"><list><l>255</l><l>250</l><l>250</l><l>snow</l></list></block><block s="reportNewList"><list><l>248</l><l>248</l><l>255</l><l>ghostwhite</l></list></block><block s="reportNewList"><list><l>245</l><l>245</l><l>245</l><l>whitesmoke</l></list></block><block s="reportNewList"><list><l>220</l><l>220</l><l>220</l><l>gainsboro</l></list></block><block s="reportNewList"><list><l>255</l><l>250</l><l>240</l><l>floralwhite</l></list></block><block s="reportNewList"><list><l>253</l><l>245</l><l>230</l><l>oldlace</l></list></block><block s="reportNewList"><list><l>250</l><l>240</l><l>230</l><l>linen</l></list></block><block s="reportNewList"><list><l>250</l><l>235</l><l>215</l><l>antiquewhite</l></list></block><block s="reportNewList"><list><l>255</l><l>239</l><l>213</l><l>papayawhip</l></list></block><block s="reportNewList"><list><l>255</l><l>235</l><l>205</l><l>blanchedalmond</l></list></block><block s="reportNewList"><list><l>255</l><l>228</l><l>196</l><l>bisque</l></list></block><block s="reportNewList"><list><l>255</l><l>218</l><l>185</l><l>peachpuff</l></list></block><block s="reportNewList"><list><l>255</l><l>222</l><l>173</l><l>navajowhite</l></list></block><block s="reportNewList"><list><l>255</l><l>228</l><l>181</l><l>moccasin</l></list></block><block s="reportNewList"><list><l>255</l><l>248</l><l>220</l><l>cornsilk</l></list></block><block s="reportNewList"><list><l>255</l><l>255</l><l>240</l><l>ivory</l></list></block><block s="reportNewList"><list><l>255</l><l>250</l><l>205</l><l>lemonchiffon</l></list></block><block s="reportNewList"><list><l>255</l><l>245</l><l>238</l><l>seashell</l></list></block><block s="reportNewList"><list><l>240</l><l>255</l><l>240</l><l>honeydew</l></list></block><block s="reportNewList"><list><l>245</l><l>255</l><l>250</l><l>mintcream</l></list></block><block s="reportNewList"><list><l>240</l><l>255</l><l>255</l><l>azure</l></list></block><block s="reportNewList"><list><l>240</l><l>248</l><l>255</l><l>aliceblue</l></list></block><block s="reportNewList"><list><l>230</l><l>230</l><l>250</l><l>lavender</l></list></block><block s="reportNewList"><list><l>255</l><l>240</l><l>245</l><l>lavenderblush</l></list></block><block s="reportNewList"><list><l>255</l><l>228</l><l>225</l><l>mistyrose</l></list></block><block s="reportNewList"><list><l>255</l><l>255</l><l>255</l><l>white</l></list></block><block s="reportNewList"><list><l>0</l><l>0</l><l>0</l><l>black</l></list></block><block s="reportNewList"><list><l>47</l><l>79</l><l>79</l><l>darkslategray</l></list></block><block s="reportNewList"><list><l>47</l><l>79</l><l>79</l><l>darkslategrey</l></list></block><block s="reportNewList"><list><l>105</l><l>105</l><l>105</l><l>dimgray</l></list></block><block s="reportNewList"><list><l>105</l><l>105</l><l>105</l><l>dimgrey</l></list></block><block s="reportNewList"><list><l>112</l><l>128</l><l>144</l><l>slategray</l></list></block><block s="reportNewList"><list><l>112</l><l>128</l><l>144</l><l>slategrey</l></list></block><block s="reportNewList"><list><l>119</l><l>136</l><l>153</l><l>lightslategray</l></list></block><block s="reportNewList"><list><l>119</l><l>136</l><l>153</l><l>lightslategrey</l></list></block><block s="reportNewList"><list><l>190</l><l>190</l><l>190</l><l>gray(X11)</l></list></block><block s="reportNewList"><list><l>190</l><l>190</l><l>190</l><l>grey(X11)</l></list></block><block s="reportNewList"><list><l>128</l><l>128</l><l>128</l><l>gray(W3C)</l></list></block><block s="reportNewList"><list><l>128</l><l>128</l><l>128</l><l>grey(W3C)</l></list></block><block s="reportNewList"><list><l>211</l><l>211</l><l>211</l><l>lightgrey</l></list></block><block s="reportNewList"><list><l>211</l><l>211</l><l>211</l><l>lightgray</l></list></block><block s="reportNewList"><list><l>25</l><l>25</l><l>112</l><l>midnightblue</l></list></block><block s="reportNewList"><list><l>0</l><l>0</l><l>128</l><l>navy</l></list></block><block s="reportNewList"><list><l>0</l><l>0</l><l>128</l><l>navyblue</l></list></block><block s="reportNewList"><list><l>100</l><l>149</l><l>237</l><l>cornflowerblue</l></list></block><block s="reportNewList"><list><l>72</l><l>61</l><l>139</l><l>darkslateblue</l></list></block><block s="reportNewList"><list><l>106</l><l>90</l><l>205</l><l>slateblue</l></list></block><block s="reportNewList"><list><l>123</l><l>104</l><l>238</l><l>mediumslateblue</l></list></block><block s="reportNewList"><list><l>132</l><l>112</l><l>255</l><l>lightslateblue</l></list></block><block s="reportNewList"><list><l>0</l><l>0</l><l>205</l><l>mediumblue</l></list></block><block s="reportNewList"><list><l>65</l><l>105</l><l>225</l><l>royalblue</l></list></block><block s="reportNewList"><list><l>0</l><l>0</l><l>255</l><l>blue</l></list></block><block s="reportNewList"><list><l>30</l><l>144</l><l>255</l><l>dodgerblue</l></list></block><block s="reportNewList"><list><l>0</l><l>191</l><l>255</l><l>deepskyblue</l></list></block><block s="reportNewList"><list><l>135</l><l>206</l><l>235</l><l>skyblue</l></list></block><block s="reportNewList"><list><l>135</l><l>206</l><l>250</l><l>lightskyblue</l></list></block><block s="reportNewList"><list><l>70</l><l>130</l><l>180</l><l>steelblue</l></list></block><block s="reportNewList"><list><l>176</l><l>196</l><l>222</l><l>lightsteelblue</l></list></block><block s="reportNewList"><list><l>173</l><l>216</l><l>230</l><l>lightblue</l></list></block><block s="reportNewList"><list><l>176</l><l>224</l><l>230</l><l>powderblue</l></list></block><block s="reportNewList"><list><l>175</l><l>238</l><l>238</l><l>paleturquoise</l></list></block><block s="reportNewList"><list><l>0</l><l>206</l><l>209</l><l>darkturquoise</l></list></block><block s="reportNewList"><list><l>72</l><l>209</l><l>204</l><l>mediumturquoise</l></list></block><block s="reportNewList"><list><l>64</l><l>224</l><l>208</l><l>turquoise</l></list></block><block s="reportNewList"><list><l>0</l><l>255</l><l>255</l><l>cyan</l></list></block><block s="reportNewList"><list><l>0</l><l>255</l><l>255</l><l>aqua</l></list></block><block s="reportNewList"><list><l>224</l><l>255</l><l>255</l><l>lightcyan</l></list></block><block s="reportNewList"><list><l>95</l><l>158</l><l>160</l><l>cadetblue</l></list></block><block s="reportNewList"><list><l>102</l><l>205</l><l>170</l><l>mediumaquamarine</l></list></block><block s="reportNewList"><list><l>127</l><l>255</l><l>212</l><l>aquamarine</l></list></block><block s="reportNewList"><list><l>0</l><l>100</l><l>0</l><l>darkgreen</l></list></block><block s="reportNewList"><list><l>85</l><l>107</l><l>47</l><l>darkolivegreen</l></list></block><block s="reportNewList"><list><l>143</l><l>188</l><l>143</l><l>darkseagreen</l></list></block><block s="reportNewList"><list><l>46</l><l>139</l><l>87</l><l>seagreen</l></list></block><block s="reportNewList"><list><l>60</l><l>179</l><l>113</l><l>mediumseagreen</l></list></block><block s="reportNewList"><list><l>32</l><l>178</l><l>170</l><l>lightseagreen</l></list></block><block s="reportNewList"><list><l>152</l><l>251</l><l>152</l><l>palegreen</l></list></block><block s="reportNewList"><list><l>0</l><l>255</l><l>127</l><l>springgreen</l></list></block><block s="reportNewList"><list><l>124</l><l>252</l><l>0</l><l>lawngreen</l></list></block><block s="reportNewList"><list><l>0</l><l>255</l><l>0</l><l>green(X11)</l></list></block><block s="reportNewList"><list><l>0</l><l>128</l><l>0</l><l>green(W3C)</l></list></block><block s="reportNewList"><list><l>0</l><l>255</l><l>0</l><l>lime</l></list></block><block s="reportNewList"><list><l>127</l><l>255</l><l>0</l><l>chartreuse</l></list></block><block s="reportNewList"><list><l>0</l><l>250</l><l>154</l><l>mediumspringgreen</l></list></block><block s="reportNewList"><list><l>173</l><l>255</l><l>47</l><l>greenyellow</l></list></block><block s="reportNewList"><list><l>50</l><l>205</l><l>50</l><l>limegreen</l></list></block><block s="reportNewList"><list><l>154</l><l>205</l><l>50</l><l>yellowgreen</l></list></block><block s="reportNewList"><list><l>34</l><l>139</l><l>34</l><l>forestgreen</l></list></block><block s="reportNewList"><list><l>107</l><l>142</l><l>35</l><l>olivedrab</l></list></block><block s="reportNewList"><list><l>189</l><l>183</l><l>107</l><l>darkkhaki</l></list></block><block s="reportNewList"><list><l>240</l><l>230</l><l>140</l><l>khaki</l></list></block><block s="reportNewList"><list><l>238</l><l>232</l><l>170</l><l>palegoldenrod</l></list></block><block s="reportNewList"><list><l>250</l><l>250</l><l>210</l><l>lightgoldenrodyellow</l></list></block><block s="reportNewList"><list><l>255</l><l>255</l><l>224</l><l>lightyellow</l></list></block><block s="reportNewList"><list><l>255</l><l>255</l><l>0</l><l>yellow</l></list></block><block s="reportNewList"><list><l>255</l><l>215</l><l>0</l><l>gold</l></list></block><block s="reportNewList"><list><l>238</l><l>221</l><l>130</l><l>lightgoldenrod</l></list></block><block s="reportNewList"><list><l>218</l><l>165</l><l>32</l><l>goldenrod</l></list></block><block s="reportNewList"><list><l>184</l><l>134</l><l>11</l><l>darkgoldenrod</l></list></block><block s="reportNewList"><list><l>188</l><l>143</l><l>143</l><l>rosybrown</l></list></block></list></block></block></script></block><block s="doSetVar"><l>value</l><custom-block s="✐ no spaces %s"><block var="value"/></custom-block></block><custom-block s="use case-independent comparisons %b"><l><bool>true</bool></l></custom-block><custom-block s="catch %upvar %cs"><l>x11w3c</l><script><block s="doIf"><custom-block s="✐ subset %predRing %l %cmdRing %upvar"><block s="reifyPredicate"><autolambda><block s="reportEquals"><block var="value"/><block s="reportListItem"><l>4</l><l/></block></block></autolambda><list></list></block><block var="✐ X11"/><block var="x11w3c"/><l>exact matches</l></custom-block><script><custom-block s="error %txt"><block s="reportJoinWords"><list><l>?? multiple exact matches for </l><block var="value"/></list></block></custom-block></script></block><block s="doIf"><block s="reportNot"><custom-block s="✐ subset %predRing %l %cmdRing %upvar"><block s="reifyPredicate"><autolambda><block s="reportNot"><block s="reportEquals"><block s="reportListItem"><l>4</l><l/></block><custom-block s="substring of %txt before %txt"><block s="reportListItem"><l>4</l><l/></block><block var="value"/></custom-block></block></block></autolambda><list></list></block><block var="✐ X11"/><block var="x11w3c"/><l>partial matches</l></custom-block></block><script><custom-block s="error %txt"><block s="reportJoinWords"><list><l>Color name </l><block var="value"/><l> not found.</l></list></block></custom-block></script></block><block s="doIfElse"><custom-block s="✐ subset %predRing %l %cmdRing %upvar"><block s="reifyPredicate"><autolambda><block s="reportEquals"><custom-block s="substring of %txt before %txt"><block s="reportListItem"><l>4</l><block var="match"/></block><block var="value"/></custom-block><l></l></block></autolambda><list><l>match</l></list></block><block var="partial matches"/><block var="x11w3c"/><l>head matches</l></custom-block><script><block s="doIfElse"><custom-block s="✐ subset %predRing %l %cmdRing %upvar"><block s="reifyPredicate"><autolambda><block s="reportNot"><block s="reportIsA"><block s="reportLetter"><l><option>last</option></l><block s="reportListItem"><l>4</l><l/></block></block><l><option>number</option></l></block></block></autolambda><list></list></block><block var="head matches"/><block var="x11w3c"/><l>non-numbered matches</l></custom-block><script><custom-block s="error %txt"><block s="reportJoinWords"><list><l>Multiple partial matches for </l><block var="value"/><l>: </l><block s="reportCombine"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>4</l><l/></block></autolambda><list></list></block><block var="non-numbered matches"/></block><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><l></l><l> , </l><l></l></list></block></autolambda><list></list></block></block></list></block></custom-block></script><script><custom-block s="error %txt"><block s="reportJoinWords"><list><l>Multiple partial matches for </l><block var="value"/><l>: </l><block s="reportCombine"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>4</l><l/></block></autolambda><list></list></block><block var="head matches"/></block><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><l></l><l> , </l><l></l></list></block></autolambda><list></list></block></block></list></block></custom-block></script></block></script><script><block s="doIfElse"><custom-block s="✐ subset %predRing %l %cmdRing %upvar"><block s="reifyPredicate"><autolambda><block s="reportNot"><block s="reportIsA"><block s="reportLetter"><l><option>last</option></l><block s="reportListItem"><l>4</l><l/></block></block><l><option>number</option></l></block></block></autolambda><list></list></block><block var="partial matches"/><block var="x11w3c"/><l>non-numbered matches</l></custom-block><script><custom-block s="error %txt"><block s="reportJoinWords"><list><l>Multiple partial matches for </l><block var="value"/><l>: </l><block s="reportCombine"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>4</l><l/></block></autolambda><list></list></block><block var="non-numbered matches"/></block><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><l></l><l> , </l><l></l></list></block></autolambda><list></list></block></block></list></block></custom-block></script><script><custom-block s="error %txt"><block s="reportJoinWords"><list><l>Multiple partial matches for </l><block var="value"/><l>: </l><block s="reportCombine"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>4</l><l/></block></autolambda><list></list></block><block var="partial matches"/></block><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><l></l><l> , </l><l></l></list></block></autolambda><list></list></block></block></list></block></custom-block></script></block></script></block></script><comment w="294.6666666666667" collapsed="true">SUBSET throws here if it handles a unique match</comment></custom-block></script></block><custom-block s="✐ initialize variables"></custom-block></script></block-definition><block-definition s="mmap %&apos;function&apos; over %&apos;lists&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%mult%l"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block s="reportListItem"><l>1</l><block var="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"/><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>1</l><l/></block></autolambda><list></list></block><block var="lists"/></block></block><custom-block s="mmap %repRing over %mult%l"><block var="function"/><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportCDR"><l/></block></autolambda><list></list></block><block var="lists"/></block></custom-block></block></block></script></block-definition><block-definition s="✐ update HSL" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doDeclareVariables"><list><l>L</l></list></block><block s="doIf"><block s="reportNot"><block s="reportEquals"><block var="✐ last set as"/><l>HSL</l></block></block><script><block s="doSetVar"><l>✐ HSL</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportProduct"><l></l><l>100</l></block></autolambda><list></list></block><block s="evaluate"><block s="reifyReporter"><script><block s="doSetVar"><l>L</l><block s="reportDifference"><block var="V"/><block s="reportQuotient"><block s="reportProduct"><block var="V"/><block var="S"/></block><l>2</l></block></block></block><block s="doReport"><block s="reportNewList"><list><block var="H"/><block s="reportIfElse"><block s="reportOr"><block s="reportEquals"><block var="L"/><l>0</l></block><block s="reportEquals"><block var="L"/><l>1</l></block></block><l>0</l><block s="reportQuotient"><block s="reportDifference"><block var="V"/><block var="L"/></block><custom-block s="min %s %s"><block var="L"/><block s="reportDifference"><l>1</l><block var="L"/></block></custom-block></block></block><block var="L"/></list></block></block></script><list><l>H</l><l>S</l><l>V</l></list></block><custom-block s="HSV color"></custom-block></block></block></block><block s="doIf"><block var="✐ fair?"/><script><block s="doSetVar"><l>✐ raw HSL</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportProduct"><l></l><l>100</l></block></autolambda><list></list></block><block s="evaluate"><block s="reifyReporter"><script><block s="doSetVar"><l>L</l><block s="reportDifference"><block var="V"/><block s="reportQuotient"><block s="reportProduct"><block var="V"/><block var="S"/></block><l>2</l></block></block></block><block s="doReport"><block s="reportNewList"><list><block var="H"/><block s="reportIfElse"><block s="reportOr"><block s="reportEquals"><block var="L"/><l>0</l></block><block s="reportEquals"><block var="L"/><l>1</l></block></block><l>0</l><block s="reportQuotient"><block s="reportDifference"><block var="V"/><block var="L"/></block><custom-block s="min %s %s"><block var="L"/><block s="reportDifference"><l>1</l><block var="L"/></block></custom-block></block></block><block var="L"/></list></block></block></script><list><l>H</l><l>S</l><l>V</l></list></block><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportQuotient"><l></l><l>100</l></block></autolambda><list></list></block><block var="✐ raw HSV"/></block></block></block></block></script></block></script></block></script></block-definition><block-definition s="min %&apos;a&apos; %&apos;b&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><block s="reportIfElse"><block s="reportLessThan"><block var="a"/><block var="b"/></block><block var="a"/><block var="b"/></block></block></script></block-definition><block-definition s="✐ update HSV" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doDeclareVariables"><list><l>V</l><l>L</l><l>HSL 0-1</l><l>raw HSL 0-1</l></list></block><block s="doSetVar"><l>HSL 0-1</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportQuotient"><l></l><l>100</l></block></autolambda><list></list></block><block var="✐ HSL"/></block></block><block s="doSetVar"><l>L</l><block s="reportListItem"><l>3</l><block var="HSL 0-1"/></block></block><block s="doSetVar"><l>V</l><block s="reportSum"><block var="L"/><block s="reportProduct"><block s="reportListItem"><l>2</l><block var="HSL 0-1"/></block><custom-block s="min %s %s"><block var="L"/><block s="reportDifference"><l>1</l><block var="L"/></block></custom-block></block></block></block><custom-block s="set pen color to h: %n s: %n v: %n"><block s="reportListItem"><l>1</l><block var="HSL 0-1"/></block><block s="reportIfElse"><block s="reportEquals"><block var="V"/><l>0</l></block><l>0</l><block s="reportDifference"><l>2</l><block s="reportProduct"><l>2</l><block s="reportQuotient"><block var="L"/><block var="V"/></block></block></block></block><block var="V"/></custom-block><block s="doIf"><block var="✐ fair?"/><script><block s="doSetVar"><l>raw HSL 0-1</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportQuotient"><l></l><l>100</l></block></autolambda><list></list></block><block var="✐ raw HSL"/></block></block><block s="doSetVar"><l>L</l><block s="reportListItem"><l>3</l><block var="raw HSL 0-1"/></block></block><block s="doSetVar"><l>V</l><block s="reportSum"><block var="L"/><block s="reportProduct"><block s="reportListItem"><l>2</l><block var="raw HSL 0-1"/></block><custom-block s="min %s %s"><block var="L"/><block s="reportDifference"><l>1</l><block var="L"/></block></custom-block></block></block></block><block s="doSetVar"><l>✐ raw HSV</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportProduct"><l></l><l>100</l></block></autolambda><list></list></block><block s="reportNewList"><list><block s="reportListItem"><l>1</l><block var="raw HSL 0-1"/></block><block s="reportIfElse"><block s="reportEquals"><block var="V"/><l>0</l></block><l>0</l><block s="reportDifference"><l>2</l><block s="reportProduct"><l>2</l><block s="reportQuotient"><block var="L"/><block var="V"/></block></block></block></block><block var="V"/></list></block></block></block></script></block></script></block-definition><block-definition s="$brush pen %&apos;dimension&apos;" type="reporter" category="pen"><comment x="0" y="0" w="380.6666666666667" collapsed="false">This block reports the pen size, color, or transparency, in all the same ways that the SET PEN block allows you to set those pen properties. (It will also report the current crayon number, if the pen color was most recently set with SET PEN TO CRAYON.)&#xD;&#xD;See Appendix A of the Snap! Reference Manual for details. </comment><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true"><options>size&#xD;crayon&#xD;color&#xD;fair hue&#xD;transparency&#xD;X11/W3C name&#xD;(3D color spaces)={&#xD;fair HSL={&#xD;fair hue&#xD;fair saturation (HSL)&#xD;fair lightness&#xD;fair HSL vector&#xD;}&#xD;fair HSV={&#xD;fair hue&#xD;fair saturation (HSV)&#xD;fair value (brightness)&#xD;fair HSV vector&#xD;}&#xD;HSL={&#xD;hue&#xD;saturation (HSL)&#xD;lightness&#xD;HSL vector&#xD;}&#xD;HSV={&#xD;hue&#xD;saturation (HSV)&#xD;value (brightness)&#xD;HSV vector&#xD;}&#xD;RGB (0-255)={&#xD;red&#xD;green&#xD;blue&#xD;RGB vector&#xD;RGB hex&#xD;}&#xD;}</options></input></inputs><script><custom-block s="✐ initialize variables"></custom-block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>size</l></block><script><block s="doReport"><block s="getPenAttribute"><l><option>size</option></l></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>hue</l></block><script><block s="doReport"><block s="getPenAttribute"><l><option>hue</option></l></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>saturation (HSV)</l></block><script><block s="doReport"><block s="getPenAttribute"><l><option>saturation</option></l></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>value (brightness)</l></block><script><block s="doReport"><block s="getPenAttribute"><l><option>brightness</option></l></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>transparency</l></block><script><block s="doReport"><block s="getPenAttribute"><l><option>transparency</option></l></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>RGB vector</l></block><script><block s="doReport"><custom-block s="RGB color"></custom-block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>red</l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><custom-block s="RGB color"></custom-block></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>green</l></block><script><block s="doReport"><block s="reportListItem"><l>2</l><custom-block s="RGB color"></custom-block></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>blue</l></block><script><block s="doReport"><block s="reportListItem"><l>3</l><custom-block s="RGB color"></custom-block></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>RGB hex</l></block><script><block s="doReport"><block s="reportCombine"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><custom-block s="✐ hexchar %s"><block s="reportMonadic"><l><option>floor</option></l><block s="reportQuotient"><l></l><l>16</l></block></block></custom-block><custom-block s="✐ hexchar %s"><block s="reportModulus"><l></l><l>16</l></block></custom-block></list></block></autolambda><list></list></block><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportRound"><l></l></block></autolambda><list></list></block><custom-block s="RGB color"></custom-block></block></block><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><l></l><l></l></list></block></autolambda><list></list></block></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>HSV vector</l></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportProduct"><l>100</l><l></l></block></autolambda><list></list></block><custom-block s="HSV color"></custom-block></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>HSL vector</l></block><script><custom-block s="✐ update HSL"></custom-block><block s="doReport"><block var="✐ HSL"/></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>saturation (HSL)</l></block><script><custom-block s="✐ update HSL"></custom-block><block s="doReport"><block s="reportListItem"><l>2</l><block var="✐ HSL"/></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>lightness</l></block><script><custom-block s="✐ update HSL"></custom-block><block s="doReport"><block s="reportListItem"><l>3</l><block var="✐ HSL"/></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>color</l></block><script><block s="doReport"><block s="reportIfElse"><block s="reportEquals"><block var="✐ last set as"/><l>color</l></block><block var="✐ color scale"/><l>not set</l></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair hue</l></block><script><block s="doIf"><block var="✐ fair?"/><script><block s="doIfElse"><block s="reportEquals"><block var="✐ last set as"/><l>HSL</l></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="✐ raw HSL"/></block></block></script><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="✐ raw HSV"/></block></block></script></block></script></block><block s="doReport"><l>not set</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair saturation (HSL)</l></block><script><block s="doIf"><block var="✐ fair?"/><script><custom-block s="✐ update HSL"></custom-block><block s="doReport"><block s="reportListItem"><l>2</l><block var="✐ raw HSL"/></block></block></script></block><block s="doReport"><l>not set</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair lightness</l></block><script><block s="doIf"><block var="✐ fair?"/><script><custom-block s="✐ update HSL"></custom-block><block s="doReport"><block s="reportListItem"><l>3</l><block var="✐ raw HSL"/></block></block></script></block><block s="doReport"><l>not set</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair HSL vector</l></block><script><block s="doIf"><block var="✐ fair?"/><script><custom-block s="✐ update HSL"></custom-block><block s="doReport"><block var="✐ raw HSL"/></block></script></block><block s="doReport"><l>not set</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair saturation (HSV)</l></block><script><block s="doIf"><block var="✐ fair?"/><script><block s="doIf"><block s="reportEquals"><block var="✐ last set as"/><l>HSL</l></block><script><custom-block s="✐ update HSV"></custom-block></script></block><block s="doReport"><block s="reportListItem"><l>2</l><block var="✐ raw HSV"/></block></block></script></block><block s="doReport"><l>not set</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair value (brightness)</l></block><script><block s="doIf"><block var="✐ fair?"/><script><block s="doIf"><block s="reportEquals"><block var="✐ last set as"/><l>HSL</l></block><script><custom-block s="✐ update HSV"></custom-block></script></block><block s="doReport"><block s="reportListItem"><l>3</l><block var="✐ raw HSV"/></block></block></script></block><block s="doReport"><l>not set</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>fair HSV vector</l></block><script><block s="doIf"><block var="✐ fair?"/><script><block s="doIf"><block s="reportEquals"><block var="✐ last set as"/><l>HSL</l></block><script><custom-block s="✐ update HSV"></custom-block></script></block><block s="doReport"><block var="✐ raw HSV"/></block></script></block><block s="doReport"><l>not set</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>crayon</l></block><script><block s="doIf"><block s="reportEquals"><block var="✐ last set as"/><l>crayon</l></block><script><block s="doReport"><block var="✐ last crayon"/></block></script></block><block s="doReport"><l>not set</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>X11/W3C name</l></block><script><block s="doIf"><block s="reportEquals"><block var="✐ last set as"/><l>X11</l></block><script><block s="doReport"><block var="✐ last x11"/></block></script></block><block s="doReport"><l>not set</l></block></script></block></script></block-definition><block-definition s="✐ hexchar %&apos;nybble&apos;" type="reporter" category="pen"><comment x="0" y="0" w="245.33333333333334" collapsed="false">Takes a value from 0 to 15 and reports&#xD;the corresponding hexadecimal digit.&#xD;&#xD;For internal use of the color library.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="reportIfElse"><block s="reportLessThan"><block var="nybble"/><l>10</l></block><block var="nybble"/><block s="reportUnicodeAsLetter"><block s="reportSum"><block s="reportUnicode"><l>a</l></block><block s="reportDifference"><block var="nybble"/><l>10</l></block></block></block></block></block></script></block-definition><block-definition s="$brush change pen %&apos;dimension&apos; by %&apos;amount&apos;" type="command" category="pen"><comment x="0" y="0" w="334" collapsed="false">Changes any pen property by the specified amount.  Some color scales can&apos;t be adjusted this way unless the color was first SET using that scale.&#xD;Vectors (e.g., RGB color as a list of three numbers) can be incremented&#xD;by a vector as the amount. X11/W3C names can&apos;t be incremented.</comment><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true"><options>size&#xD;crayon&#xD;color&#xD;fair hue&#xD;transparency&#xD;(3D color spaces)={&#xD;fair HSL={&#xD;fair hue&#xD;fair saturation (HSL)&#xD;fair lightness&#xD;fair HSL vector&#xD;}&#xD;fair HSV={&#xD;fair hue&#xD;fair saturation (HSV)&#xD;fair value (brightness)&#xD;fair HSV vector&#xD;}&#xD;HSL={&#xD;hue&#xD;saturation (HSL)&#xD;lightness&#xD;HSL vector&#xD;}&#xD;HSV={&#xD;hue&#xD;saturation (HSV)&#xD;value (brightness)&#xD;HSV vector&#xD;}&#xD;RGB (0-255)={&#xD;red&#xD;green&#xD;blue&#xD;RGB vector&#xD;RGB hex&#xD;}&#xD;}</options></input><input type="%s"></input></inputs><script><custom-block s="✐ initialize variables"></custom-block><block s="doDeclareVariables"><list><l>old</l></list></block><block s="doSetVar"><l>old</l><custom-block s="$brush pen %s"><block var="dimension"/></custom-block></block><block s="doIf"><block s="reportEquals"><block var="old"/><l>not set</l></block><script><custom-block s="error %txt"><block s="reportJoinWords"><list><l>Dimension </l><block var="dimension"/><l> not set.</l></list></block></custom-block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>crayon</l></block><script><custom-block s="$brush set pen to crayon %n"><block s="reportSum"><block var="old"/><block var="amount"/></block></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportEquals"><block var="dimension"/><l>RGB hex</l></block><script><custom-block s="error %txt"><l>Sorry, I don&apos;t know how to add in hexadecimal.</l></custom-block></script></block><block s="doIf"><block s="reportIsA"><block var="amount"/><l><option>number</option></l></block><script><custom-block s="$brush set pen %s to %s"><block var="dimension"/><block s="reportSum"><block var="old"/><block var="amount"/></block></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script></block><block s="doIf"><block s="reportIsA"><block var="amount"/><l><option>list</option></l></block><script><custom-block s="$brush set pen %s to %s"><block var="dimension"/><custom-block s="mmap %repRing over %mult%l"><block s="reifyReporter"><autolambda><block s="reportSum"><l></l><l></l></block></autolambda><list></list></block><list><block var="old"/><block var="amount"/></list></custom-block></custom-block><block s="doStopThis"><l><option>this block</option></l></block></script></block><custom-block s="error %txt"><block s="reportJoinWords"><list><l>I don&apos;t know how to handle </l><block var="amount"/></list></block></custom-block></script></block-definition><block-definition s="✐ make integer RGB" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doRun"><block s="reifyScript"><script><custom-block s="set pen color to r: %n g: %n b: %n"><l></l><l></l><l></l></custom-block></script><list></list></block><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportRound"><l></l></block></autolambda><list></list></block><custom-block s="RGB color"></custom-block></block></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="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="catch %&apos;tag&apos; %&apos;action&apos;" type="command" 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="%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><custom-block s="ignore %s"><l>3</l></custom-block></script></block-definition><block-definition s="throw %&apos;cont&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></inputs><script><block s="doRun"><block var="cont"/><list></list></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="✐ subset %&apos;pred&apos; %&apos;data&apos; %&apos;catchtag&apos; %&apos;result&apos;" type="predicate" category="pen"><comment x="0" y="0" w="228" collapsed="false">Don&apos;t ask.&#xD;Only for internal use by the SET PEN block.</comment><header></header><code></code><translations></translations><inputs><input type="%predRing"></input><input type="%l"></input><input type="%cmdRing"></input><input type="%upvar"></input></inputs><script><block s="doDeclareVariables"><list><l>best match</l></list></block><block s="doSetVar"><l>result</l><block s="reportKeep"><block var="pred"/><block var="data"/></block></block><block s="doIf"><block s="reportListIsEmpty"><block var="result"/></block><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block><block s="doIf"><block s="reportListIsEmpty"><block s="reportCDR"><block var="result"/></block></block><script><block s="doSetVar"><l>best match</l><block s="reportListItem"><l>1</l><block var="result"/></block></block><custom-block s="$brush set pen %s to %s"><l>red</l><block s="reportListItem"><l>1</l><block var="best match"/></block></custom-block><custom-block s="$brush set pen %s to %s"><l>green</l><block s="reportListItem"><l>2</l><block var="best match"/></block></custom-block><custom-block s="$brush set pen %s to %s"><l>blue</l><block s="reportListItem"><l>3</l><block var="best match"/></block></custom-block><block s="doSetVar"><l>✐ last X11</l><block s="reportListItem"><l>4</l><block var="best match"/></block></block><block s="doSetVar"><l>✐ last set as</l><l>X11</l></block><custom-block s="throw %s"><block var="catchtag"/></custom-block></script></block><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></block-definition><block-definition s="✐ no spaces %&apos;text&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="reportJoinWords"><block s="reportTextSplit"><block var="text"/><l> </l></block></block></block></script></block-definition><block-definition s="create %&apos;scope&apos; var %&apos;names&apos;" type="command" category="variables"><comment x="0" y="0" w="146" collapsed="false">This block creates  new variables on the selected scope: global (for all sprites), sprite (for this sprite only) or script (only for that blocks stack) with the names given (in &apos;names&apos; list).&#xD;&#xD;If there is already a variable with that name in that scope, it does nothing: no errors and no overwrites.</comment><header></header><code></code><translations>pt:cria as variáveis _ _&#xD;ca:crea les _ variables _&#xD;es:crear las _ variables _&#xD;de:erstellen _ var _&#xD;</translations><inputs><input type="%s" readonly="true">global<options>global&#xD;sprite&#xD;script</options></input><input type="%mult%txt"></input></inputs><script><block s="doIfElse"><block s="reportEquals"><block var="scope"/><l>script</l></block><script><block s="doForEach"><l>each item</l><block var="names"/><script><block s="doRun"><block s="reportJSFunction"><list><l>varName</l><l>proc</l></list><l>if ((typeof varName) != "string" || varName === "") {&#xD;    throw new Error("name isn&apos;t a string: " + varName);&#xD;}&#xD;if (!proc.homeContext.variables.vars[varName]) proc.homeContext.variables.addVar(varName);</l></block><list><block var="each item"/></list></block></script></block></script><script><block s="doDeclareVariables"><list><l>global</l></list></block><block s="doIfElse"><block s="reportEquals"><block var="scope"/><l>sprite</l></block><script><block s="doSetVar"><l>global</l><block s="reportBoolean"><l><bool>false</bool></l></block></block></script><script><block s="doSetVar"><l>global</l><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></block><block s="doForEach"><l>each item</l><block var="names"/><script><block s="doRun"><block s="reportJSFunction"><list><l>varName</l><l>global</l><l>proc</l></list><l>if ((typeof varName) != "string" || varName === "") {&#xD;    throw new Error("name isn&apos;t a string: " + varName);&#xD;}&#xD;if (global &amp;&amp; !proc.homeContext.variables.parentFrame.parentFrame.vars[varName]) this.addVariable(varName, true);&#xD;if (!global &amp;&amp; !proc.homeContext.variables.parentFrame.vars[varName]) this.addVariable(varName, false);</l></block><list><block var="each item"/><block var="global"/></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></script></block-definition><block-definition s="does var %&apos;name&apos; exist?" type="predicate" category="variables"><comment x="0" y="0" w="146" collapsed="false">This block reports &quot;true&quot; if there is a variable with this given name (input slot) in that context.&#xD;&#xD;It can be a global, sprite or script variable.&#xD;&#xD;Otherwise it reports &quot;false&quot;.</comment><header></header><code></code><translations>pt:a variável _ existe&#xD;ca:existeix la variable _ ?&#xD;es:existe la variable _ ?&#xD;de:existiert var _ ?&#xD;</translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>varName</l><l>proc</l></list><l>if ((typeof varName) != "string" || varName === "") {&#xD;    throw new Error("name isn&apos;t a string: " + varName);&#xD;}&#xD;return proc.homeContext.variables.silentFind(varName)? true:false;</l></block><list><block var="name"/></list></block></block></script></block-definition><block-definition s="✐ initialize variables" type="command" category="pen"><comment x="0" y="0" w="180" collapsed="false">Creates a bunch of global variables.&#xD;For internal use by Color library.</comment><header></header><code></code><translations></translations><inputs></inputs><script><block s="doIf"><custom-block s="does var %s exist?"><l>✐ last set as</l></custom-block><script><block s="doStopThis"><l><option>this block</option></l></block></script></block><custom-block s="create %s var %mult%txt"><l>global</l><list><l>✐ last set as</l><l>✐ fair?</l><l>✐ color scale</l><l>✐ HSL</l><l>✐ last crayon</l><l>✐ last X11</l><l>✐ raw HSL</l><l>✐ raw HSV</l></list></custom-block><block s="doSetVar"><l>✐ last set as</l><l>RGB</l></block><block s="doSetVar"><l>✐ fair?</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><block s="doSetVar"><l>✐ raw HSV</l><block s="reportNewList"><list><l>0</l><l>100</l><l>100</l></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="Hummingbird %&apos;sensor&apos; %&apos;port&apos;" type="reporter" category="sensing"><header></header><code></code><translations></translations><inputs><input type="%txt" readonly="true">Light<options>Distance (cm)&#xD;Dial&#xD;Light&#xD;Sound&#xD;Other (V)</options></input><input type="%n" readonly="true">1<options>1&#xD;2&#xD;3</options></input></inputs><script><block s="doDeclareVariables"><list><l>value</l></list></block><block s="doIf"><block s="reportEquals"><block var="sensor"/><l>Other (V)</l></block><script><block s="doSetVar"><l>sensor</l><l>Other</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="sensor"/><l>Distance (cm)</l></block><script><block s="doSetVar"><l>sensor</l><l>Distance</l></block></script></block><block s="doSetVar"><l>value</l><block s="reportURL"><block s="reportJoinWords"><list><l>http://127.0.0.1:30061/hummingbird/in/</l><block var="sensor"/><l>/</l><block var="port"/></list></block></block></block><block s="doIfElse"><block s="reportNot"><block s="reportEquals"><block var="value"/><l>Not Connected</l></block></block><script><block s="doIf"><block s="reportEquals"><block var="sensor"/><l>Distance</l></block><script><block s="doReport"><block s="reportRound"><block s="reportProduct"><l>1.17</l><block var="value"/></block></block><comment w="90" collapsed="false">117/100 Scaling factor</comment></block></script></block><block s="doIf"><block s="reportEquals"><block var="sensor"/><l>Other</l></block><script><block s="doReport"><block s="reportQuotient"><block s="reportRound"><block s="reportProduct"><block s="reportProduct"><l>0.01294</l><block var="value"/></block><l>100</l></block></block><l>100</l></block><comment w="102" collapsed="false">3.3/255 scale factor</comment></block></script></block><block s="doIf"><block s="reportEquals"><block var="sensor"/><l>Sound</l><comment w="155" collapsed="true">If connected, adjust sound level</comment></block><script><block s="doReport"><block s="reportRound"><block s="reportProduct"><l>0.784</l><block var="value"/><comment w="140" collapsed="false">200/255 Scaling factor</comment></block></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="sensor"/><l>Light</l></block><script><block s="doReport"><block s="reportRound"><block s="reportProduct"><l>0.392</l><block var="value"/><comment w="140" collapsed="false">100/255 Scaling factor</comment></block></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="sensor"/><l>Dial</l></block><script><block s="doReport"><block s="reportRound"><block s="reportProduct"><l>0.435</l><block var="value"/><comment w="140" collapsed="false">100/230 Scaling factor</comment></block></block></block></script></block></script><script><block s="doReport"><l>Not Connected</l></block></script></block></script></block-definition><block-definition s="Hummingbird Play Note %&apos;note&apos; for %&apos;beats&apos; beats" type="command" category="sound"><header></header><code></code><translations>ko:Hummingbird _ 번 음을 _ 박자로 연주하기&#xD;de:Hummingbird Spiele Note _ für _ Schläge&#xD;pt:Hummingbird Toque Notas _ por _ Batidas&#xD;fr:Hummingbird Jouer la note _ pour _ battement(s)&#xD;nl:Hummingbird Speel Noot _ voor _ Beats&#xD;zh_CN:Hummingbird 演奏 音阶 _ 于 _ 拍&#xD;zh_TW:Hummingbird 演奏 音階 _ 於 _ 拍&#xD;ar:Hummingbird تشغيل الموسيقى  _ _&#xD;dk:Hummingbird Spil tone _ i _ slag&#xD;he:Hummingbird נגן תו   _  במשך  _   פעימות&#xD;es:Hummingbird Emitir un sonido _ por _ pulsos&#xD;ca:Hummingbird Toca nota _ durant _ temps&#xD;fi:Hummingbird Soita sävel _  _ iskun ajan&#xD;sv:Hummingbird Spela not _ _&#xD;</translations><inputs><input type="%n">60</input><input type="%n">0.5</input></inputs><script><block s="doIf"><block s="reportGreaterThan"><block var="note"/><l>135</l></block><script><block s="doSetVar"><l>note</l><l>135</l></block></script></block><block s="doIf"><block s="reportGreaterThan"><l>32</l><block var="note"/></block><script><block s="doSetVar"><l>note</l><l>32</l></block></script></block><block s="doIf"><block s="reportGreaterThan"><block var="beats"/><l>16</l></block><script><block s="doSetVar"><l>beats</l><l>16</l></block></script></block><block s="doIf"><block s="reportGreaterThan"><l>0</l><block var="beats"/></block><script><block s="doSetVar"><l>beats</l><l>0</l></block></script></block><block s="doSetVar"><l>beats</l><block s="reportRound"><block s="reportProduct"><block s="reportQuotient"><l>60000</l><block s="getTempo"></block></block><block var="beats"/></block><comment w="242" collapsed="false">BPM = tempo&#xD;60 * 1000/BPM = BPMS  beats per millisecond&#xD;beats = Duration in ms  = BPMS * number of beats</comment></block></block><block s="doRun"><block s="reifyReporter"><autolambda><block s="reportURL"><block s="reportJoinWords"><list><l>http://127.0.0.1:30061/hummingbird/out/playnote/</l><block var="note"/><l>/</l><block var="beats"/></list></block></block></autolambda><list></list></block><list></list></block><block s="doWait"><block s="reportQuotient"><block var="beats"/><l>1000</l></block><comment w="205" collapsed="false">block for number of seconds</comment></block></script></block-definition><block-definition s="micro:bit %&apos;device&apos; %&apos;dim&apos;" type="reporter" category="sensing"><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true">Accelerometer (m/s²)<options>Accelerometer (m/s²)&#xD;Magnetometer (µT)</options></input><input type="%txt" readonly="true">X<options>X&#xD;Y&#xD;Z</options></input></inputs><script><block s="doIf"><block s="reportEquals"><block var="device"/><l>Accelerometer (m/s²)</l></block><script><block s="doSetVar"><l>device</l><l>Accelerometer</l></block></script></block><block s="doIf"><block s="reportEquals"><block var="device"/><l>Magnetometer (µT)</l></block><script><block s="doSetVar"><l>device</l><l>Magnetometer</l></block></script></block><block s="doReport"><block s="reportURL"><block s="reportJoinWords"><list><l>http://127.0.0.1:30061/hummingbird/in/</l><block var="device"/><l>/</l><block var="dim"/></list></block></block></block></script></block-definition><block-definition s="micro:bit Button %&apos;button&apos;" type="predicate" category="sensing"><header></header><code></code><translations>ko:micro:bit 버튼 _&#xD;de:micro:bit Knopf _&#xD;pt:micro:bit Tecla _&#xD;fr:micro:bit Bouton _&#xD;nl:micro:bit Knop _&#xD;zh_CN:micro:bit 按钮 _&#xD;zh_TW:micro:bit 按鈕 _&#xD;ar:micro:bit زر _&#xD;dk:micro:bit Knap _&#xD;he:micro:bit לחצן  _&#xD;es:micro:bit Pulsador _&#xD;ca:micro:bit Botó _&#xD;fi:micro:bit Painike _&#xD;sv:micro:bit Knapp _&#xD;</translations><inputs><input type="%txt" readonly="true">A<options>A&#xD;B</options></input></inputs><script><block s="doIfElse"><block s="reportEquals"><block s="reportURL"><block s="reportJoinWords"><list><l>http://127.0.0.1:30061/hummingbird/in/button/</l><block var="button"/></list></block></block><l>true</l></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></block-definition><block-definition s="micro:bit Compass" type="reporter" category="sensing"><header></header><code></code><translations>ko:micro:bit 나침반 센서&#xD;de:micro:bit Kompass&#xD;pt:micro:bit Bússola&#xD;fr:micro:bit Compas&#xD;nl:micro:bit Kompas&#xD;zh_CN:micro:bit 指南针&#xD;zh_TW:micro:bit 指南針&#xD;ar:micro:bit بوصلة&#xD;dk:micro:bit Kompas&#xD;he:micro:bit מצפן&#xD;es:micro:bit Brujula&#xD;ca:micro:bit Brúixola&#xD;fi:micro:bit Kompassi&#xD;sv:micro:bit Kompass&#xD;</translations><inputs></inputs><script><block s="doReport"><block s="reportURL"><block s="reportJoinWords"><list><l>http://127.0.0.1:30061/hummingbird/in/</l><l>Compass</l></list></block></block></block></script></block-definition><block-definition s="micro:bit %&apos;dim&apos;" type="predicate" category="sensing"><header></header><code></code><translations></translations><inputs><input type="%txt" readonly="true">Screen Up<options>Screen Up&#xD;Screen Down&#xD;Tilt Left&#xD;Tilt Right&#xD;Logo Up&#xD;Logo Down&#xD;Shake</options></input></inputs><script><block s="doIfElse"><block s="reportEquals"><block s="reportURL"><block s="reportJoinWords"><list><l>http://127.0.0.1:30061/hummingbird/in/orientation/</l><block var="dim"/></list></block></block><l>true</l></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></block-definition><block-definition s="stop all" type="command" category="control"><header></header><code></code><translations>ko:모두 멈추기&#xD;de:stoppe alles&#xD;pt:pare todos&#xD;fr:stop tout&#xD;nl:stop alle&#xD;zh_CN:停止 全部&#xD;zh_TW:停止 全部&#xD;ar:توقف الكل&#xD;dk:stop alle&#xD;he:להפסיק הכל&#xD;es:detener todo&#xD;ca:atura tot&#xD;fi:pysäytä kaikki&#xD;sv:stop allt&#xD;</translations><inputs></inputs><script><block s="doReport"><block s="reportURL"><block s="reportJoinWords"><list><l>http://127.0.0.1:30061/hummingbird/out/stopall</l></list></block></block></block></script></block-definition><block-definition s="Hummingbird Position Servo %&apos;port&apos; %&apos;position&apos; °" type="command" category="motion"><header></header><code></code><translations>ko:Hummingbird 위치 제어 서보 _ _ °&#xD;de:Hummingbird Position Servo _ _ °&#xD;pt:Hummingbird Posição do Servo _ _ °&#xD;fr:Hummingbird Position Servo _ _ °&#xD;nl:Hummingbird Positie-Servo _ _ °&#xD;zh_CN:Hummingbird 位置伺服 _ _ °&#xD;zh_TW:Hummingbird 位置伺服 _ _ °&#xD;ar:Hummingbird موقف محرك سيرفو المؤازر  _ _&#xD;dk:Hummingbird Positionsservo _ _ °&#xD;he:Hummingbird סרוו כיוון     _ _&#xD;es:Hummingbird Servo de posicion _ _ °&#xD;ca:Hummingbird Servo posicional _ _ °&#xD;fi:Hummingbird Asentoservo _ _ °&#xD;sv:Hummingbird Positionsservo _ _ °&#xD;</translations><inputs><input type="%n" readonly="true">1<options>1&#xD;2&#xD;3&#xD;4</options></input><input type="%n">90</input></inputs><script><block s="doIf"><block s="reportLessThan"><block var="position"/><l>0</l></block><script><block s="doSetVar"><l>position</l><l>0</l></block></script></block><block s="doIf"><block s="reportGreaterThan"><block var="position"/><l>180</l></block><script><block s="doSetVar"><l>position</l><l>180</l></block></script></block><block s="doSetVar"><l>position</l><block s="reportRound"><block s="reportProduct"><block var="position"/><l>1.41</l></block></block><comment w="228" collapsed="false">254/180 Scaling Factor</comment></block><block s="doRun"><block s="reportJSFunction"><list><l>portnum</l><l>position</l></list><l>var realPort = portnum-1;&#xD;////////////////////////////////////////////////////////////////////////////////&#xD;// In order to avoid sending more messages than the app can handle, whenever we&#xD;// send a message we also save it in a persistent global variable. When the&#xD;// message is processed in the app, the callback checks if the global variable&#xD;// still matches what it was changed to. If it was, it deletes the global&#xD;// variable. Otherwise the message is resent with new data.&#xD;//&#xD;// When this block is called it checks if the global value has been set. If it&#xD;// has, it sends a message. Otherwise it just updates the value and lets the&#xD;// callback handle it.&#xD;&#xD;&#xD;// We can&apos;t run code beforehand to define values so we must check each block&#xD;// call if they are set.&#xD;if (window.birdbrain === undefined || window.birdbrain.servos === undefined) {&#xD;    window.birdbrain = window.birdbrain || {};&#xD;    window.birdbrain.servos = {&#xD;        // By attaching this function to a global variable, it is only&#xD;        // defined once instead of every time this block is called, improving&#xD;        // performance significantly.&#xD;        setServoAngle: function (port, angle) {&#xD;            function callback() {&#xD;                if (window.birdbrain.servos[port] === angle) {&#xD;                    delete window.birdbrain.servos[port];&#xD;                }&#xD;                else {&#xD;                    window.birdbrain.servos.setServoAngle(port, window.birdbrain.servos[port]);&#xD;                }&#xD;            }&#xD;&#xD;            //Create a new XMLHttpRequest object&#xD;            var xhr = new XMLHttpRequest();&#xD;            var actualPort = port+1;         &#xD;            var thisURL = "http://127.0.0.1:30061/hummingbird/out/servo/" + actualPort + "/" + angle;&#xD;            //console.log("thisURL: " + thisURL);&#xD;            xhr.open("GET", thisURL, true);&#xD;            xhr.onload = function (e) {&#xD;              if (xhr.readyState === 4) {&#xD;                if (xhr.status === 200) {&#xD;                  callback();&#xD;                } else {&#xD;                  console.error(xhr.statusText);&#xD;                }&#xD;              }&#xD;            };&#xD;            xhr.onerror = function (e) {&#xD;              console.error(xhr.statusText);&#xD;            };&#xD;            xhr.send(null);          &#xD;            &#xD;        }&#xD;    };&#xD;}&#xD;&#xD;//var realAngle = Math.floor(ang*1.25);&#xD;&#xD;//realAngle = Math.max(Math.min(realAngle,225.0),0.0);&#xD;&#xD;if (window.birdbrain.servos[realPort] === undefined) {&#xD;    window.birdbrain.servos.setServoAngle(realPort, position);&#xD;}&#xD;&#xD;window.birdbrain.servos[realPort] = position;</l></block><list><block var="port"/><block var="position"/></list></block><block s="doWait"><l>0</l></block></script><scripts><script x="187.14285714285717" y="82.28571428571428"><block s="doReport"><block s="reportURL"><block s="reportJoinWords"><list><l>http://127.0.0.1:30061/hummingbird/out/servo/</l><l></l><l>/</l><l></l></list></block></block></block></script></scripts></block-definition><block-definition s="Hummingbird Rotation Servo %&apos;port&apos; %&apos;speed&apos; %" type="command" category="motion"><header></header><code></code><translations>ko:Hummingbird 회전속도 제어 서보 _ _ %&#xD;de:Hummingbird Drehung Servo _ _ %&#xD;pt:Hummingbird Rotação do Servo _ _ %&#xD;fr:Hummingbird Rotation Servo _ _ %&#xD;nl:Hummingbird Draai-Servo _ _ %&#xD;zh_CN:Hummingbird 旋转伺服 _ _ %&#xD;zh_TW:Hummingbird 旋轉伺服 _ _ %&#xD;ar:Hummingbird فتحة دوران المحرك المؤازر  _ _&#xD;dk:Hummingbird Rotationsservo _ _ %&#xD;he:Hummingbird סרוו סיבובים    _ _ %&#xD;es:Hummingbird Servo de rotacion _ _ %&#xD;ca:Hummingbird Servo rotacional _ _ %&#xD;fi:Hummingbird Kiertoservo _ _ %&#xD;sv:Hummingbird Rotationsservo _ _ %&#xD;</translations><inputs><input type="%n" readonly="true">1<options>1&#xD;2&#xD;3&#xD;4</options></input><input type="%n">0</input></inputs><script><block s="doIf"><block s="reportLessThan"><block var="speed"/><l>-100</l></block><script><block s="doSetVar"><l>speed</l><l>-100</l></block></script></block><block s="doIf"><block s="reportGreaterThan"><block var="speed"/><l>100</l></block><script><block s="doSetVar"><l>speed</l><l>100</l></block></script></block><block s="doIfElse"><block s="reportAnd"><block s="reportGreaterThan"><block var="speed"/><l>-10</l></block><block s="reportLessThan"><block var="speed"/><l>10</l></block></block><script><block s="doSetVar"><l>speed</l><l>255</l></block></script><script><block s="doSetVar"><l>speed</l><block s="reportRound"><block s="reportSum"><block s="reportQuotient"><block s="reportProduct"><block var="speed"/><l>23</l></block><l>100</l></block><l>122</l></block></block></block></script></block><block s="doRun"><block s="reportJSFunction"><list><l>portnum</l><l>speed</l></list><l>var realPort = portnum-1;&#xD;////////////////////////////////////////////////////////////////////////////////&#xD;// In order to avoid sending more messages than the app can handle, whenever we&#xD;// send a message we also save it in a persistent global variable. When the&#xD;// message is processed in the app, the callback checks if the global variable&#xD;// still matches what it was changed to. If it was, it deletes the global&#xD;// variable. Otherwise the message is resent with new data.&#xD;//&#xD;// When this block is called it checks if the global value has been set. If it&#xD;// has, it sends a message. Otherwise it just updates the value and lets the&#xD;// callback handle it.&#xD;&#xD;&#xD;// We can&apos;t run code beforehand to define values so we must check each block&#xD;// call if they are set.&#xD;if (window.birdbrain === undefined || window.birdbrain.rotationServos === undefined) {&#xD;    window.birdbrain = window.birdbrain || {};&#xD;    window.birdbrain.rotationServos = {&#xD;        // By attaching this function to a global variable, it is only&#xD;        // defined once instead of every time this block is called, improving&#xD;        // performance significantly.&#xD;        setServoSpeed: function (port, speed) {&#xD;            function callback() {&#xD;                if (window.birdbrain.rotationServos[port] === speed) {&#xD;                    delete window.birdbrain.rotationServos[port];&#xD;                }&#xD;                else {&#xD;                    window.birdbrain.rotationServos.setServoSpeed(port, window.birdbrain.rotationServos[port]);&#xD;                }&#xD;            }&#xD;&#xD;            //Create a new XMLHttpRequest object&#xD;            var xhr = new XMLHttpRequest();&#xD;            var actualPort = port+1;         &#xD;            var thisURL = "http://127.0.0.1:30061/hummingbird/out/rotation/" + actualPort + "/" + speed;&#xD;            //console.log("thisURL: " + thisURL);&#xD;            xhr.open("GET", thisURL, true);&#xD;            xhr.onload = function (e) {&#xD;              if (xhr.readyState === 4) {&#xD;                if (xhr.status === 200) {&#xD;                  callback();&#xD;                } else {&#xD;                  console.error(xhr.statusText);&#xD;                }&#xD;              }&#xD;            };&#xD;            xhr.onerror = function (e) {&#xD;              console.error(xhr.statusText);&#xD;            };&#xD;            xhr.send(null);          &#xD;            &#xD;        }&#xD;    };&#xD;}&#xD;&#xD;if (window.birdbrain.rotationServos[realPort] === undefined) {&#xD;    window.birdbrain.rotationServos.setServoSpeed(realPort, speed);&#xD;}&#xD;&#xD;window.birdbrain.rotationServos[realPort] = speed;</l></block><list><block var="port"/><block var="speed"/></list></block></script></block-definition><block-definition s="Hummingbird LED %&apos;port&apos; %&apos;intensity&apos; %" type="command" category="looks"><header></header><code></code><translations>ko:Hummingbird LED _ _ %&#xD;de:Hummingbird LED _ _ %&#xD;pt:Hummingbird LED _ _ %&#xD;fr:Hummingbird LED _ _ %&#xD;nl:Hummingbird LED _ _ %&#xD;zh_CN:Hummingbird LED _ _ %&#xD;zh_TW:Hummingbird LED _ _ %&#xD;ar:Hummingbird ضوء _ _&#xD;dk:Hummingbird LED _ _ %&#xD;he:Hummingbird לד   % _ _&#xD;es:Hummingbird LED _ _ %&#xD;ca:Hummingbird LED _ _ %&#xD;fi:Hummingbird LED _ _ %&#xD;sv:Hummingbird LED _ _ %&#xD;</translations><inputs><input type="%n" readonly="true">1<options>1&#xD;2&#xD;3</options></input><input type="%n">0</input></inputs><script><block s="doIf"><block s="reportLessThan"><block var="intensity"/><l>0</l></block><script><block s="doSetVar"><l>intensity</l><l>0</l></block></script></block><block s="doIf"><block s="reportGreaterThan"><block var="intensity"/><l>100</l></block><script><block s="doSetVar"><l>intensity</l><l>100</l></block></script></block><block s="doRun"><block s="reportJSFunction"><list><l>portnum,intensitynum</l></list><l>//var hummingbirdAppID = "lfloofocohhfeeoohpokmljiinfmpenj";&#xD;var realPort = portnum-1;&#xD;////////////////////////////////////////////////////////////////////////////////&#xD;// In order to avoid sending more messages than the app can handle, whenever we&#xD;// send a message we also save it in a persistent global variable. When the&#xD;// message is processed in the app, the callback checks if the global variable&#xD;// still matches what it was changed to. If it was, it deletes the global&#xD;// variable. Otherwise the message is resent with new data.&#xD;//&#xD;// When this block is called it checks if the global value has been set. If it&#xD;// has, it sends a message. Otherwise it just updates the value and lets the&#xD;// callback handle it.&#xD;&#xD;&#xD;// We can&apos;t run code beforehand to define values so we must check each block&#xD;// call if they are set.&#xD;if (window.birdbrain === undefined || window.birdbrain.LEDs === undefined) {&#xD;    window.birdbrain = window.birdbrain || {};&#xD;    window.birdbrain.LEDs = {&#xD;        // By attaching this function to a global variable, it is only&#xD;        // defined once instead of every time this block is called, improving&#xD;        // performance significantly.&#xD;        setLEDIntensity: function(port, intensity) {&#xD;            function callback() {&#xD;                if (window.birdbrain.LEDs[port] === intensity) {&#xD;                    delete window.birdbrain.LEDs[port];&#xD;                }&#xD;                else {&#xD;                    window.birdbrain.LEDs.setLEDIntensity(port, window.birdbrain.LEDs[port]);&#xD;                }&#xD;            }&#xD;            /*&#xD;            var report = {&#xD;                message:"L".charCodeAt(0),&#xD;                port: port.toString().charCodeAt(0),&#xD;                intensity: intensity&#xD;            };&#xD;            chrome.runtime.sendMessage(hummingbirdAppID, report, callback);&#xD;            */&#xD;&#xD;            //Create a new XMLHttpRequest object&#xD;            var xhr = new XMLHttpRequest();&#xD;            var actualPort = port+1;&#xD;            var ledURL = "http://127.0.0.1:30061/hummingbird/out/led/" + actualPort + "/" + intensity;&#xD;            xhr.open("GET", ledURL, true);&#xD;            xhr.onload = function (e) {&#xD;              if (xhr.readyState === 4) {&#xD;                if (xhr.status === 200) {&#xD;                  callback();&#xD;                } else {&#xD;                  console.error(xhr.statusText);&#xD;                }&#xD;              }&#xD;            };&#xD;            xhr.onerror = function (e) {&#xD;              console.error(xhr.statusText);&#xD;            };&#xD;            xhr.send(null);&#xD;&#xD;        }&#xD;    }&#xD;}&#xD;&#xD;var realIntensity = Math.floor(intensitynum*2.55);&#xD;&#xD;realIntensity = Math.max(Math.min(realIntensity,255.0),0.0);&#xD;&#xD;if (window.birdbrain.LEDs[realPort] === undefined) {&#xD;  window.birdbrain.LEDs.setLEDIntensity(realPort, realIntensity);&#xD;}&#xD;&#xD;window.birdbrain.LEDs[realPort] = realIntensity;</l></block><list><block var="port"/><block var="intensity"/></list></block><block s="doWait"><l>0</l></block></script><scripts><script x="396.42857142857144" y="46.57142857142853"><block s="doReport"><block s="reportURL"><block s="reportJoinWords"><list><l>http://127.0.0.1:30061/hummingbird/out/led/</l><block var="port"/><l>/</l><block var="intensity"/></list></block></block></block></script><script x="396.42857142857144" y="100.28571428571436"><block s="doSetVar"><l>intensity</l><block s="reportRound"><block s="reportProduct"><block var="intensity"/><l>2.55</l><comment w="90" collapsed="false">Scale factor 255/100</comment></block></block></block></script></scripts></block-definition><block-definition s="Hummingbird Tri-LED %&apos;port&apos; R %&apos;redLED&apos; % G %&apos;greenLED&apos; % B %&apos;blueLED&apos; %" type="command" category="looks"><header></header><code></code><translations>ko:Hummingbird 삼색 LED _ 빨강 _ % 초록 _ % 파랑 _ %&#xD;de:Hummingbird Dreifarben-LED _ R _ % G _ % B _ %&#xD;pt:Hummingbird LED Tricolor _ R _ % G _ % B _ %&#xD;fr:Hummingbird Tri-LED _ R _ % G _ % B _ %&#xD;nl:Hummingbird Tri-LED _ R _ % G _ % B _ %&#xD;zh_CN:Hummingbird 三色LED _ 红 _ % 绿 _ % 蓝 _ %&#xD;zh_TW:Hummingbird 三色LED _ 紅 _ % 綠 _ % 藍 _ %&#xD;ar:Hummingbird ضوء الصمام الثلاثي  _ _ _ _&#xD;dk:Hummingbird Tri-LED _ R _ % G _ % B _ %&#xD;he:Hummingbird לד שלושה צבעים       % _ R   _   %  G _  %   B  _&#xD;es:Hummingbird Led tricolor _ R _ % G _ % B _ %&#xD;ca:Hummingbird Tri-LED _ vermell _ % verd _ % blau _ %&#xD;fi:Hummingbird Tri-LED _ R _ % G _ % B _ %&#xD;sv:Hummingbird Tri-LED _ R _ % G _ % B _ %&#xD;</translations><inputs><input type="%n" readonly="true">1<options>1&#xD;2</options></input><input type="%n">0</input><input type="%n">0</input><input type="%n">0</input></inputs><script><block s="doIf"><block s="reportLessThan"><block var="redLED"/><l>0</l></block><script><block s="doSetVar"><l>redLED</l><l>0</l></block></script></block><block s="doIf"><block s="reportGreaterThan"><block var="redLED"/><l>100</l></block><script><block s="doSetVar"><l>redLED</l><l>100</l></block></script></block><block s="doIf"><block s="reportLessThan"><block var="greenLED"/><l>0</l></block><script><block s="doSetVar"><l>greenLED</l><l>0</l></block></script></block><block s="doIf"><block s="reportGreaterThan"><block var="greenLED"/><l>100</l></block><script><block s="doSetVar"><l>greenLED</l><l>100</l></block></script></block><block s="doIf"><block s="reportLessThan"><block var="blueLED"/><l>0</l></block><script><block s="doSetVar"><l>blueLED</l><l>0</l></block></script></block><block s="doIf"><block s="reportGreaterThan"><block var="blueLED"/><l>100</l></block><script><block s="doSetVar"><l>blueLED</l><l>100</l></block></script></block><block s="doRun"><block s="reportJSFunction"><list><l>portnum</l><l>rednum</l><l>greennum</l><l>bluenum</l></list><l>var realPort = portnum-1;&#xD;////////////////////////////////////////////////////////////////////////////////&#xD;// In order to avoid sending more messages than the app can handle, whenever we&#xD;// send a message we also save it in a persistent global variable. When the&#xD;// message is processed in the app, the callback checks if the global variable&#xD;// still matches what it was changed to. If it was, it deletes the global&#xD;// variable. Otherwise the message is resent with new data.&#xD;//&#xD;// When this block is called it checks if the global value has been set. If it&#xD;// has, it sends a message. Otherwise it just updates the value and lets the&#xD;// callback handle it.&#xD;&#xD;&#xD;// We can&apos;t run code beforehand to define values so we must check each block&#xD;// call if they are set.&#xD;if (window.birdbrain === undefined || window.birdbrain.triLEDs === undefined) {&#xD;    window.birdbrain = window.birdbrain || {};&#xD;    window.birdbrain.triLEDs = {&#xD;        // By attaching this function to a global variable, it is only&#xD;        // defined once instead of every time this block is called, improving&#xD;        // performance significantly.&#xD;        setLEDIntensities: function(port, intensities) {&#xD;            function callback() {&#xD;                if (JSON.stringify(window.birdbrain.triLEDs[port]) === JSON.stringify(intensities)) {&#xD;                    delete window.birdbrain.triLEDs[port];&#xD;                }&#xD;                else {&#xD;                    window.birdbrain.triLEDs.setLEDIntensities(port, window.birdbrain.triLEDs[port]);&#xD;                }&#xD;            }&#xD;&#xD;            //Create a new XMLHttpRequest object&#xD;            var xhr = new XMLHttpRequest();&#xD;            var actualPort = port+1;&#xD;            /*  Note RGB:&#xD;                red: intensities[0],&#xD;                green: intensities[1],&#xD;                blue: intensities[2]  &#xD;            */&#xD;            &#xD;            var thisURL = "http://127.0.0.1:30061/hummingbird/out/triled/" + actualPort + "/" + intensities[0] + "/" + intensities[1] + "/" + intensities[2];&#xD;            //console.log("thisURL: " + thisURL);&#xD;            xhr.open("GET", thisURL, true);&#xD;            xhr.onload = function (e) {&#xD;              if (xhr.readyState === 4) {&#xD;                if (xhr.status === 200) {&#xD;                  callback();&#xD;                } else {&#xD;                  console.error(xhr.statusText);&#xD;                }&#xD;              }&#xD;            };&#xD;            xhr.onerror = function (e) {&#xD;              console.error(xhr.statusText);&#xD;            };&#xD;            xhr.send(null);&#xD;        }&#xD;    }&#xD;}&#xD;&#xD;var realIntensities = [rednum, greennum, bluenum].map(function(intensity) {&#xD;    return Math.floor(Math.max(Math.min(intensity*2.55, 255), 0));&#xD;});&#xD;&#xD;if (window.birdbrain.triLEDs[realPort] === undefined) {&#xD;    window.birdbrain.triLEDs.setLEDIntensities(realPort, realIntensities);&#xD;}&#xD;&#xD;window.birdbrain.triLEDs[realPort] = realIntensities;&#xD;</l></block><list><block var="port"/><block var="redLED"/><block var="greenLED"/><block var="blueLED"/></list></block><block s="doWait"><l>0</l></block></script><scripts><script x="251.42857142857144" y="108.85714285714293"><block s="doSetVar"><l>redLED</l><block s="reportRound"><block s="reportProduct"><block var="redLED"/><l>2.55</l><comment w="90" collapsed="false">Scale factor 255/100</comment></block></block></block><block s="doSetVar"><l>blueLED</l><block s="reportRound"><block s="reportProduct"><block var="blueLED"/><l>2.55</l><comment w="90" collapsed="false">Scale factor 255/100</comment></block></block></block><block s="doSetVar"><l>greenLED</l><block s="reportRound"><block s="reportProduct"><block var="greenLED"/><l>2.55</l><comment w="90" collapsed="false">Scale factor 255/100</comment></block></block></block><block s="doReport"><block s="reportURL"><block s="reportJoinWords"><list><l>http://127.0.0.1:30061/hummingbird/out/triled/</l><l></l><l>/</l><l></l><l>/</l><l></l><l>/</l><l></l></list></block></block></block></script></scripts></block-definition><block-definition s="micro:bit Print %&apos;string&apos;" type="command" category="looks"><header></header><code></code><translations>ko:micro:bit 출력 _&#xD;de:micro:bit Drucke _&#xD;pt:micro:bit Imprimir _&#xD;fr:micro:bit Imprimer _&#xD;nl:micro:bit Schrijf _&#xD;zh_CN:micro:bit 打印 _&#xD;zh_TW:micro:bit 打印 _&#xD;ar:micro:bit طباعة _&#xD;dk:micro:bit Vis _&#xD;he:micro:bit הדפס  _&#xD;es:micro:bit Imprimir _&#xD;ca:micro:bit Escriu _&#xD;fi:micro:bit Näytä teksti _&#xD;sv:micro:bit Visa text _&#xD;</translations><inputs><input type="%txt">Hello</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>string</l></list><l>////////////////////////////////////////////////////////////////////////////////&#xD;// In order to avoid sending more messages than the app can handle, whenever we&#xD;// send a message we also save it in a persistent global variable. When the&#xD;// message is processed in the app, the callback checks if the global variable&#xD;// still matches what it was changed to. If it was, it deletes the global&#xD;// variable. Otherwise the message is resent with new data.&#xD;//&#xD;// When this block is called it checks if the global value has been set. If it&#xD;// has, it sends a message. Otherwise it just updates the value and lets the&#xD;// callback handle it.&#xD;&#xD;// Encode any special characters in the URL&#xD;string = encodeURIComponent(string);&#xD;&#xD;&#xD;// We can&apos;t run code beforehand to define values so we must check each block&#xD;// call if they are set.&#xD;if (window.birdbrain === undefined || window.birdbrain.printObj === undefined) {&#xD;    window.birdbrain = window.birdbrain || {};&#xD;    window.birdbrain.printObj = {&#xD;        // By attaching this function to a global variable, it is only&#xD;        // defined once instead of every time this block is called, improving&#xD;        // performance significantly.&#xD;        printString: function(string) {&#xD;            function callback() {&#xD;                if (window.birdbrain.printObj.stringToPrint === string) {&#xD;                    delete window.birdbrain.printObj.stringToPrint;&#xD;                }&#xD;                else {&#xD;                    window.birdbrain.printObj.printString(window.birdbrain.printObj.stringToPrint);&#xD;                }&#xD;            }&#xD;            /*&#xD;            var report = {&#xD;                message:"L".charCodeAt(0),&#xD;                port: port.toString().charCodeAt(0),&#xD;                intensity: intensity&#xD;            };&#xD;            chrome.runtime.sendMessage(hummingbirdAppID, report, callback);&#xD;            */&#xD;&#xD;            //Create a new XMLHttpRequest object&#xD;            var xhr = new XMLHttpRequest();&#xD;            var printURL = "http://127.0.0.1:30061/hummingbird/out/print/" + string;&#xD;            xhr.open("GET", printURL, true);&#xD;            xhr.onload = function (e) {&#xD;              if (xhr.readyState === 4) {&#xD;                if (xhr.status === 200) {&#xD;                  callback();&#xD;                } else {&#xD;                  console.error(xhr.statusText);&#xD;                }&#xD;              }&#xD;            };&#xD;            xhr.onerror = function (e) {&#xD;              console.error(xhr.statusText);&#xD;            };&#xD;            xhr.send(null);&#xD;&#xD;        }&#xD;    }&#xD;}&#xD;&#xD;//TODO Turn &apos;/&apos; chars into % &#xD;&#xD;if (window.birdbrain.printObj.stringToPrint === undefined) {&#xD;  window.birdbrain.printObj.printString(string);&#xD;}&#xD;&#xD;window.birdbrain.printObj.stringToPrint = string;</l></block><list><block var="string"/></list></block><block s="doWait"><l>0</l></block></script><scripts><script x="310.9999990000001" y="47"><block s="doReport"><block s="reportURL"><block s="reportJoinWords"><list><l>http://127.0.0.1:30061/hummingbird/out/print/</l><block var="string"/></list></block></block></block></script><script x="335" y="1024.8333343333334"><block var="intensity"/></script></scripts></block-definition><block-definition s="micro:bit Display $nl %&apos;r1c1&apos; %&apos;r1c2&apos; %&apos;r1c3&apos; %&apos;r1c4&apos; %&apos;r1c5&apos; $nl %&apos;r2c1&apos; %&apos;r2c2&apos; %&apos;r2c3&apos; %&apos;r2c4&apos; %&apos;r2c5&apos; $nl %&apos;r3c1&apos; %&apos;r3c2&apos; %&apos;r3c3&apos; %&apos;r3c4&apos; %&apos;r3c5&apos; $nl %&apos;r4c1&apos; %&apos;r4c2&apos; %&apos;r4c3&apos; %&apos;r4c4&apos; %&apos;r4c5&apos; $nl %&apos;r5c1&apos; %&apos;r5c2&apos; %&apos;r5c3&apos; %&apos;r5c4&apos; %&apos;r5c5&apos;" type="command" category="looks"><header></header><code></code><translations>ko:micro:bit 보이기 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _&#xD;de:micro:bit LED Anzeige _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _&#xD;pt:micro:bit Visor _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _&#xD;fr:micro:bit Display _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _&#xD;nl:micro:bit Scherm _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _&#xD;zh_CN:micro:bit 显示 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _&#xD;zh_TW:micro:bit 顯示 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _&#xD;ar:micro:bit عرض _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _&#xD;dk:micro:bit Display _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _&#xD;he:micro:bit מסך _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _&#xD;es:micro:bit Monitor _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _&#xD;ca:micro:bit Pantalla _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _&#xD;fi:micro:bit Näytä _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _&#xD;sv:micro:bit Skärm _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _&#xD;</translations><inputs><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>r1c1, r1c2, r1c3, r1c4, r1c5, r2c1, r2c2, r2c3, r2c4, r2c5, r3c1, r3c2, r3c3, r3c4, r3c5, r4c1, r4c2, r4c3, r4c4, r4c5, r5c1, r5c2, r5c3, r5c4, r5c5 </l></list><l>////////////////////////////////////////////////////////////////////////////////&#xD;// In order to avoid sending more messages than the app can handle, whenever we&#xD;// send a message we also save it in a persistent global variable. When the&#xD;// message is processed in the app, the callback checks if the global variable&#xD;// still matches what it was changed to. If it was, it deletes the global&#xD;// variable. Otherwise the message is resent with new data.&#xD;//&#xD;// When this block is called it checks if the global value has been set. If it&#xD;// has, it sends a message. Otherwise it just updates the value and lets the&#xD;// callback handle it.&#xD;&#xD;// Create url representation from inputs&#xD;var symbolString =  r1c1 + "\/"+ r1c2 + "\/"+ r1c3 + "\/"+ r1c4 + "\/"+ r1c5 + "\/" +&#xD;                    r2c1 + "\/"+ r2c2 + "\/"+ r2c3 + "\/"+ r2c4 + "\/"+ r2c5 + "\/" +&#xD;                    r3c1 + "\/"+ r3c2 + "\/"+ r3c3 + "\/"+ r3c4 + "\/"+ r3c5 + "\/" +&#xD;                    r4c1 + "\/"+ r4c2 + "\/"+ r4c3 + "\/"+ r4c4 + "\/"+ r4c5 + "\/" +&#xD;                    r5c1 + "\/"+ r5c2 + "\/"+ r5c3 + "\/"+ r5c4 + "\/"+ r5c5 ;&#xD;&#xD;//r1c1, r1c2, r1c3, r1c4, r1c5, r2c1, r2c2, r2c3, r2c4, r2c5, r3c1, r3c2, r3c3, r3c4, r3c5, r4c1, r4c2, r4c3, r4c4, r4c5, r5c1, r5c2, r5c3, r5c4, r5c5 &#xD;&#xD;// We can&apos;t run code beforehand to define values so we must check each block&#xD;// call if they are set.&#xD;if (window.birdbrain === undefined || window.birdbrain.symbolObj === undefined) {&#xD;    window.birdbrain = window.birdbrain || {};&#xD;    window.birdbrain.symbolObj = {&#xD;        // By attaching this function to a global variable, it is only&#xD;        // defined once instead of every time this block is called, improving&#xD;        // performance significantly.&#xD;        printSymbol: function(symbol) {&#xD;            function callback() {&#xD;                if (window.birdbrain.symbolObj.symbolToPrint === symbol) {  // Check if arrays are equal&#xD;                    delete window.birdbrain.symbolObj.symbolToPrint;&#xD;                }&#xD;                else {&#xD;                    window.birdbrain.symbolObj.printSymbol(window.birdbrain.symbolObj.symbolToPrint);&#xD;                }&#xD;            }&#xD;&#xD;            //Create a new XMLHttpRequest object&#xD;            var xhr = new XMLHttpRequest();&#xD;            var symbolURL = "http://127.0.0.1:30061/hummingbird/out/symbol/A/" + symbol;&#xD;            xhr.open("GET", symbolURL, true);&#xD;            xhr.onload = function (e) {&#xD;              if (xhr.readyState === 4) {&#xD;                if (xhr.status === 200) {&#xD;                  callback();&#xD;                } else {&#xD;                  console.error(xhr.statusText);&#xD;                }&#xD;              }&#xD;            };&#xD;            xhr.onerror = function (e) {&#xD;              console.error(xhr.statusText);&#xD;            };&#xD;            xhr.send(null);&#xD;&#xD;        }&#xD;    }&#xD;}&#xD;&#xD;if (window.birdbrain.symbolObj.symbolToPrint === undefined) {&#xD;  window.birdbrain.symbolObj.printSymbol(symbolString);&#xD;}&#xD;&#xD;window.birdbrain.symbolObj.symbolToPrint = symbolString;&#xD;&#xD;&#xD;</l></block><list><block var="r1c1"/><block var="r1c2"/><block var="r1c3"/><block var="r1c4"/><block var="r1c5"/><block var="r2c1"/><block var="r2c2"/><block var="r2c3"/><block var="r2c4"/><block var="r2c5"/><block var="r3c1"/><block var="r3c2"/><block var="r3c3"/><block var="r3c4"/><block var="r3c5"/><block var="r4c1"/><block var="r4c2"/><block var="r4c3"/><block var="r4c4"/><block var="r4c5"/><block var="r5c1"/><block var="r5c2"/><block var="r5c3"/><block var="r5c4"/><block var="r5c5"/></list></block><block s="doWait"><l></l></block></script><scripts><script x="731" y="16"><block s="doReport"><block s="reportURL"><block s="reportJoinWords"><list><l>http://127.0.0.1:30061/hummingbird/out/symbol/A/</l><block var="11"/><l>/</l><block var="12"/><l>/</l><block var="r1c3"/><l>/</l><block var="r1c4"/><l>/</l><block var="r1c5"/><l>/</l><block var="r2c1"/><l>/</l><block var="r2c2"/><l>/</l><block var="r2c3"/><l>/</l><block var="r2c4"/><l>/</l><block var="25"/><l>/</l><block var="31"/><l>/</l><block var="r3c2"/><l>/</l><block var="33"/><l>/</l><block var="34"/><l>/</l><block var="35"/><l>/</l><block var="41"/><l>/</l><block var="42"/><l>/</l><block var="43"/><l>/</l><block var="44"/><l>/</l><block var="45"/><l>/</l><block var="51"/><l>/</l><block var="52"/><l>/</l><block var="53"/><l>/</l><block var="54"/><l>/</l><block var="55"/></list></block></block></block></script></scripts></block-definition><block-definition s="reshape as %&apos;shape&apos; $⍴-1-255-255-0 items of %&apos;data&apos;" type="reporter" category="lists"><comment x="0" y="0" w="180" collapsed="false">The first input is a shape list as in&#xD;SHAPE OF.  The output is an array with those dimensions containing  the atomic items of the second input,&#xD;repeating values if more are needed.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%l"></input></inputs><script><block s="doReport"><custom-block s="reshape helper %l %l"><block var="shape"/><custom-block s="flatten (ravel) $,-1-255-255-0 %l"><block var="data"/></custom-block></custom-block></block></script></block-definition><block-definition s="shape of $⍴-1-255-255-0 %&apos;data&apos;" type="reporter" category="lists"><comment x="0" y="0" w="310" collapsed="false">Reports a flat list of the maximum size of the input array along&#xD;each dimension: number of rows, number of columns, etc.&#xD;&quot;Maximum&quot; because it works even if the array isn&apos;t uniformly shaped.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>sublists</l></list></block><block s="doIfElse"><block s="reportIsA"><block var="data"/><l><option>list</option></l></block><script><block s="doSetVar"><l>sublists</l><block s="reportKeep"><block s="reifyPredicate"><autolambda><block s="reportNot"><block s="reportListIsEmpty"><l/></block></block></autolambda><list></list></block><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="shape of $⍴-1-255-255-0 %l"><l/></custom-block></autolambda><list></list></block><block var="data"/></block></block></block><block s="doIfElse"><block s="reportListIsEmpty"><block var="sublists"/></block><script><block s="doReport"><block s="reportNewList"><list><block s="reportListLength"><block var="data"/></block></list></block></block></script><script><block s="doReport"><block s="reportCONS"><block s="reportListLength"><block var="data"/></block><custom-block s="flatten (ravel) $,-1-255-255-0 %l"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportCombine"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><block var="number"/><l/></block></autolambda><list></list></block><block var="sublists"/></block><block s="reifyReporter"><autolambda><custom-block s="max %s $⌈-1-255-255-0 %s"><l></l><l></l></custom-block></autolambda><list></list></block></block></autolambda><list><l>number</l></list></block><block s="reportNumbers"><l>1</l><block s="reportCombine"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListLength"><l/></block></autolambda><list></list></block><block var="sublists"/></block><block s="reifyReporter"><autolambda><custom-block s="max %s $⌈-1-255-255-0 %s"><l></l><l></l></custom-block></autolambda><list></list></block></block></block></block></custom-block></block></block></script></block></script><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block></script></block-definition><block-definition s="max %&apos;a&apos; $⌈-1-255-255-0 %&apos;b&apos;" type="reporter" category="operators"><comment x="0" y="0" w="150.66666666666666" collapsed="false">Reports the greater of its two inputs. Works on strings too.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><block s="evaluate"><custom-block s="scalar -&gt; hyper %repRing"><block s="reifyReporter"><autolambda><block s="reportIfElse"><block s="reportGreaterThan"><block var="a"/><block var="b"/></block><block var="a"/><block var="b"/></block></autolambda><list><l>a</l><l>b</l></list></block></custom-block><list><block var="a"/><block var="b"/></list></block></block></script></block-definition><block-definition s="flatten (ravel) $,-1-255-255-0 %&apos;data&apos;" type="reporter" category="lists"><comment x="0" y="0" w="216" collapsed="false">Reports a flat list of all the atomic elements &#xD;of sublists of the input list.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doIfElse"><block s="reportIsA"><block var="data"/><l><option>list</option></l></block><script><block s="doReport"><block s="reportConcatenatedLists"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="flatten (ravel) $,-1-255-255-0 %l"><l/></custom-block></autolambda><list></list></block><block var="data"/></block></block></block></script><script><block s="doReport"><block s="reportNewList"><list><block var="data"/></list></block></block></script></block></script></block-definition><block-definition s="outer product %&apos;a&apos; $○.-1-255-255-0 %&apos;function&apos; %&apos;b&apos;" type="reporter" category="lists"><comment x="0" y="0" w="297.99999999999994" collapsed="false">Given two arrays A and B, reports an array whose dimensions are&#xD;APPEND(SHAPE OF (A), SHAPE OF (B))&#xD;in which each atomic item of the result is computed by applying the dyadic function input to an item of A and an item of B.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%repRing"></input><input type="%l"></input></inputs><script><block s="doIf"><block s="reportEquals"><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="a"/></custom-block><l>0</l></block><script><block s="doReport"><block s="evaluate"><block var="function"/><list><block var="a"/><block var="b"/></list></block></block></script></block><block s="doIf"><block s="reportListIsEmpty"><block var="a"/></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doReport"><block s="reportCONS"><custom-block s="outer product %l $○.-1-255-255-0 %repRing %l"><block s="reportListItem"><l>1</l><block var="a"/></block><block var="function"/><block var="b"/></custom-block><custom-block s="outer product %l $○.-1-255-255-0 %repRing %l"><block s="reportCDR"><block var="a"/></block><block var="function"/><block var="b"/></custom-block></block></block></script></block-definition><block-definition s="identity $+-1-255-255-0 %&apos;x&apos;" type="reporter" category="operators"><comment x="0" y="0" w="210.00000000000003" collapsed="false">Reports its input.&#xD;This is useful to fit a value into a different-type input slot, e.g., number into list slot.</comment><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="rank of $⍴⍴-1-255-255-0 %&apos;array&apos;" type="reporter" category="lists"><comment x="0" y="0" w="240" collapsed="true">Reports the number of dimensions of the input.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportListItem"><l>1</l><custom-block s="shape of $⍴-1-255-255-0 %l"><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="array"/></custom-block></custom-block></block></block></script></block-definition><block-definition s="inner product helper with %&apos;plus&apos; . %&apos;times&apos; %&apos;a&apos; transposed %&apos;tb&apos;" type="reporter" category="other"><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%repRing"></input><input type="%l"></input><input type="%l"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block var="a"/></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doIf"><block s="reportNot"><block s="reportIsA"><block s="reportListItem"><l>1</l><block s="reportListItem"><l>1</l><block var="a"/></block></block><l><option>list</option></l></block></block><script><block s="doReport"><block s="reportCONS"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="generalized dotproduct %l %l with sum %repRing product %repRing"><block s="reportListItem"><l>1</l><block var="a"/></block><l/><block var="plus"/><block var="times"/></custom-block></autolambda><list></list></block><block var="tb"/></block><custom-block s="inner product helper with %repRing . %repRing %l transposed %l"><block var="plus"/><block var="times"/><block s="reportCDR"><block var="a"/></block><block var="tb"/></custom-block></block></block></script></block><block s="doReport"><block s="reportCONS"><custom-block s="inner product helper with %repRing . %repRing %l transposed %l"><block var="plus"/><block var="times"/><block s="reportListItem"><l>1</l><block var="a"/></block><block var="tb"/></custom-block><custom-block s="inner product helper with %repRing . %repRing %l transposed %l"><block var="plus"/><block var="times"/><block s="reportCDR"><block var="a"/></block><block var="tb"/></custom-block></block></block></script></block-definition><block-definition s="transpose $⍉-1.5-255-255-0 %&apos;array&apos;" type="reporter" category="lists"><comment x="0" y="0" w="168" collapsed="false">Takes a multidimensional array, and&#xD;reports an array whose dimensions&#xD;are reversed (as reported by&#xD;SHAPE OF).  In the case of a&#xD;two-dimensional array, does the usual transposition of rows and columns.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="array"/><l><option>list</option></l></block></block><script><block s="doReport"><block var="array"/></block></script></block><block s="doIf"><block s="reportListIsEmpty"><block var="array"/></block><script><block s="doReport"><block s="reportNewList"><list><block s="reportNewList"><list></list></block></list></block></block></script><comment w="290.6666666666667" collapsed="true">If there are no atomic data, we don&apos;t have any shape information, so we can&apos;t really transpose it.  But an empty list is 0 rows of some number of columns, so the transpose should be 0 columns in some number of rows.  We arbitrarily make it 0 columns of one row.  This at least has one dimension of the shape correct.</comment></block><block s="doIf"><block s="reportNot"><block s="reportIsA"><block s="reportListItem"><l>1</l><block var="array"/></block><l><option>list</option></l></block></block><script><block s="doReport"><block var="array"/></block></script><comment w="274.6666666666667" collapsed="true">The transpose of a vector is just the vector itself.</comment></block><block s="doIf"><block s="reportListIsEmpty"><block s="reportListItem"><l>1</l><block var="array"/></block></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script><comment w="274.6666666666667" collapsed="true">This is the opposite no-atomic-data situation from above.  We know that there are (length array) rows of 0 columns, so the transpose is 0 rows, i.e., an empty list.  But we lose the number of original rows, transpose columns.</comment></block><block s="doReport"><custom-block s="deep map %repRing %predRing %l"><block s="reifyReporter"><autolambda><custom-block s="nth item 1 %n %l"><block s="reportListLength"><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="array"/></custom-block></block><block s="reportListItem"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportNewList"><list><l></l></list></block></autolambda><list></list></block><block var="atom"/></block><block var="array"/></block></custom-block></autolambda><list><l>atom</l></list></block><block s="reifyPredicate"><autolambda><block s="reportCombine"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportNot"><block s="reportIsA"><l></l><l><option>list</option></l></block></block></autolambda><list></list></block><block var="node"/></block><block s="reifyReporter"><autolambda><block s="reportAnd"><l/><l/></block></autolambda><list></list></block></block></autolambda><list><l>node</l></list></block><custom-block s="$⍳-1.5-255-255-0 %n"><custom-block s="reverse row order (column contents) $⦵-1.5-255-255-0 %l"><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="array"/></custom-block></custom-block></custom-block></custom-block></block></script><scripts><script x="690.0310872395834" y="485.55555555555566"><block var="array"/></script><script x="544.6666666666666" y="306.1111111111114"><block s="doIf"><block s="reportListIsEmpty"><block s="reportCDR"><block var="array"/></block></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportNewList"><list><l></l></list></block></autolambda><list></list></block><block s="reportListItem"><l>1</l><block var="array"/></block></block></block></script><comment w="212.66666666666666" collapsed="true">This is one row, n columns.  So the transpose is n rows, one column.</comment></block></script></scripts></block-definition><block-definition s="reverse row order (column contents) $⦵-1.5-255-255-0 %&apos;list&apos;" type="reporter" category="lists"><comment x="0" y="0" w="286" collapsed="false">Reverses the order of the (toplevel) items of the input.&#xD;&#xD;If the input is a matrix, this means it reverses the order of the rows, which is a reflection through a horizontal axis, as the ⦵ symbol suggests.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block var="list"/></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l></l><block var="list"/></block></autolambda><list></list></block><block s="reportNumbers"><block s="reportListLength"><block var="list"/></block><l>1</l></block></block></block></script></block-definition><block-definition s="deep insert %&apos;first&apos; %&apos;rest&apos;" type="reporter" category="other"><comment x="0" y="0" w="131.33333333333334" collapsed="false">Recursively deep-inserts&#xD;the items of the first input&#xD;into the items of the second&#xD;input.  If the first input is not&#xD;a list, then it is inserted with&#xD;IN FRONT OF in the second&#xD;unless the second also isn&apos;t&#xD;a list, in which case they are&#xD;combined with LIST.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%l"></input></inputs><script><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="first"/><l><option>list</option></l></block></block><script><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="rest"/><l><option>list</option></l></block></block><script><block s="doReport"><block s="reportNewList"><list><block var="first"/><block var="rest"/></list></block></block></script></block><block s="doReport"><block s="reportCONS"><block var="first"/><block var="rest"/></block></block></script></block><block s="doIf"><block s="reportAnd"><block s="reportNot"><block s="reportIsA"><block s="reportListItem"><l>1</l><block var="first"/></block><l><option>list</option></l></block></block><block s="reportListIsEmpty"><block s="reportCDR"><block var="first"/></block></block></block><script><block s="doReport"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="first"/></block><block var="rest"/></block></block></script></block><block s="doReport"><custom-block s="multimap %repRing %mult%l"><block s="reifyReporter"><autolambda><custom-block s="deep insert %l %l"><l/><l/></custom-block></autolambda><list></list></block><list><block var="first"/><block var="rest"/></list></custom-block></block></script></block-definition><block-definition s="multimap %&apos;function&apos; %&apos;data&apos;" type="reporter" category="other"><comment x="0" y="0" w="215.33333333333334" collapsed="false">Like MAP, but can take any number of lists&#xD;as inputs.  The lists must all be the same size.&#xD;The function input must take a number of inputs&#xD;equal to the number of lists.  MULTIMAP calls&#xD;the function with all the first items, then all the&#xD;second items, and so on.</comment><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%mult%l"></input></inputs><script><block s="doIf"><custom-block s="combine in rows (reduce by column vectors) %repRing $/-1-255-255-0 %l"><block s="reifyReporter"><autolambda><block s="reportOr"><l/><l/></block></autolambda><list></list></block><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListIsEmpty"><l/></block></autolambda><list></list></block><block var="data"/></block></custom-block><script><block s="doIfElse"><custom-block s="combine in rows (reduce by column vectors) %repRing $/-1-255-255-0 %l"><block s="reifyReporter"><autolambda><block s="reportAnd"><l/><l/></block></autolambda><list></list></block><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListIsEmpty"><l/></block></autolambda><list></list></block><block var="data"/></block></custom-block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script><script><custom-block s="error %txt"><l>Non-conforming shapes.</l></custom-block></script></block></script></block><block s="doReport"><block s="reportCONS"><block s="evaluate"><block var="function"/><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>1</l><l/></block></autolambda><list></list></block><block var="data"/></block></block><custom-block s="multimap %repRing %mult%l"><block var="function"/><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportCDR"><l/></block></autolambda><list></list></block><block var="data"/></block></custom-block></block></block></script></block-definition><block-definition s="printable %&apos;data&apos;" type="reporter" category="lists"><comment x="0" y="0" w="188.66666666666666" collapsed="false">Takes a (possibly deep) list as input,&#xD;and reports a human-readable text form &#xD;of the list (namely, Lisp notation).</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="data"/><l><option>list</option></l></block></block><script><block s="doReport"><block var="data"/></block></script></block><block s="doIf"><block s="reportListIsEmpty"><block var="data"/></block><script><block s="doReport"><l>()</l></block></script></block><block s="doReport"><block s="reportJoinWords"><list><l>(</l><block s="reportCombine"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="printable %l"><l/></custom-block></autolambda><list></list></block><block var="data"/></block><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><l></l><l> </l><l></l></list></block></autolambda><list></list></block></block><l>)</l></list></block></block></script></block-definition><block-definition s="generalized dotproduct %&apos;a&apos; %&apos;b&apos; with sum %&apos;sum&apos; product %&apos;product&apos;" type="reporter" category="other"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%l"></input><input type="%repRing"></input><input type="%repRing"></input></inputs><script><block s="doReport"><block s="reportCombine"><custom-block s="multimap %repRing %mult%l"><block var="product"/><list><block var="a"/><block var="b"/></list></custom-block><block var="sum"/></block></block></script></block-definition><block-definition s="inner product %&apos;a&apos; %&apos;plus&apos; $.-1-255-255-0 %&apos;times&apos; %&apos;b&apos;" type="reporter" category="lists"><comment x="0" y="0" w="252.66666666666666" collapsed="false">Computes a generalized matrix multiplication.&#xD;&#xD;In normal matrix multiplication, each cell of the result&#xD;is computed by multiplying individual numbers within&#xD;a row of the left input and a column of the right input,&#xD;and then adding those products.  In APL terms this is&#xD;+.× (&quot;plus dot times&quot;)&#xD;Any dyadic functions can replace addition and multiplication in this algorithm; a common case is&#xD;∨.∧ (&quot;or dot and&quot;)</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%repRing"></input><input type="%repRing"></input><input type="%l"></input></inputs><script><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="a"/><l><option>list</option></l></block></block><script><block s="doSetVar"><l>a</l><block s="reportNewList"><list><block var="a"/></list></block></block></script></block><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="b"/><l><option>list</option></l></block></block><script><block s="doSetVar"><l>b</l><block s="reportNewList"><list><block var="b"/></list></block></block></script></block><block s="doIf"><block s="reportAnd"><block s="reportEquals"><block s="reportListItem"><l><option>last</option></l><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="a"/></custom-block></block><l>1</l></block><block s="reportGreaterThan"><block s="reportListItem"><l>1</l><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="b"/></custom-block></block><l>1</l></block></block><script><block s="doDeclareVariables"><list><l>ta</l></list></block><block s="doSetVar"><l>ta</l><custom-block s="transpose $⍉-1.5-255-255-0 %l"><block var="a"/></custom-block></block><block s="doSetVar"><l>a</l><custom-block s="transpose $⍉-1.5-255-255-0 %l"><block s="reportMap"><block s="reifyReporter"><autolambda><block var="ta"/></autolambda><list></list></block><block s="reportNumbers"><l>1</l><block s="reportListItem"><l>1</l><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="b"/></custom-block></block></block></block></custom-block></block></script></block><block s="doIf"><block s="reportAnd"><block s="reportGreaterThan"><block s="reportListItem"><l><option>last</option></l><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="a"/></custom-block></block><l>1</l></block><block s="reportEquals"><block s="reportListItem"><l>1</l><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="b"/></custom-block></block><l>1</l></block></block><script><block s="doSetVar"><l>b</l><block s="reportMap"><block s="reifyReporter"><autolambda><block var="b"/></autolambda><list></list></block><block s="reportNumbers"><l>1</l><block s="reportListItem"><l><option>last</option></l><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="a"/></custom-block></block></block></block></block></script></block><block s="doReport"><custom-block s="inner product helper with %repRing . %repRing %l transposed %l"><block var="plus"/><block var="times"/><block var="a"/><custom-block s="transpose $⍉-1.5-255-255-0 %l"><block var="b"/></custom-block></custom-block></block></script></block-definition><block-definition s="min %&apos;a&apos; $⌊-1.2-255-255-0 %&apos;b&apos;" type="reporter" category="operators"><comment x="0" y="0" w="211.33333333333334" collapsed="true">Reports the smaller of its two inputs.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><block s="evaluate"><custom-block s="scalar -&gt; hyper %repRing"><block s="reifyReporter"><autolambda><block s="reportIfElse"><block s="reportLessThan"><block var="a"/><block var="b"/></block><block var="a"/><block var="b"/></block></autolambda><list><l>a</l><l>b</l></list></block></custom-block><list><block var="a"/><block var="b"/></list></block></block></script></block-definition><block-definition s="log base %&apos;b&apos; $⍟-1.5-255-255-0 %&apos;x&apos;" type="reporter" category="operators"><comment x="0" y="0" w="212" collapsed="false">Computes logarithms in any base.&#xD;&#xD;The base is the left input.  It&apos;s usual in APL that if there&apos;s a main data input and some sort of control input, the latter comes on the left.  This is because APL syntax, unless you use parentheses, groups computations from right to left.&#xD;&#xD;APL has a monadic version of this function that computes natural logs (log to the base e).</comment><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="evaluate"><custom-block s="scalar -&gt; hyper %repRing"><block s="reifyReporter"><autolambda><block s="reportQuotient"><block s="reportMonadic"><l><option>ln</option></l><block var="x"/></block><block s="reportMonadic"><l><option>ln</option></l><block var="b"/></block></block></autolambda><list><l>b</l><l>x</l></list></block></custom-block><list><block var="b"/><block var="x"/></list></block></block></script></block-definition><block-definition s="combs %&apos;r&apos; at a time $!-1-255-255-0 of %&apos;n&apos;" type="reporter" category="operators"><comment x="0" y="0" w="218.66666666666666" collapsed="false">Computes the number of combinations of right-input things taken left-input at a time, otherwise known as the elements of Pascal&apos;s triangle.  This block shares the ! symbol with the monadic factorial function, because the formula for computing this function uses factorials.</comment><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="evaluate"><custom-block s="scalar -&gt; hyper %repRing"><block s="reifyReporter"><autolambda><block s="reportIfElse"><block s="reportAnd"><custom-block s="%s ≥ %s"><block var="n"/><l>0</l></custom-block><block s="reportAnd"><custom-block s="%s ≥ %s"><block var="r"/><l>0</l></custom-block><custom-block s="%s ≤ %s"><block var="r"/><block var="n"/></custom-block></block></block><block s="reportQuotient"><custom-block s="factorial $!-1-255-255-0 %n"><block var="n"/></custom-block><block s="reportProduct"><custom-block s="factorial $!-1-255-255-0 %n"><block var="r"/></custom-block><custom-block s="factorial $!-1-255-255-0 %n"><block s="reportDifference"><block var="n"/><block var="r"/></block></custom-block></block></block><l>0</l></block></autolambda><list><l>r</l><l>n</l></list></block></custom-block><list><block var="r"/><block var="n"/></list></block></block></script></block-definition><block-definition s="factorial $!-1-255-255-0 %&apos;n&apos;" type="reporter" category="operators"><comment x="0" y="0" w="172.66666666666666" collapsed="false">The factorial of a positive integer n is the product of the integers from 1 to n.&#xD;&#xD;In real APL, the domain of this function is extended beyond integers to compute the gamma function.</comment><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doIfElse"><block s="reportIsA"><block var="n"/><l><option>list</option></l></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="factorial $!-1-255-255-0 %n"><l></l></custom-block></autolambda><list></list></block><block var="n"/></block></block></script><script><block s="doReport"><block s="reportIfElse"><custom-block s="zero? %n"><block var="n"/></custom-block><l>1</l><custom-block s="combine in rows (reduce by column vectors) %repRing $/-1-255-255-0 %l"><block s="reifyReporter"><autolambda><block s="reportProduct"><l></l><l></l></block></autolambda><list></list></block><block s="reportNumbers"><l>1</l><block var="n"/></block></custom-block></block></block></script></block></script></block-definition><block-definition s="combine in rows (reduce by column vectors) %&apos;func&apos; $/-1-255-255-0 %&apos;stuff&apos;" type="reporter" category="lists"><comment x="0" y="0" w="288.6666666666667" collapsed="false">This function has two names because there are two ways&#xD;to understand it.&#xD;&#xD;Lisp way:  A matrix is a list of rows.  This block combines the numbers in each row, producing one value for the entire row.&#xD;&#xD;APL way:  A matrix is made of vectors.  This block takes each column as a vector, and does vector arithmetic on the columns, producing one column as the result.</comment><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%l"></input></inputs><script><block s="doIfElse"><block s="reportGreaterThan"><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="stuff"/></custom-block><l>1</l></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="combine in rows (reduce by column vectors) %repRing $/-1-255-255-0 %l"><block var="func"/><l/></custom-block></autolambda><list></list></block><block var="stuff"/></block></block></script><script><block s="doReport"><block s="reportCombine"><block var="stuff"/><block var="func"/></block></block></script></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="%&apos;a&apos; scalar %&apos;pred&apos; %&apos;b&apos;" type="predicate" category="operators"><comment x="0" y="0" w="190" collapsed="false">Acts just like the function selected from&#xD;the pulldown menu, but hyperized, so&#xD;comparing two equal-sized lists reports&#xD;a list of the same length as the inputs,&#xD;with the results of item-by-item comparisons.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s" readonly="true">﹦<options>﹦&#xD;≠&#xD;identical to&#xD;and&#xD;or&#xD;is _ a _?</options></input><input type="%s"></input></inputs><script><block s="doReport"><block s="evaluate"><custom-block s="scalar -&gt; hyper %repRing"><block s="reifyReporter"><autolambda><block s="evaluate"><block s="reportListItem"><block s="reportListIndex"><block var="pred"/><block s="reportNewList"><list><l>﹦</l><l>≠</l><l>identical to</l><l>and</l><l>or</l><l>is _ a _?</l></list></block></block><block s="reportNewList"><list><block s="reifyPredicate"><autolambda><block s="reportEquals"><l></l><l></l></block></autolambda><list></list></block><block s="reifyPredicate"><autolambda><block s="reportNot"><block s="reportEquals"><l></l><l></l></block></block></autolambda><list></list></block><block s="reifyPredicate"><autolambda><block s="reportIsIdentical"><l></l><l></l></block></autolambda><list></list></block><block s="reifyPredicate"><autolambda><block s="reportAnd"><l/><l/></block></autolambda><list></list></block><block s="reifyPredicate"><autolambda><block s="reportOr"><l/><l/></block></autolambda><list></list></block><block s="reifyPredicate"><autolambda><block s="reportIsA"><l></l><l></l></block></autolambda><list></list></block></list></block></block><list><block var="a"/><block var="b"/></list></block></autolambda><list><l>a</l><l>b</l></list></block></custom-block><list><block var="a"/><block var="b"/></list></block></block></script></block-definition><block-definition s="%&apos;howmany&apos; deal $?-1-255-255-0 %&apos;range&apos;" type="reporter" category="operators"><comment x="0" y="0" w="177.33333333333334" collapsed="false">Report a list with left-input random integers in the range 1 to right-input.&#xD;No number appears more than once&#xD;in the result.</comment><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="evaluate"><custom-block s="scalar -&gt; hyper %repRing"><block s="reifyReporter"><autolambda><custom-block s="%n deal helper %l"><block var="howmany"/><block s="reportNumbers"><l>1</l><block var="range"/></block></custom-block></autolambda><list><l>howmany</l><l>range</l></list></block></custom-block><list><block var="howmany"/><block var="range"/></list></block></block></script></block-definition><block-definition s="%&apos;howmany&apos; deal helper %&apos;data&apos;" type="reporter" category="other"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%l"></input></inputs><script><block s="doIf"><block s="reportEquals"><block var="howmany"/><l>0</l></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doDeclareVariables"><list><l>choice</l></list></block><block s="doSetVar"><l>choice</l><block s="reportListItem"><block s="reportRandom"><l>1</l><block s="reportListLength"><block var="data"/></block></block><block var="data"/></block></block><block s="doReport"><block s="reportCONS"><block var="choice"/><custom-block s="%n deal helper %l"><block s="reportDifference"><block var="howmany"/><l>1</l></block><block s="reportKeep"><block s="reifyPredicate"><autolambda><block s="reportNot"><block s="reportEquals"><l></l><block var="choice"/></block></block></autolambda><list></list></block><block var="data"/></block></custom-block></block></block></script></block-definition><block-definition s="signum $×-1-255-255-0 %&apos;num&apos;" type="reporter" category="operators"><comment x="0" y="0" w="159.99999999999997" collapsed="false">Reports 1 if the input is positive,&#xD;0 if the input is zero,&#xD;or -1 if the input is negative.</comment><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doIf"><block s="reportIsA"><block var="num"/><l><option>list</option></l></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="signum $×-1-255-255-0 %n"><l></l></custom-block></autolambda><list></list></block><block var="num"/></block></block></script></block><block s="doIf"><block s="reportListContainsItem"><block s="reportNewList"><list><l>0</l><block s="reportBoolean"><l><bool>false</bool></l></block></list></block><block var="num"/></block><script><block s="doReport"><l>0</l></block></script></block><block s="doReport"><block s="reportQuotient"><block var="num"/><block s="reportMonadic"><l><option>abs</option></l><block var="num"/></block></block></block></script></block-definition><block-definition s="reciprocal $÷-1-255-255-0 %&apos;num&apos;" type="reporter" category="operators"><comment x="0" y="0" w="102.66666666666667" collapsed="false">reports 1 divided&#xD;by its input.</comment><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doReport"><block s="reportQuotient"><l>1</l><block var="num"/></block></block></script></block-definition><block-definition s="roll $?-1-255-255-0 %&apos;num&apos;" type="reporter" category="operators"><comment x="0" y="0" w="180.66666666666666" collapsed="false">This block reports a random integer between 1 and its input.  To roll more than one die, use (for three dice)&#xD;roll (reshape as 3 items of 6)&#xD;APL:  ?3⍴6&#xD;Don&apos;t use reshape as 3 items of roll 6, because that would roll one die and report 3 copies of the same random roll. </comment><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doReport"><block s="reportRandom"><l>1</l><block var="num"/></block></block></script></block-definition><block-definition s="GCD (or) %&apos;a&apos; $∨-1.2-255-255-0 %&apos;b&apos;" type="reporter" category="operators"><comment x="0" y="0" w="230.66666666666666" collapsed="false">Reports the greatest common divisor of its inputs.&#xD;If the inputs are values in {0,1} then this is equivalent to the logical OR of the values, with 0=False, 1=True.  Hence the APL symbol ∨.&#xD;Also accepts Snap! Booleans as inputs.</comment><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="evaluate"><custom-block s="scalar -&gt; hyper %repRing"><block s="reifyReporter"><script><block s="doIf"><block s="reportListContainsItem"><block s="reportNewList"><list><l>0</l><block s="reportBoolean"><l><bool>false</bool></l></block></list></block><block var="b"/></block><script><block s="doReport"><block var="a"/></block></script></block><block s="doReport"><custom-block s="GCD (or) %n $∨-1.2-255-255-0 %n"><block var="b"/><block s="reportModulus"><block var="a"/><block var="b"/></block></custom-block></block></script><list><l>a</l><l>b</l></list></block></custom-block><list><block var="a"/><block var="b"/></list></block></block></script></block-definition><block-definition s="scalar -&gt; hyper %&apos;func&apos;" type="reporter" category="control"><comment x="0" y="0" w="218" collapsed="false">Takes a dyadic scalar function as input, and&#xD;hyperizes it, so that it can take lists as inputs.</comment><header></header><code></code><translations></translations><inputs><input type="%repRing"></input></inputs><script><block s="doDeclareVariables"><list><l>hyper func</l></list></block><block s="doSetVar"><l>hyper func</l><block s="reifyReporter"><script><block s="doIfElse"><custom-block s="scalar? %s"><block var="a"/></custom-block><script><block s="doIfElse"><custom-block s="scalar? %s"><block var="b"/></custom-block><script><block s="doReport"><block s="evaluate"><block var="func"/><list><custom-block s="scalar-value helper %s"><block var="a"/></custom-block><custom-block s="scalar-value helper %s"><block var="b"/></custom-block></list></block></block></script><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="evaluate"><block var="hyper func"/><list><custom-block s="scalar-value helper %s"><block var="a"/></custom-block><l></l></list></block></autolambda><list></list></block><block var="b"/></block></block></script></block></script><script><block s="doIfElse"><custom-block s="scalar? %s"><block var="b"/></custom-block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="evaluate"><block var="hyper func"/><list><l></l><custom-block s="scalar-value helper %s"><block var="b"/></custom-block></list></block></autolambda><list></list></block><block var="a"/></block></block></script><script><block s="doReport"><custom-block s="multimap %repRing %mult%l"><block var="hyper func"/><list><block var="a"/><block var="b"/></list></custom-block></block></script></block></script></block></script><list><l>a</l><l>b</l></list></block></block><block s="doReport"><block var="hyper func"/></block></script></block-definition><block-definition s="scalar? %&apos;x&apos;" type="predicate" category="other"><comment x="0" y="0" w="199.33333333333334" collapsed="false">Reports True if the input is an APL scalar,&#xD;i.e., either an atomic (non-list) value, or&#xD;an array (list of lists) of any depth with only&#xD;one atomic item, e.g., (list (list (list (3)))).</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="x"/><l><option>list</option></l></block></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></block><block s="doReport"><block s="reportEquals"><block s="reportCombine"><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="x"/></custom-block><block s="reifyReporter"><autolambda><block s="reportProduct"><l></l><l></l></block></autolambda><list></list></block></block><l>1</l></block></block></script></block-definition><block-definition s="scalar-value helper %&apos;x&apos;" type="reporter" category="other"><comment x="0" y="0" w="200.66666666666666" collapsed="false">The input must be a value for which SCALAR? reports true, i.e., either an atom or a list of any depth but only one scalar item of item of... etc.  This function returns the underlying scalar (number, etc.).</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="x"/><l><option>list</option></l></block></block><script><block s="doReport"><block var="x"/></block></script></block><block s="doReport"><custom-block s="scalar-value helper %s"><block s="reportListItem"><l>1</l><block var="x"/></block></custom-block></block></script></block-definition><block-definition s="LCM (and) %&apos;a&apos; $∧-1.2-255-255-0 %&apos;b&apos;" type="reporter" category="operators"><comment x="0" y="0" w="230.66666666666666" collapsed="false">Reports the least common multiple of its inputs.&#xD;If the inputs are values in {0,1} then this is equivalent to the logical AND of the values, with 0=False, 1=True.  Hence the APL symbol ∧.&#xD;Also accepts Snap! Booleans as inputs.</comment><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input></inputs><script><block s="doReport"><block s="evaluate"><custom-block s="scalar -&gt; hyper %repRing"><block s="reifyReporter"><script><block s="doIf"><block s="reportListContainsItem"><block s="reportNewList"><list><l>0</l><block s="reportBoolean"><l><bool>false</bool></l></block></list></block><block var="b"/></block><script><block s="doReport"><block var="b"/></block></script></block><block s="doReport"><block s="reportProduct"><block var="a"/><block s="reportQuotient"><block var="b"/><custom-block s="GCD (or) %n $∨-1.2-255-255-0 %n"><block var="a"/><block var="b"/></custom-block></block></block></block></script><list><l>a</l><l>b</l></list></block></custom-block><list><block var="a"/><block var="b"/></list></block></block></script></block-definition><block-definition s="NAND %&apos;a&apos; $⍲-1.4-255-255-0 %&apos;b&apos;" type="predicate" category="operators"><comment x="0" y="0" w="198.66666666666666" collapsed="false">Reports the not-and of its inputs, in the form&#xD;0 for false, 1 for true.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><custom-block s="NOT $&#126;-1-255-255-0 %s"><custom-block s="LCM (and) %n $∧-1.2-255-255-0 %n"><block var="a"/><block var="b"/></custom-block></custom-block></block></script></block-definition><block-definition s="NOT $&#126;-1-255-255-0 %&apos;p&apos;" type="reporter" category="operators"><comment x="0" y="0" w="167.33333333333334" collapsed="false">Reports 1 if the input is False or 0;&#xD;otherwise reports 0.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="reportDifference"><l>1</l><custom-block s="signum $×-1-255-255-0 %n"><block var="p"/></custom-block></block></block></script></block-definition><block-definition s="NOR %&apos;a&apos; $⍱-1.4-255-255-0 %&apos;b&apos;" type="predicate" category="operators"><comment x="0" y="0" w="198.66666666666666" collapsed="false">Reports the not-and of its inputs, in the form&#xD;0 for false, 1 for true.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><custom-block s="NOT $&#126;-1-255-255-0 %s"><custom-block s="GCD (or) %n $∨-1.2-255-255-0 %n"><block var="a"/><block var="b"/></custom-block></custom-block></block></script></block-definition><block-definition s="%&apos;a&apos; ≤ %&apos;b&apos;" type="predicate" category="operators"><comment x="0" y="0" w="151.33333333333334" collapsed="false">Reports True if the left input is&#xD;less than or equal to the right input.&#xD;&#xD;Reports a Snap! Boolean, not an integer 0 or 1.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><custom-block s="truth %s"><custom-block s="NOT $&#126;-1-255-255-0 %s"><block s="reportGreaterThan"><block var="a"/><block var="b"/></block></custom-block></custom-block></block></script></block-definition><block-definition s="%&apos;a&apos; ≥ %&apos;b&apos;" type="predicate" category="operators"><comment x="0" y="0" w="152.66666666666666" collapsed="false">Reports True if the left input is&#xD;greater than than or equal to&#xD;the right input.&#xD;&#xD;Reports a Snap! Boolean, not an integer 0 or 1.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><custom-block s="truth %s"><custom-block s="NOT $&#126;-1-255-255-0 %s"><block s="reportLessThan"><block var="a"/><block var="b"/></block></custom-block></custom-block></block></script></block-definition><block-definition s="XOR %&apos;a&apos; $≠-1-255-255-0 %&apos;b&apos;" type="predicate" category="operators"><comment x="0" y="0" w="190" collapsed="false">Reports 0 if its inputs are equal;&#xD;reports 1 if its inputs are not equal.&#xD;The inputs can have any non-list values.&#xD;(Lists are hyperized.)  If the inputs are&#xD;Booleans (True/False or 1/0), this is&#xD;also the exclusive-or function.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><custom-block s="%s scalar %s %s"><block var="a"/><l>≠</l><block var="b"/></custom-block></block></script></block-definition><block-definition s="zero? %&apos;n&apos;" type="predicate" category="other"><comment x="0" y="0" w="202.66666666666666" collapsed="true">reports True iff the input is 0 or False.</comment><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doReport"><block s="reportListContainsItem"><block s="reportNewList"><list><l>0</l><block s="reportBoolean"><l><bool>false</bool></l></block></list></block><block var="n"/></block></block></script></block-definition><block-definition s="truth %&apos;n&apos;" type="predicate" category="other"><comment x="0" y="0" w="198.66666666666666" collapsed="false">Reports a Snap! Boolean False if the input&#xD;is False or 0; reports True otherwise.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="reportIfElse"><block s="reportIsA"><block var="n"/><l><option>Boolean</option></l></block><block var="n"/><block s="reportNot"><block s="reportEquals"><block var="n"/><l>0</l></block></block></block></block></script></block-definition><block-definition s="make scalar %&apos;value&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doIf"><custom-block s="scalar? %s"><block var="value"/></custom-block><script><block s="doReport"><custom-block s="scalar-value helper %s"><block var="value"/></custom-block></block></script></block><custom-block s="error %txt"><block s="reportJoinWords"><list><l>Make scalar called with non-singleton input </l><block var="value"/></list></block></custom-block></script></block-definition><block-definition s="$⍳-1.5-255-255-0 %&apos;n&apos;" type="reporter" category="lists"><comment x="0" y="0" w="290.6666666666667" collapsed="false">If the input is a positive integer, reports a list of the numbers&#xD;from 1 to that input.  (If the input is 0, reports an empty list.)&#xD;&#xD;If the input is a list of positive integers, reports an array with&#xD;the shape specified by the input (as in ⍴ reshape) in which&#xD;each item is a list of the indices of that item in the array&#xD;(so technically the shape has one more dimension&#xD;than the input, whose size is the size of the input).</comment><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doIfElse"><block s="reportIsA"><block var="n"/><l><option>list</option></l></block><script><block s="doIfElse"><block s="reportEquals"><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="n"/></custom-block><l>1</l></block><script><block s="doIfElse"><custom-block s="zero? %n"><custom-block s="combine in rows (reduce by column vectors) %repRing $/-1-255-255-0 %l"><block s="reifyReporter"><autolambda><block s="reportProduct"><l></l><l></l></block></autolambda><list></list></block><block var="n"/></custom-block></custom-block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script><script><block s="doReport"><custom-block s="reshape helper %l %l"><block var="n"/><custom-block s="crossproduct %mult%l"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="$⍳-1.5-255-255-0 %n"><l></l></custom-block></autolambda><list></list></block><block var="n"/></block></custom-block></custom-block></block></script></block></script><script><custom-block s="error %txt"><l>Input to ⍳ can&apos;t be a list of lists.</l></custom-block></script></block></script><script><block s="doReport"><block s="reportIfElse"><custom-block s="zero? %n"><block var="n"/></custom-block><block s="reportNewList"><list></list></block><block s="reportNumbers"><l>1</l><block var="n"/></block></block></block></script></block></script></block-definition><block-definition s="where in %&apos;vector&apos; is $⍳-1.5-255-255-0 %&apos;items&apos;" type="reporter" category="lists"><comment x="0" y="0" w="334.6666666666667" collapsed="false">If the rank of the left input is one more than the rank of the right input,&#xD;reports the index of the right input in the left input, or if not found,&#xD;reports one more than the length of the left input.&#xD;&#xD;If the rank of the left input is equal to the rank of the right input,&#xD;reports a vector of the indices of the items of the right input&#xD;in the left input (mapping this function over the right input).&#xD;&#xD;If the rank of the left input is more than that of the right input by 2 or more,&#xD;reports a vector, the location of the right input in the left in each dimension.&#xD;&#xD;It is an error if the rank of the left input is less than that of the right input.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%s"></input></inputs><script><block s="doDeclareVariables"><list><l>result</l></list></block><block s="doIf"><block s="reportLessThan"><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="vector"/></custom-block><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="items"/></custom-block></block><script><custom-block s="error %txt"><l>Left input to ⍳ must have greater or equal rank to right input.</l></custom-block></script></block><block s="doIf"><block s="reportEquals"><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="vector"/></custom-block><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="items"/></custom-block></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="where in %l is $⍳-1.5-255-255-0 %s"><block var="vector"/><l></l></custom-block></autolambda><list></list></block><block var="items"/></block></block></script></block><block s="doIf"><block s="reportEquals"><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="vector"/></custom-block><block s="reportSum"><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="items"/></custom-block><l>1</l></block></block><script><block s="doSetVar"><l>result</l><block s="reportListIndex"><block var="items"/><block var="vector"/></block></block><block s="doReport"><block s="reportIfElse"><custom-block s="zero? %n"><block var="result"/></custom-block><block s="reportSum"><block s="reportListLength"><block var="vector"/></block><l>1</l></block><block var="result"/></block></block></script></block><block s="doSetVar"><l>result</l><block s="reportFindFirst"><block s="reifyPredicate"><autolambda><custom-block s="%l deep contains %s"><l/><block var="items"/></custom-block></autolambda><list></list></block><block var="vector"/></block></block><block s="doIf"><block s="reportEquals"><block var="result"/><l></l></block><script><block s="doReport"><block s="reportSum"><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="vector"/></custom-block><l>1</l></block></block></script></block><block s="doReport"><block s="reportCONS"><block s="reportListIndex"><block var="result"/><block var="vector"/></block><custom-block s="flatten (ravel) $,-1-255-255-0 %l"><custom-block s="where in %l is $⍳-1.5-255-255-0 %s"><block var="result"/><block var="items"/></custom-block></custom-block></block></block></script></block-definition><block-definition s="crossproduct %&apos;lists&apos;" type="reporter" category="lists"><comment x="0" y="0" w="305.3333333333333" collapsed="false">This isn&apos;t an APL function, although it&apos;s related to the outer product.&#xD;&#xD;It takes any number of lists, and reports a list of all possible tuples with one item from each of the lists.  The length of the result is the product of the lengths of the inputs.</comment><header></header><code></code><translations></translations><inputs><input type="%mult%l"></input></inputs><script><block s="doIfElse"><block s="reportListIsEmpty"><block var="lists"/></block><script><block s="doReport"><block s="reportNewList"><list><block s="reportNewList"><list></list></block></list></block></block></script><script><block s="doDeclareVariables"><list><l>small</l></list></block><block s="doSetVar"><l>small</l><custom-block s="crossproduct %mult%l"><block s="reportCDR"><block var="lists"/></block></custom-block></block><block s="doReport"><block s="reportConcatenatedLists"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportCONS"><block var="newitem"/><l/></block></autolambda><list></list></block><block var="small"/></block></autolambda><list><l>newitem</l></list></block><block s="reportListItem"><l>1</l><block var="lists"/></block></block></block></block></script></block></script></block-definition><block-definition s="%&apos;array&apos; deep contains %&apos;value&apos;" type="reporter" category="other"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%s"></input></inputs><script><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="array"/><l><option>list</option></l></block></block><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block><block s="doIf"><block s="reportListContainsItem"><block var="array"/><block var="value"/></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></block><block s="doReport"><custom-block s="combine in rows (reduce by column vectors) %repRing $/-1-255-255-0 %l"><block s="reifyReporter"><autolambda><block s="reportOr"><l/><l/></block></autolambda><list></list></block><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="%l deep contains %s"><l/><block var="value"/></custom-block></autolambda><list></list></block><block var="array"/></block></custom-block></block></script></block-definition><block-definition s="which of %&apos;items&apos; $ϵ-1-255-255-0 contained in %&apos;array&apos;" type="reporter" category="lists"><comment x="0" y="0" w="214.66666666666666" collapsed="false">Reports an array of Booleans the same shape&#xD;as the left input, indicating which of the atoms&#xD;in the left input appear anywhere in the right&#xD;input.  &#xD;(The structure of the right input doesn&apos;t matter.)</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%l"></input></inputs><script><block s="doIfElse"><block s="reportIsA"><block var="items"/><l><option>list</option></l></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="which of %s $ϵ-1-255-255-0 contained in %l"><l></l><block var="array"/></custom-block></autolambda><list></list></block><block var="items"/></block></block></script><script><block s="doReport"><block s="reportListContainsItem"><custom-block s="flatten (ravel) $,-1-255-255-0 %l"><block var="array"/></custom-block><block var="items"/></block></block></script></block></script></block-definition><block-definition s="catenate %&apos;left&apos; $,-1-255-255-0 %&apos;right&apos;" type="reporter" category="lists"><comment x="0" y="0" w="190.66666666666666" collapsed="false">Like append, but:&#xD;&#xD;A scalar input is treated as an array the same shape as the other input except that the last item of the shape is 1.&#xD;&#xD;If the two inputs are of different ranks,&#xD;the function is mapped over the larger ranked input.&#xD;&#xD;Catenate adds new columns, by appending to each row.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="left"/><l><option>list</option></l></block></block><script><block s="doIfElse"><block s="reportGreaterThan"><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="right"/></custom-block><l>1</l></block><script><block s="doSetVar"><l>left</l><custom-block s="reshape as %l $⍴-1-255-255-0 items of %l"><block s="reportConcatenatedLists"><list><custom-block s="drop %n $↓-1-255-255-0 from %l"><l>-1</l><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="right"/></custom-block></custom-block><block s="reportNewList"><list><l>1</l></list></block></list></block><block s="reportNewList"><list><block var="left"/></list></block></custom-block></block></script><script><block s="doSetVar"><l>left</l><block s="reportNewList"><list><block var="left"/></list></block></block></script></block></script></block><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="right"/><l><option>list</option></l></block></block><script><block s="doIfElse"><block s="reportGreaterThan"><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="left"/></custom-block><l>1</l></block><script><block s="doSetVar"><l>right</l><custom-block s="reshape as %l $⍴-1-255-255-0 items of %l"><block s="reportConcatenatedLists"><list><custom-block s="drop %n $↓-1-255-255-0 from %l"><l>-1</l><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="left"/></custom-block></custom-block><block s="reportNewList"><list><l>1</l></list></block></list></block><block s="reportNewList"><list><block var="right"/></list></block></custom-block></block></script><script><block s="doSetVar"><l>right</l><block s="reportNewList"><list><block var="right"/></list></block></block></script></block></script></block><block s="doIf"><block s="reportEquals"><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="left"/></custom-block><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="right"/></custom-block></block><script><block s="doIfElse"><block s="reportEquals"><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="left"/></custom-block><l>1</l></block><script><block s="doReport"><block s="reportConcatenatedLists"><list><block var="left"/><block var="right"/></list></block></block></script><script><block s="doReport"><custom-block s="multimap %repRing %mult%l"><block s="reifyReporter"><autolambda><custom-block s="catenate %s $,-1-255-255-0 %s"><l></l><l></l></custom-block></autolambda><list></list></block><list><block var="left"/><block var="right"/></list></custom-block></block></script></block></script></block><block s="doIfElse"><block s="reportLessThan"><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="left"/></custom-block><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="right"/></custom-block></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="catenate %s $,-1-255-255-0 %s"><block var="left"/><l></l></custom-block></autolambda><list></list></block><block var="right"/></block></block></script><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="catenate %s $,-1-255-255-0 %s"><l></l><block var="right"/></custom-block></autolambda><list></list></block><block var="left"/></block></block></script></block></script></block-definition><block-definition s="scalar value %&apos;value&apos;" type="reporter" category="lists"><comment x="0" y="0" w="221.33333333333334" collapsed="false">If the input is a nesting of length=1 lists, which&#xD;APL treats as a scalar (the innermost item)&#xD;for many purposes, report that innermost scalar.&#xD;Otherwise, report the input as is.&#xD;&#xD;Exposing this block for users is important because Snap! /does not/ treat such a nesting&#xD;as a scalar, so you might need to use this in&#xD;translating an APL program to Snap!.&#xD;(But the functions in the APL library already use&#xD;this block as needed.)</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="reportIfElse"><custom-block s="scalar? %s"><block var="value"/></custom-block><custom-block s="scalar-value helper %s"><block var="value"/></custom-block><block var="value"/></block></block></script></block-definition><block-definition s="grade up $⍋-1.5-255-255-0 %&apos;array&apos;" type="reporter" category="lists"><comment x="0" y="0" w="190.66666666666666" collapsed="false">Reports a vector of indices of the items of the input, in order of the values of the items, so that&#xD;&#xD;item (grade up (foo)) of (foo)&#xD;&#xD;reports the items in sorted order, smallest to largest.  For a matrix, sorts the rows based on their first items, or if those are equal, based on their second items, etc.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l><option>last</option></l><l/></block></autolambda><list></list></block><custom-block s="sort %l ordering with %predRing"><custom-block s="multimap %repRing %mult%l"><block s="reifyReporter"><autolambda><custom-block s="catenate %s $,-1-255-255-0 %s"><l></l><l></l></custom-block></autolambda><list></list></block><list><block var="array"/><custom-block s="$⍳-1.5-255-255-0 %n"><block s="reportListLength"><block var="array"/></block></custom-block></list></custom-block><block s="reifyPredicate"><autolambda><custom-block s="sort helper %l %l"><l/><l/></custom-block></autolambda><list></list></block></custom-block></block></block></script></block-definition><block-definition s="sort %&apos;data&apos; ordering with %&apos;function&apos;" type="reporter" category="other"><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="sort helper %&apos;rowA&apos; %&apos;rowB&apos;" type="reporter" category="other"><comment x="0" y="0" w="166" collapsed="false">Compares two vectors for sorting.&#xD;Compare first items; if those are equal compare second items; etc.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%l"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block var="rowA"/></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></block><block s="doIf"><block s="reportListIsEmpty"><block var="rowB"/></block><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block><block s="doIf"><block s="reportLessThan"><block s="reportListItem"><l>1</l><block var="rowA"/></block><block s="reportListItem"><l>1</l><block var="rowB"/></block></block><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></block><block s="doIf"><block s="reportGreaterThan"><block s="reportListItem"><l>1</l><block var="rowA"/></block><block s="reportListItem"><l>1</l><block var="rowB"/></block></block><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></block><block s="doReport"><custom-block s="sort helper %l %l"><block s="reportCDR"><block var="rowA"/></block><block s="reportCDR"><block var="rowB"/></block></custom-block></block></script></block-definition><block-definition s="grade down $⍒-1.5-255-255-0 %&apos;array&apos;" type="reporter" category="lists"><comment x="0" y="0" w="190.66666666666666" collapsed="false">Reports a vector of indices of the items of the input, in order of the values of the items, so that&#xD;&#xD;item (grade down (foo)) of (foo)&#xD;&#xD;reports the items in sorted order, largest to smallest.  For a matrix, sorts the rows based on their first items, or if those are equal, based on their second items, etc.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l><option>last</option></l><l/></block></autolambda><list></list></block><custom-block s="sort %l ordering with %predRing"><custom-block s="multimap %repRing %mult%l"><block s="reifyReporter"><autolambda><custom-block s="catenate %s $,-1-255-255-0 %s"><l></l><l></l></custom-block></autolambda><list></list></block><list><block var="array"/><custom-block s="$⍳-1.5-255-255-0 %n"><block s="reportListLength"><block var="array"/></block></custom-block></list></custom-block><block s="reifyPredicate"><autolambda><custom-block s="NOT $&#126;-1-255-255-0 %s"><custom-block s="sort helper %l %l"><l/><l/></custom-block></custom-block></autolambda><list></list></block></custom-block></block></block></script></block-definition><block-definition s="select rows (compress columns) %&apos;Booleans&apos; $/-1-255-255-0 %&apos;array&apos;" type="reporter" category="lists"><comment x="0" y="0" w="210.66666666666666" collapsed="false">The left input must be a vector of Booleans&#xD;(either Snap! form or APL form); the right input must be an array whose first dimension is equal to the length of the left input.  The block reports an array of the same rank as the right input, containing only those items (rows, for a matrix) for which the corresponding Boolean is True (or 1).</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%l"></input></inputs><script><block s="doReport"><custom-block s="rowize vector %l"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportCDR"><l/></block></autolambda><list></list></block><block s="reportKeep"><block s="reifyPredicate"><autolambda><custom-block s="truth %s"><block s="reportListItem"><l>1</l><l/></block></custom-block></autolambda><list></list></block><custom-block s="multimap %repRing %mult%l"><block s="reifyReporter"><autolambda><custom-block s="catenate %s $,-1-255-255-0 %s"><l></l><l></l></custom-block></autolambda><list></list></block><list><block var="Booleans"/><block var="array"/></list></custom-block></block></block></custom-block></block></script></block-definition><block-definition s="rowize vector %&apos;vec&apos;" type="reporter" category="other"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportIfElse"><block s="reportAnd"><block s="reportEquals"><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="vec"/></custom-block><l>2</l></block><block s="reportEquals"><block s="reportListItem"><l>2</l><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="vec"/></custom-block></block><l>1</l></block></block><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>1</l><l/></block></autolambda><list></list></block><block var="vec"/></block><block var="vec"/></block></block></script></block-definition><block-definition s="select columns (compress rows) %&apos;bool&apos; $⌿-1.5-255-255-0 %&apos;array&apos;" type="reporter" category="lists"><comment x="0" y="0" w="219.33333333333334" collapsed="false">The left input must be a vector of Booleans&#xD;(either Snap! form or APL form); the right input must be an array whose last dimension is equal to the length of the left input.  The block reports an array of the same rank as the right input, containing only those items (columns, for a matrix) for which the corresponding Boolean is True (or 1).</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%l"></input></inputs><script><block s="doReport"><custom-block s="columnwise %repRing %l"><block s="reifyReporter"><autolambda><custom-block s="select rows (compress columns) %l $/-1-255-255-0 %l"><block var="bool"/><l/></custom-block></autolambda><list></list></block><block var="array"/></custom-block></block></script></block-definition><block-definition s="columnwise %&apos;function&apos; %&apos;data&apos;" type="reporter" category="control"><comment x="0" y="0" w="212" collapsed="false">Turns a row-wise (in Lisp terminology) function&#xD;into a column-wise one.</comment><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%l"></input></inputs><script><block s="doReport"><custom-block s="rowize vector %l"><custom-block s="transpose $⍉-1.5-255-255-0 %l"><block s="evaluate"><block var="function"/><list><custom-block s="transpose $⍉-1.5-255-255-0 %l"><block var="data"/></custom-block></list></block></custom-block></custom-block></block></script></block-definition><block-definition s="reverse column order (row contents) $⏀-1-255-255-0 %&apos;array&apos;" type="reporter" category="lists"><comment x="0" y="0" w="206" collapsed="false">Reverses the order of the columns of the input, which is a reflection through a vertical axis, as the ⏀ symbol suggests.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><custom-block s="columnwise %repRing %l"><block s="reifyReporter"><autolambda><custom-block s="reverse row order (column contents) $⦵-1.5-255-255-0 %l"><l/></custom-block></autolambda><list></list></block><block var="array"/></custom-block></block></script></block-definition><block-definition s="combine in columns (reduce by row vectors) %&apos;function&apos; $⌿-1.5-255-255-0 %&apos;array&apos;" type="reporter" category="lists"><comment x="0" y="0" w="285.3333333333333" collapsed="false">This function has two names because there are two ways&#xD;to understand it.&#xD;&#xD;Lisp way:  A matrix is a list of rows.  This block turns it into a list of columns, and combines the numbers in each column, producing one value for the entire column.&#xD;&#xD;APL way:  A matrix is made of vectors.  This block takes each row as a vector, and does vector arithmetic on the rows, producing one row as the result.</comment><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%l"></input></inputs><script><block s="doReport"><custom-block s="columnwise %repRing %l"><block s="reifyReporter"><autolambda><custom-block s="combine in rows (reduce by column vectors) %repRing $/-1-255-255-0 %l"><block var="function"/><l/></custom-block></autolambda><list></list></block><block var="array"/></custom-block></block></script></block-definition><block-definition s="catenate vertically %&apos;left&apos; $⍪-1.5-255-255-0 %&apos;right&apos;" type="reporter" category="lists"><comment x="0" y="0" w="190.66666666666666" collapsed="false">Like append, but:&#xD;&#xD;A scalar input is treated as a vector&#xD;of length 1.&#xD;&#xD;If the two inputs are of different ranks,&#xD;the function is mapped over the larger ranked input.&#xD;&#xD;Catenate vertically adds new rows, by appending to each column.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="left"/><l><option>list</option></l></block></block><script><block s="doIfElse"><block s="reportGreaterThan"><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="right"/></custom-block><l>1</l></block><script><block s="doSetVar"><l>left</l><custom-block s="reshape as %l $⍴-1-255-255-0 items of %l"><block s="reportConcatenatedLists"><list><block s="reportNewList"><list><l>1</l></list></block><custom-block s="drop %n $↓-1-255-255-0 from %l"><l>1</l><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="right"/></custom-block></custom-block></list></block><block s="reportNewList"><list><block var="left"/></list></block></custom-block></block></script><script><block s="doSetVar"><l>left</l><block s="reportNewList"><list><block var="left"/></list></block></block></script></block></script></block><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="right"/><l><option>list</option></l></block></block><script><block s="doIfElse"><block s="reportGreaterThan"><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="left"/></custom-block><l>1</l></block><script><block s="doSetVar"><l>right</l><custom-block s="reshape as %l $⍴-1-255-255-0 items of %l"><block s="reportConcatenatedLists"><list><block s="reportNewList"><list><l>1</l></list></block><custom-block s="drop %n $↓-1-255-255-0 from %l"><l>1</l><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="left"/></custom-block></custom-block></list></block><block s="reportNewList"><list><block var="right"/></list></block></custom-block></block></script><script><block s="doSetVar"><l>right</l><block s="reportNewList"><list><block var="right"/></list></block></block></script></block></script></block><block s="doIf"><block s="reportEquals"><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="left"/></custom-block><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="right"/></custom-block></block><script><block s="doIfElse"><block s="reportEquals"><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="left"/></custom-block><l>1</l></block><script><block s="doReport"><block s="reportConcatenatedLists"><list><block var="left"/><block var="right"/></list></block></block></script><script><block s="doReport"><custom-block s="transpose $⍉-1.5-255-255-0 %l"><custom-block s="catenate %s $,-1-255-255-0 %s"><custom-block s="transpose $⍉-1.5-255-255-0 %l"><block var="left"/></custom-block><custom-block s="transpose $⍉-1.5-255-255-0 %l"><block var="right"/></custom-block></custom-block></custom-block></block></script></block></script></block><block s="doIfElse"><block s="reportLessThan"><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="left"/></custom-block><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="right"/></custom-block></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="catenate %s $,-1-255-255-0 %s"><block var="left"/><l></l></custom-block></autolambda><list></list></block><block var="right"/></block></block></script><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="catenate %s $,-1-255-255-0 %s"><l></l><block var="right"/></custom-block></autolambda><list></list></block><block var="left"/></block></block></script></block></script><scripts><script x="254" y="497.7777777777774"><custom-block s="multimap %repRing %mult%l"><block s="reifyReporter"><script></script><list></list></block><list><l/><l/></list></custom-block></script></scripts></block-definition><block-definition s="%&apos;a&apos; scalar join %&apos;b&apos;" type="reporter" category="operators"><comment x="0" y="0" w="219.33333333333334" collapsed="false">A hyperblock version of JOIN.  The regular JOIN isn&apos;t hyperized because it can accept a list as input, representing it as text.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><block s="evaluate"><custom-block s="scalar -&gt; hyper %repRing"><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><l></l><l></l></list></block></autolambda><list></list></block></custom-block><list><block var="a"/><block var="b"/></list></block></block></script></block-definition><block-definition s="take %&apos;howmany&apos; $↑-1-255-255-0 from %&apos;array&apos;" type="reporter" category="lists"><comment x="0" y="0" w="272" collapsed="false">A positive left input selects the first n items of the right input.&#xD;A negative left input selects the last abs(n) items&#xD;of the right input.&#xD;&#xD;If the right input is a matrix, a numeric left input selects rows;&#xD;the left input may also be a two-item vector, in which case&#xD;the first number is applied to the rows&#xD;and the second number is applied to the columns.&#xD;Similarly for higher-dimension arrays. </comment><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%l"></input></inputs><script><block s="doIf"><block s="reportIsA"><block var="howmany"/><l><option>number</option></l></block><script><block s="doReport"><block s="reportIfElse"><block s="reportLessThan"><block var="howmany"/><l>0</l></block><block s="reportListItem"><block s="reportSum"><custom-block s="$⍳-1.5-255-255-0 %n"><block s="reportMonadic"><l><option>abs</option></l><block var="howmany"/></block></custom-block><block s="reportSum"><block s="reportListLength"><block var="array"/></block><block var="howmany"/></block></block><block var="array"/></block><block s="reportListItem"><custom-block s="$⍳-1.5-255-255-0 %n"><block var="howmany"/></custom-block><block var="array"/></block></block></block></script></block><block s="doIf"><block s="reportGreaterThan"><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="howmany"/></custom-block><l>1</l></block><script><custom-block s="error %txt"><l>Left input to take can&apos;t be a matrix.</l></custom-block></script></block><block s="doIf"><block s="reportGreaterThan"><block s="reportListLength"><block var="howmany"/></block><custom-block s="rank of $⍴⍴-1-255-255-0 %l"><block var="array"/></custom-block></block><script><custom-block s="error %txt"><l>Length of item vector &gt; rank of array in take.</l></custom-block></script></block><block s="doReport"><block s="reportListItem"><custom-block s="reverse row order (column contents) $⦵-1.5-255-255-0 %l"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportIfElse"><block s="reportLessThan"><block var="value"/><l>0</l></block><block s="reportSum"><custom-block s="$⍳-1.5-255-255-0 %n"><block s="reportMonadic"><l><option>abs</option></l><block var="value"/></block></custom-block><block s="reportSum"><block s="reportListItem"><block var="index"/><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="array"/></custom-block></block><block var="value"/></block></block><custom-block s="$⍳-1.5-255-255-0 %n"><block var="value"/></custom-block></block></autolambda><list><l>value</l><l>index</l></list></block><block var="howmany"/></block></custom-block><block var="array"/></block></block></script></block-definition><block-definition s="drop %&apos;howmany&apos; $↓-1-255-255-0 from %&apos;array&apos;" type="reporter" category="lists"><comment x="0" y="0" w="306" collapsed="false">A positive left input selects all but the first n items of the right input.&#xD;A negative left input selects all but the last abs(n) items&#xD;of the right input.&#xD;&#xD;If the right input is a matrix, a numeric left input selects rows;&#xD;the left input may also be a two-item vector, in which case&#xD;the first number is applied to the rows&#xD;and the second number is applied to the columns.&#xD;Similarly for higher-dimension arrays. </comment><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%l"></input></inputs><script><block s="doIf"><block s="reportIsA"><block var="howmany"/><l><option>number</option></l></block><script><block s="doReport"><custom-block s="take %n $↑-1-255-255-0 from %l"><block s="reportProduct"><block s="reportMonadic"><l><option>neg</option></l><custom-block s="signum $×-1-255-255-0 %n"><block var="howmany"/></custom-block></block><block s="reportDifference"><block s="reportListLength"><block var="array"/></block><block s="reportMonadic"><l><option>abs</option></l><block var="howmany"/></block></block></block><block var="array"/></custom-block></block></script></block><block s="doReport"><custom-block s="take %n $↑-1-255-255-0 from %l"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportIfElse"><block s="reportLessThan"><block var="value"/><l>0</l></block><block s="reportSum"><block s="reportListItem"><block var="index"/><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="array"/></custom-block></block><block var="value"/></block><block s="reportDifference"><block var="value"/><block s="reportListItem"><block var="index"/><custom-block s="shape of $⍴-1-255-255-0 %l"><block var="array"/></custom-block></block></block></block></autolambda><list><l>value</l><l>index</l></list></block><block var="howmany"/></block><block var="array"/></custom-block></block></script></block-definition><block-definition s="%&apos;x&apos;" type="reporter" category="lists"><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="reshape helper %&apos;shape&apos; %&apos;data&apos;" type="reporter" category="other"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%l"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block var="shape"/></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportCombine"><block var="shape"/><block s="reifyReporter"><autolambda><block s="reportProduct"><l></l><l></l></block></autolambda><list></list></block></block><l>0</l></block><script><block s="doReport"><block s="reportNewList"><list></list></block></block></script></block><block s="doDeclareVariables"><list><l>partial</l></list></block><block s="doSetVar"><l>partial</l><block s="reportNewList"><list></list></block></block><block s="doIfElse"><block s="reportListIsEmpty"><block s="reportCDR"><block var="shape"/></block></block><script><block s="doRepeat"><block s="reportListItem"><l>1</l><block var="shape"/></block><script><block s="doAddToList"><block s="reportListItem"><l>1</l><block var="data"/></block><block var="partial"/></block><block s="doSetVar"><l>data</l><block s="reportConcatenatedLists"><list><block s="reportCDR"><block var="data"/></block><block s="reportNewList"><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block></list></block></block></script></block></script><script><block s="doRepeat"><block s="reportListItem"><l>1</l><block var="shape"/></block><script><block s="doAddToList"><custom-block s="reshape helper %l %l"><block s="reportCDR"><block var="shape"/></block><block var="data"/></custom-block><block var="partial"/></block><block s="doRepeat"><block s="reportModulus"><block s="reportCombine"><block s="reportCDR"><block var="shape"/></block><block s="reifyReporter"><autolambda><block s="reportProduct"><l></l><l></l></block></autolambda><list></list></block></block><block s="reportListLength"><block var="data"/></block></block><script><block s="doSetVar"><l>data</l><block s="reportConcatenatedLists"><list><block s="reportCDR"><block var="data"/></block><block s="reportNewList"><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block></list></block></block></script></block></script></block></script></block><block s="doReport"><block var="partial"/></block></script></block-definition><block-definition s="deep map %&apos;function&apos; %&apos;atom?&apos; %&apos;data&apos;" type="reporter" category="other"><comment x="0" y="0" w="320.6666666666667" collapsed="false">Applies the function to each &quot;atom&quot; of the data.  What&apos;s an atom?&#xD;Something for which the predicate input reports true.</comment><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%predRing"></input><input type="%l"></input></inputs><script><block s="doIf"><custom-block s="truth %s"><block s="evaluate"><block var="atom?"/><list><block var="data"/></list></block></custom-block><script><block s="doReport"><block s="evaluate"><block var="function"/><list><block var="data"/></list></block></block></script></block><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="deep map %repRing %predRing %l"><block var="function"/><block var="atom?"/><l/></custom-block></autolambda><list></list></block><block var="data"/></block></block></script></block-definition><block-definition s="nth item 1 %&apos;n&apos; %&apos;data&apos;" type="reporter" category="other"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%l"></input></inputs><script><block s="doIf"><block s="reportEquals"><block var="n"/><l>0</l></block><script><block s="doReport"><block var="data"/></block></script></block><block s="doReport"><custom-block s="nth item 1 %n %l"><block s="reportDifference"><block var="n"/><l>1</l></block><block s="reportListItem"><l>1</l><block var="data"/></block></custom-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="%&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; %&apos;style&apos; 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="%s" readonly="true">bars<options>bars&#xD;lines&#xD;pie chart</options></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="doIfElse"><block s="reportEquals"><block var="style"/><l>pie chart</l></block><script><block s="doDeclareVariables"><list><l>x</l><l>y</l><l>r</l><l>total</l><l>start</l><l>end</l><l>state</l><l>pen size</l><l>heading</l></list></block><block s="doSetVar"><l>x</l><block s="reportSum"><block var="left"/><block s="reportQuotient"><block var="width"/><l>2</l></block></block></block><block s="doSetVar"><l>y</l><block s="reportSum"><block var="bottom"/><block s="reportQuotient"><block var="height"/><l>2</l></block></block></block><block s="doSetVar"><l>r</l><block s="reportIfElse"><block s="reportLessThan"><block var="height"/><block var="width"/></block><block s="reportQuotient"><block var="height"/><l>2</l></block><block s="reportQuotient"><block var="width"/><l>2</l></block></block></block><block s="doSetVar"><l>total</l><block s="reportCombine"><block var="data"/><block s="reifyReporter"><autolambda><block s="reportSum"><l></l><l></l></block></autolambda><list></list></block></block></block><block s="doSetVar"><l>state</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportNewList"><list><l></l><block s="getPenAttribute"><l></l></block></list></block></autolambda><list></list></block><block s="reportNewList"><list><l>hue</l><l>saturation</l><l>brightness</l></list></block></block></block><block s="doSetVar"><l>pen size</l><block s="getPenAttribute"><l><option>size</option></l></block></block><block s="doSetVar"><l>heading</l><block s="direction"></block></block><block s="setPenHSVA"><l><option>hue</option></l><l>0</l></block><block s="setPenHSVA"><l><option>brightness</option></l><l>80</l></block><block s="setPenHSVA"><l><option>saturation</option></l><l>80</l></block><block s="doWarp"><script><block s="doForEach"><l>slice</l><block var="data"/><script><block s="doChangeVar"><l>end</l><block s="reportProduct"><block s="reportQuotient"><block var="slice"/><block var="total"/></block><l>360</l></block></block><block s="gotoXY"><block var="x"/><block var="y"/></block><block s="down"></block><block s="doFor"><l>i</l><block var="start"/><block var="end"/><script><block s="gotoXY"><block s="reportSum"><block var="x"/><block s="reportProduct"><block var="r"/><block s="reportMonadic"><l><option>sin</option></l><block var="i"/></block></block></block><block s="reportSum"><block var="y"/><block s="reportProduct"><block var="r"/><block s="reportMonadic"><l><option>cos</option></l><block var="i"/></block></block></block></block></script></block><block s="gotoXY"><block var="x"/><block var="y"/></block><block s="up"></block><block s="setHeading"><block var="start"/></block><block s="turn"><block s="reportQuotient"><block s="reportDifference"><block var="end"/><block var="start"/></block><l>2</l></block></block><block s="forward"><block s="reportQuotient"><block var="r"/><l>2</l></block></block><block s="floodFill"></block><block s="changePenHSVA"><l><option>hue</option></l><block s="reportQuotient"><l>100</l><block s="reportListLength"><block var="data"/></block></block></block><block s="doSetVar"><l>start</l><block var="end"/></block></script></block><block s="doForEach"><l>setting</l><block var="state"/><script><block s="setPenHSVA"><block s="reportListItem"><l>1</l><block var="setting"/></block><block s="reportListItem"><l>2</l><block var="setting"/></block></block></script></block></script></block><block s="setSize"><block var="pen size"/></block><block s="setHeading"><block var="heading"/></block></script><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>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="doIfElse"><block s="reportEquals"><block var="style"/><l>lines</l></block><script><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="gotoXY"><block s="reportSum"><block s="xPosition"></block><block var="step"/></block><block s="reportSum"><block var="bottom"/><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><block s="down"></block><block s="doSetVar"><l>data</l><block s="reportCDR"><block var="data"/></block></block></script></block></script></block></script><script><block s="doSetVar"><l>flat line ends</l><block s="reportGlobalFlag"><l><option>flat line ends</option></l></block></block><block s="doSetGlobalFlag"><l><option>flat line ends</option></l><l><bool>true</bool></l></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="doSetGlobalFlag"><l><option>flat line ends</option></l><block var="flat line ends"/></block></script></block><block s="up"></block></script></block></script></block-definition><block-definition s="bar chart of table %&apos;data&apos; grouped by field: %&apos;field&apos; from: %&apos;floor&apos; to: %&apos;ceiling&apos; interval: %&apos;interval&apos;" type="reporter" category="lists"><comment x="0" y="0" w="344.6666666666667" collapsed="false">Takes a table (typically from a CSV data set) as input and reports a summary of the table grouped by the field in the specified column number.  The remaining three inputs are used only if the field values are numbers, in which case they can be grouped into buckets (e.g., decades, centuries, etc.).  Those three inputs specify the smallest and largest values of interest and, most importantly, the width of a bucket (10 for decades, 100 for centuries).  If the field isn&apos;t numeric, leave these three inputs empty or set them to zero.  In that case, each string value of the field is its own bucket, and they appear sorted alphabetically.&#xD;&#xD;The block reports a new table with three columns.  The first column contains the bucket name or smallest number.  The second column contains a nonnegative integer that says how many records in the input table fall into this bucket.  The third column is a subtable containing the actual records from the original table that fall into the bucket.&#xD;&#xD;If your buckets aren&apos;t of constant width, or you want to group by some function of more than one field, load the &quot;Frequency Distribution Analysis&quot; library instead. </comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%n"></input><input type="%n"></input><input type="%n"></input><input type="%n"></input></inputs><script><block s="doDeclareVariables"><list><l>sorted</l></list></block><block s="doSetVar"><l>sorted</l><custom-block s="sort table %l on field %n in %s order"><custom-block s="group table %l by field %n by intervals of: %n"><block var="data"/><block var="field"/><block var="interval"/></custom-block><l>1</l><l>ascending</l></custom-block></block><block s="doIf"><block s="reportEquals"><block var="interval"/><l>0</l></block><script><block s="doReport"><block var="sorted"/></block></script></block><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportCONS"><block s="reportProduct"><block s="reportListItem"><l>1</l><l/></block><block var="interval"/></block><block s="reportCDR"><l/></block></block></autolambda><list></list></block><custom-block s="bar chart helper function to fill %l key: %repRing from: %n to: %n interval: %repRing with: %repRing"><block var="sorted"/><block s="reifyReporter"><autolambda><block s="reportListItem"><l>1</l><l/></block></autolambda><list></list></block><block s="reportMonadic"><l><option>ceiling</option></l><block s="reportQuotient"><block var="floor"/><block var="interval"/></block></block><block s="reportMonadic"><l><option>ceiling</option></l><block s="reportQuotient"><block var="ceiling"/><block var="interval"/></block></block><block s="reifyReporter"><autolambda><block s="reportSum"><l></l><l>1</l></block></autolambda><list></list></block><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></block></script></block-definition><block-definition s="bar chart helper function to 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="bar chart helper function to 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="bar chart helper function to 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="bar chart helper function to 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="bar chart helper function to 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="plot bar chart %&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><l>digit12</l><l>saved pentrails</l><l>digit10</l><l>x label width</l><l>saved position</l><l>label delta y</l><l>max y</l></list></block><block s="doSetVar"><l>flat line ends</l><block s="reportGlobalFlag"><l><option>flat line ends</option></l></block></block><block s="doSetGlobalFlag"><l><option>flat line ends</option></l><l><bool>true</bool></l></block><block s="doSetVar"><l>saved pentrails</l><block s="reportPenTrailsAsCostume"></block></block><block s="clear"></block><block s="up"><comment w="105.33333333333333" collapsed="false">find out how wide a digit is at two sizes</comment></block><block s="doGotoObject"><l><option>center</option></l></block><block s="write"><l>1234567890</l><l>12</l></block><block s="doSetVar"><l>digit12</l><block s="reportQuotient"><block s="xPosition"></block><l>10</l></block></block><block s="clear"></block><block s="up"></block><block s="doGotoObject"><l><option>center</option></l></block><block s="write"><l>1234567890</l><l>10</l></block><block s="doSetVar"><l>digit10</l><block s="reportQuotient"><block s="xPosition"></block><l>10</l></block></block><block s="clear"></block><block s="doSwitchToCostume"><block var="saved pentrails"/></block><block s="doStamp"></block><block s="doSwitchToCostume"><l><option>Turtle</option></l></block><block s="doSetVar"><l>x label width</l><block s="reportMonadic"><l><option>ceiling</option></l><block s="reportMonadic"><l><option>log</option></l><block s="reportListItem"><l>1</l><block s="reportListItem"><l><option>last</option></l><block var="data"/></block></block></block></block></block><block s="doSetVar"><l>sorted</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportListItem"><l>2</l><l/></block></autolambda><list></list></block><custom-block s="sort table %l on field %n in %s order"><block var="data"/><l>2</l><l>descending</l></custom-block></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><comment w="142" collapsed="false">If smallest value &lt; 0, the x axis isn&apos;t at the bottom.&#xD;Note that sort is by &gt; not by &lt;.&#xD;Not clear this can happen in a&#xD;histogram!</comment></block><block s="doSetVar"><l>max y</l><block s="reportListItem"><l>1</l><block var="sorted"/></block></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>label delta y</l><block s="reportProduct"><block s="reportRound"><block s="reportQuotient"><block var="max y"/><l>50</l></block></block><l>10</l></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 s="reportDifference"><block var="bottom"/><block s="reportProduct"><block var="min"/><block var="ratio"/></block></block></block><block s="setSize"><l>1</l></block><block s="down"></block><block s="setHeading"><l>90</l></block><block s="forward"><block var="width"/><comment w="110.66666666666667" collapsed="true">draw x axis at y=0</comment></block><block s="up"></block><block s="gotoXY"><block var="left"/><block var="bottom"/></block><block s="setHeading"><l>0</l></block><block s="down"></block><block s="forward"><block var="height"/><comment w="74.66666666666667" collapsed="true">draw y axis</comment></block><block s="up"></block><block s="setHeading"><l>90</l></block><block s="gotoXY"><block s="reportDifference"><block var="left"/><block s="reportSum"><block var="digit12"/><l>2</l></block></block><block s="reportDifference"><block var="bottom"/><block s="reportProduct"><block var="min"/><block var="ratio"/></block></block></block><block s="write"><l>0</l><l>12</l></block><block s="doFor"><l>i</l><l>1</l><l>5</l><script><block s="changeYPosition"><block s="reportProduct"><block s="reportDifference"><block var="label delta y"/><block var="min"/></block><block var="ratio"/></block></block><block s="setXPosition"><block s="reportDifference"><block var="left"/><block s="reportSum"><block s="reportProduct"><block var="digit12"/><block s="reportStringSize"><block s="reportProduct"><block var="label delta y"/><block var="i"/></block></block></block><l>2</l></block></block></block><block s="write"><block s="reportProduct"><block var="label delta y"/><block var="i"/></block><l>12</l></block></script></block><block s="gotoXY"><block var="left"/><block var="bottom"/><comment w="112" collapsed="true">Ready to draw bars.</comment></block><block s="changeXPosition"><block s="reportQuotient"><block var="step"/><l>2</l></block></block><block s="setSize"><block var="col"/></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="down"></block><block s="changeYPosition"><block s="reportProduct"><block s="reportDifference"><block s="reportListItem"><l>2</l><block s="reportListItem"><l>1</l><block var="data"/></block></block><block var="min"/></block><block var="ratio"/></block></block><block s="up"></block><block s="setYPosition"><block var="bottom"/></block><block s="doSetVar"><l>saved position</l><block s="reportNewList"><list><block s="xPosition"></block><block s="yPosition"></block></list></block></block><block s="doIfElse"><block s="reportLessThan"><block var="col"/><l>15</l><comment w="319.3333333333333" collapsed="true">Choose label format depending on label width vs. bar width.</comment></block><script><block s="setYPosition"><block s="reportDifference"><block var="bottom"/><l>2</l></block></block><block s="changeXPosition"><block s="reportDifference"><block s="reportQuotient"><block var="step"/><l>2</l></block><l>8</l></block></block><block s="setHeading"><l>180</l></block><block s="write"><block s="reportListItem"><l>1</l><block s="reportListItem"><l>1</l><block var="data"/></block></block><l>10</l></block></script><script><block s="doIfElse"><block s="reportLessThan"><block var="col"/><block s="reportProduct"><block s="reportProduct"><block var="digit10"/><block var="x label width"/></block><l>2.5</l></block></block><script><block s="setYPosition"><block s="reportDifference"><block var="bottom"/><l>2</l></block></block><block s="changeXPosition"><block s="reportDifference"><block s="reportQuotient"><block var="step"/><l>2</l></block><l>10</l></block></block><block s="setHeading"><l>180</l></block><block s="write"><block s="reportListItem"><l>1</l><block s="reportListItem"><l>1</l><block var="data"/></block></block><l>12</l></block></script><script><block s="doIfElse"><block s="reportLessThan"><block var="col"/><block s="reportProduct"><block s="reportProduct"><block var="digit12"/><block var="x label width"/></block><l>2.5</l></block></block><script><block s="setYPosition"><block s="reportDifference"><block var="bottom"/><l>10</l></block></block><block s="setHeading"><l>90</l></block><block s="forward"><block s="reportDifference"><block s="reportDifference"><block s="reportQuotient"><block var="step"/><l>2</l></block><block s="reportProduct"><block var="digit10"/><block s="reportMonadic"><l><option>ceiling</option></l><block s="reportMonadic"><l><option>log</option></l><block s="reportListItem"><l>1</l><block s="reportListItem"><l>1</l><block var="data"/></block></block></block></block></block></block><l>2</l></block></block><block s="write"><block s="reportListItem"><l>1</l><block s="reportListItem"><l>1</l><block var="data"/></block></block><l>10</l></block></script><script><block s="setYPosition"><block s="reportDifference"><block var="bottom"/><l>12</l></block></block><block s="setHeading"><l>90</l></block><block s="forward"><block s="reportDifference"><block s="reportDifference"><block s="reportQuotient"><block var="step"/><l>2</l></block><block s="reportProduct"><block var="digit12"/><block s="reportMonadic"><l><option>ceiling</option></l><block s="reportMonadic"><l><option>log</option></l><block s="reportListItem"><l>1</l><block s="reportListItem"><l>1</l><block var="data"/></block></block></block></block></block></block><l>2</l></block></block><block s="write"><block s="reportListItem"><l>1</l><block s="reportListItem"><l>1</l><block var="data"/></block></block><l>12</l></block></script></block></script></block></script></block><block s="doSetVar"><l>data</l><block s="reportCDR"><block var="data"/></block></block><block s="setHeading"><l>90</l></block><block s="doGotoObject"><block var="saved position"/></block><block s="changeXPosition"><block var="step"/></block></script></block></script></block><block s="doSetGlobalFlag"><l><option>flat line ends</option></l><block var="flat line ends"/></block></script></block-definition><block-definition s="sort table %&apos;data&apos; on field %&apos;field number&apos; in %&apos;order&apos; order" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%n"></input><input type="%s" readonly="true"><options>ascending&#xD;descending</options></input></inputs><script><block s="doIfElse"><block s="reportEquals"><block var="order"/><l>ascending</l></block><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 s="reifyPredicate"><autolambda><block s="reportLessThan"><block s="reportListItem"><block var="field number"/><l/></block><block s="reportListItem"><block var="field number"/><l/></block></block></autolambda><list></list></block></list></block></block></script><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 s="reifyPredicate"><autolambda><block s="reportGreaterThan"><block s="reportListItem"><block var="field number"/><l/></block><block s="reportListItem"><block var="field number"/><l/></block></block></autolambda><list></list></block></list></block></block></script></block></script></block-definition><block-definition s="group table %&apos;data&apos; by field %&apos;number&apos; by intervals of: %&apos;interval&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%n"></input><input type="%n"></input></inputs><script><block s="doIf"><block s="reportEquals"><block var="interval"/><l>0</l></block><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 s="reifyReporter"><autolambda><block s="reportListItem"><block var="number"/><l/></block></autolambda><list></list></block></list></block></block></script></block><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 s="reifyReporter"><autolambda><block s="reportMonadic"><l><option>ceiling</option></l><block s="reportQuotient"><block s="reportListItem"><block var="number"/><l/></block><block var="interval"/></block></block></autolambda><list></list></block></list></block></block></script></block-definition></blocks><variables></variables></project><media name="Custom Blocks" app="Snap! 6, https://snap.berkeley.edu" version="1"></media></snapdata>