1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228
|
# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR Free Software Foundation, Inc.
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: DATE\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#. type: \b; header
#: ../E/abstime.txt:1
#, no-wrap
msgid "Instruction <code>abstime</code>"
msgstr ""
#. type: Plain text
#: ../E/abstime.txt:2 ../E/deletef.txt:6 ../E/delinfo.txt:2 ../E/errmode.txt:5 ../E/flatgrnd.txt:2 ../E/readln.txt:8 ../E/send.txt:2 ../E/strfind.txt:4 ../E/strleft.txt:4 ../E/strlen.txt:4 ../E/strlower.txt:4 ../E/strmid.txt:4 ../E/strright.txt:4 ../E/strupper.txt:4 ../E/strval.txt:8 ../E/testinfo.txt:2 ../E/writeln.txt:8
#, no-wrap
msgid "Syntax:"
msgstr ""
#. type: Source code
#: ../E/abstime.txt:3
#, no-wrap
msgid "<c/>abstime ( );<n/>"
msgstr ""
#. type: Plain text
#: ../E/abstime.txt:5
#, no-wrap
msgid "Return the time in seconds elapsed since the beginning of the mission."
msgstr ""
#. type: \t; header
#: ../E/abstime.txt:7
#, no-wrap
msgid "Return: <code><a cbot|float>float</a></code>"
msgstr ""
#. type: Plain text
#: ../E/abstime.txt:8
#, no-wrap
msgid "Time in seconds."
msgstr ""
#. type: \t; header
#: ../E/abstime.txt:10 ../E/acos.txt:11 ../E/aim.txt:23 ../E/array.txt:41 ../E/asin.txt:11 ../E/atan.txt:11 ../E/atan2.txt:16 ../E/bloc.txt:48 ../E/bool.txt:4 ../E/break.txt:24 ../E/build.txt:25 ../E/buildingenabled.txt:22 ../E/canbuild.txt:22 ../E/canresearch.txt:14 ../E/category.txt:119 ../E/ceil.txt:12 ../E/class.txt:120 ../E/close.txt:6 ../E/cond.txt:4 ../E/continue.txt:24 ../E/cos.txt:11 ../E/deflag.txt:12 ../E/deletef.txt:9 ../E/delinfo.txt:13 ../E/destroy.txt:15 ../E/detect.txt:27 ../E/direct.txt:13 ../E/dist.txt:29 ../E/dist2d.txt:13 ../E/do.txt:27 ../E/drop.txt:28 ../E/eof.txt:13 ../E/errmode.txt:32 ../E/expr.txt:198 ../E/extends.txt:105 ../E/extern.txt:29 ../E/factory.txt:61 ../E/false.txt:4 ../E/file.txt:16 ../E/fire.txt:30 ../E/flag.txt:19 ../E/flatgrnd.txt:16 ../E/flatspace.txt:25 ../E/float.txt:24 ../E/floor.txt:12 ../E/for.txt:51 ../E/function.txt:165 ../E/goto.txt:34 ../E/grab.txt:28 ../E/if.txt:39 ../E/int.txt:18 ../E/isbusy.txt:14 ../E/jet.txt:14 ../E/message.txt:24 ../E/motor.txt:38 ../E/move.txt:21 ../E/nan.txt:14 ../E/new.txt:20 ../E/null.txt:4 ../E/object.txt:83 ../E/open.txt:19 ../E/openfile.txt:11 ../E/pencolor.txt:14 ../E/pendown.txt:17 ../E/penup.txt:11 ../E/penwidth.txt:14 ../E/point.txt:35 ../E/pointer.txt:51 ../E/pow.txt:14 ../E/private.txt:19 ../E/produce.txt:30 ../E/protected.txt:26 ../E/public.txt:49 ../E/radar.txt:80 ../E/radarall.txt:19 ../E/rand.txt:8 ../E/readln.txt:18 ../E/receive.txt:16 ../E/recycle.txt:12 ../E/research.txt:18 ../E/researched.txt:14 ../E/researches.txt:29 ../E/retobj.txt:13 ../E/return.txt:29 ../E/round.txt:12 ../E/search.txt:25 ../E/send.txt:17 ../E/shield.txt:18 ../E/sin.txt:11 ../E/sizeof.txt:21 ../E/sniff.txt:16 ../E/space.txt:22 ../E/sqrt.txt:11 ../E/static.txt:20 ../E/strfind.txt:18 ../E/string.txt:32 ../E/strleft.txt:14 ../E/strlen.txt:12 ../E/strlower.txt:10 ../E/strmid.txt:18 ../E/strright.txt:14 ../E/strupper.txt:10 ../E/strval.txt:17 ../E/super.txt:45 ../E/switch.txt:70 ../E/synchro.txt:23 ../E/takeoff.txt:15 ../E/tan.txt:11 ../E/term.txt:30 ../E/testinfo.txt:16 ../E/this.txt:52 ../E/thump.txt:12 ../E/topo.txt:13 ../E/true.txt:4 ../E/trunc.txt:12 ../E/turn.txt:32 ../E/type.txt:32 ../E/var.txt:66 ../E/void.txt:10 ../E/wait.txt:21 ../E/while.txt:46 ../E/writeln.txt:19
#, no-wrap
msgid "See also"
msgstr ""
#. type: Plain text
#: ../E/abstime.txt:11 ../E/aim.txt:24 ../E/array.txt:42 ../E/bool.txt:5 ../E/break.txt:25 ../E/cond.txt:5 ../E/continue.txt:25 ../E/deflag.txt:13 ../E/deletef.txt:10 ../E/destroy.txt:16 ../E/detect.txt:28 ../E/direct.txt:14 ../E/dist.txt:30 ../E/dist2d.txt:14 ../E/drop.txt:29 ../E/errmode.txt:33 ../E/expr.txt:199 ../E/extern.txt:30 ../E/false.txt:5 ../E/fire.txt:31 ../E/flag.txt:20 ../E/flatgrnd.txt:17 ../E/flatspace.txt:26 ../E/float.txt:25 ../E/for.txt:52 ../E/function.txt:166 ../E/goto.txt:35 ../E/grab.txt:29 ../E/if.txt:40 ../E/int.txt:19 ../E/isbusy.txt:15 ../E/jet.txt:15 ../E/message.txt:25 ../E/move.txt:22 ../E/nan.txt:15 ../E/object.txt:84 ../E/openfile.txt:12 ../E/pencolor.txt:15 ../E/pendown.txt:18 ../E/penup.txt:12 ../E/penwidth.txt:15 ../E/point.txt:36 ../E/produce.txt:31 ../E/recycle.txt:13 ../E/retobj.txt:14 ../E/return.txt:30 ../E/search.txt:26 ../E/shield.txt:19 ../E/sizeof.txt:22 ../E/sniff.txt:17 ../E/space.txt:23 ../E/string.txt:33 ../E/switch.txt:71 ../E/takeoff.txt:16 ../E/term.txt:31 ../E/thump.txt:13 ../E/topo.txt:14 ../E/true.txt:5 ../E/turn.txt:33 ../E/type.txt:33 ../E/var.txt:67 ../E/void.txt:11 ../E/wait.txt:22
#, no-wrap
msgid "<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/aim.txt:1
#, no-wrap
msgid "Instruction <code>aim</code>"
msgstr ""
#. type: Plain text
#: ../E/break.txt:2 ../E/continue.txt:2 ../E/direct.txt:2 ../E/motor.txt:15 ../E/while.txt:20
#, no-wrap
msgid "Syntax :"
msgstr ""
#. type: Bullet: 'o'
#: ../E/aim.txt:6 ../E/fire.txt:14
#, no-wrap
msgid "<a object|botfr>Shooter</a>"
msgstr ""
#. type: Bullet: 'o'
#: ../E/aim.txt:7 ../E/fire.txt:15
#, no-wrap
msgid "<a object|botor>Orga shooter</a>"
msgstr ""
#. type: Bullet: 'o'
#: ../E/aim.txt:8 ../E/fire.txt:16
#, no-wrap
msgid "<a object|botphaz>Phazer shooter</a>"
msgstr ""
#. type: Plain text
#: ../E/fire.txt:18
#, no-wrap
msgid "When controlling the robot through programming, the only way to turn the gun left or right is to turn the whole robot with the instruction <code><a cbot|turn>turn</a></code>."
msgstr ""
#. type: \t; header
#: ../E/cos.txt:5 ../E/sin.txt:5 ../E/tan.txt:5 ../E/turn.txt:24
#, no-wrap
msgid "angle: <code><a cbot|float>float</a></code>"
msgstr ""
#. type: Plain text
#: ../E/aim.txt:13
#, no-wrap
msgid "Angle in degrees of the gun relative to the robot. A positive value orients the gun upward. For shooters and orga shooters, the angle must range from <code>-20</code> to <code>+20</code> degrees. For phazer shooters, the angle must range from <code>-20</code> to <code>45</code> degrees."
msgstr ""
#. type: \t; header
#: ../E/aim.txt:18 ../E/build.txt:20 ../E/deflag.txt:7 ../E/destroy.txt:10 ../E/drop.txt:23 ../E/factory.txt:16 ../E/fire.txt:25 ../E/flag.txt:14 ../E/goto.txt:29 ../E/grab.txt:23 ../E/move.txt:16 ../E/pencolor.txt:9 ../E/pendown.txt:12 ../E/penup.txt:6 ../E/penwidth.txt:9 ../E/recycle.txt:7 ../E/research.txt:13 ../E/sniff.txt:11 ../E/takeoff.txt:10 ../E/thump.txt:7 ../E/turn.txt:27
#, no-wrap
msgid "Return value: <code><a cbot|int>int</a></code>"
msgstr ""
#. type: Plain text
#: ../E/aim.txt:19
#, no-wrap
msgid ""
"Zero if everything is OK, a value different from zero if the rotation could not be performed: \n"
"<code>== 0 </code>The gun has now got the desired orientation\n"
"<code>!= 0 </code>rotation impossible"
msgstr ""
#. type: \b; header
#: ../E/array.txt:1
#, no-wrap
msgid "Arrays"
msgstr ""
#. type: Plain text
#: ../E/array.txt:2
#, no-wrap
msgid "An array is basically a collection of variables of the same type or class. You can use N dimensionnal arrays in the CBOT language. Each dimension is limited to 9999 elements. You must use square brackets <code>[]</code> after the type name or the variable name to declare an array."
msgstr ""
#. type: Plain text
#: ../E/array.txt:9
#, no-wrap
msgid "Actually when the CBOT interpreter encounters an array declaration, it just creates a <code><a cbot|null>null</a></code> <a cbot|pointer>reference</a>:"
msgstr ""
#. type: Source code
#: ../E/array.txt:11
#, no-wrap
msgid "int a[5]; // a is now a null reference"
msgstr ""
#. type: Plain text
#: ../E/array.txt:13
#, no-wrap
msgid "As soon as you put values into the array, the elements are created and the reference is initialized:"
msgstr ""
#. type: Source code
#: ../E/array.txt:15
#, no-wrap
msgid ""
"a[2] = 213; // a points to\n"
" // 3 elements [0], [1] et [2]"
msgstr ""
#. type: Plain text
#: ../E/array.txt:18
#, no-wrap
msgid "After this operation, <code>a</code> contains a reference to the elements of the array. Elements <code>[0]</code> and <code>[1]</code> are created but not initialized because an array cannot contain empty elements. The <code><a cbot|sizeof>sizeof</a></code> instruction allows you to obtain the number of elements contained in an array."
msgstr ""
#. type: Plain text
#: ../E/array.txt:20
#, no-wrap
msgid "When an array is declared with a maximum size, the program will stop as soon as there is an access beyond the maximum array size. No error is signalled during compilation even if the error is obvious:"
msgstr ""
#. type: Source code
#: ../E/array.txt:22
#, no-wrap
msgid ""
"{\n"
"\tint a[5];\n"
"\ta[7] = 123; // no error at compile time\n"
"\t // but error at run time\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/array.txt:28
#, no-wrap
msgid "If you pass an array as parameter to a <a cbot|function>function</a>, the function only receives a <a cbot|pointer>reference</a> to the array. That means if you modify an array element in the function, the element of the array that has been passed the function will be actuallay modified."
msgstr ""
#. type: \b; header
#: ../E/bloc.txt:1
#, no-wrap
msgid "Blocks"
msgstr ""
#. type: Plain text
#: ../E/bloc.txt:2
#, no-wrap
msgid "You can use braces <code>{ }</code> to group a number of instructions together in order to make one single block out of them, for example: "
msgstr ""
#. type: Source code
#: ../E/bloc.txt:4
#, no-wrap
msgid ""
"\t{\n"
"\t\tfloat t;\n"
"\t\tt = a;\n"
"\t\ta = b;\n"
"\t\tb = t; // switches round a and b\n"
"\t}"
msgstr ""
#. type: Plain text
#: ../E/bloc.txt:11
#, no-wrap
msgid ""
"Every instruction in the block is followed by a <a cbot|term>semicolon</a>, but the block itself is not. \n"
"Let us take the following example with the instruction <code><a cbot|if>if</a></code> to illustrate the use of blocks in a program:"
msgstr ""
#. type: Source code
#: ../E/bloc.txt:14
#, no-wrap
msgid ""
"\tif ( a < b )\n"
"\t\t<n/>instruction 1<c/>;\n"
"\t\t<n/>instruction 2<c/>;\n"
"\t<n/>instruction 3<c/>;"
msgstr ""
#. type: Plain text
#: ../E/bloc.txt:19
#, no-wrap
msgid ""
"If the <a cbot|cond>condition</a> is true, instructions 1, 2 and 3 are performed. If the condition is false, only instruction 1 is ignored, instructions 2 and 3 are performed. The fact that instruction 2 is lined up with instruction 1 does not matter. \n"
"If you want to perform instructions 1 and 2 only if the condition is true, you have to bracket them together in a block: "
msgstr ""
#. type: Source code
#: ../E/bloc.txt:22
#, no-wrap
msgid ""
"\tif ( a < b )\n"
"\t{\n"
"\t\t<n/>instruction 1<c/>;\n"
"\t\t<n/>instruction 2<c/>;\n"
"\t}\n"
"\t<n/>instruction 3<c/>;"
msgstr ""
#. type: Plain text
#: ../E/bloc.txt:29
#, no-wrap
msgid ""
"Blocks may be needed with instructions <code><a cbot|if>if</a></code>, <code><a cbot|while>while</a></code> and <code><a cbot|for>for</a></code>, in order to group several instructions that should be performed only if a condition is true, or repeated several times. \n"
"You can fit blocks into other blocks, on as many levels as you need. Here is an example of imbrication on two levels :"
msgstr ""
#. type: Source code
#: ../E/bloc.txt:32
#, no-wrap
msgid ""
"\tif ( a > b )\n"
"\t{\n"
"\t\tint i = 0;\n"
"\t\twhile ( i < 18 )\n"
"\t\t{\n"
"\t\t\tmove(10);\n"
"\t\t\tturn(5);\n"
"\t\t\ti = i+1;\n"
"\t\t}\n"
"\t}"
msgstr ""
#. type: Plain text
#: ../E/bloc.txt:43
#, no-wrap
msgid "You had better line up the open brace <code>{</code> with the closing brace <code>}</code> in order to improve readability, but it is not compulsory. The following example takes less space, is equivalent to the previous example, but it is not advisable to write your programs in the following style : "
msgstr ""
#. type: Source code
#: ../E/bloc.txt:45
#, no-wrap
msgid ""
"\tif(a>b) { int i=0; while(i<18) {\n"
"\tmove(10);turn(5);i=i+1; }}"
msgstr ""
#. type: Plain text
#: ../E/bloc.txt:49 ../E/do.txt:28 ../E/motor.txt:39 ../E/while.txt:47
#, no-wrap
msgid "<a cbot>Instructions</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/bool.txt:1
#, no-wrap
msgid "Type <code>bool</code>"
msgstr ""
#. type: Plain text
#: ../E/bool.txt:2
#, no-wrap
msgid "In a variable of this type you can put a boolean value, that is a value that can take only two states: true or false. "
msgstr ""
#. type: \b; header
#: ../E/break.txt:1
#, no-wrap
msgid "Instruction <code>break</code>"
msgstr ""
#. type: Source code
#: ../E/break.txt:3
#, no-wrap
msgid ""
"<c/>while ( condition )\n"
"{\n"
"\tbreak;\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/break.txt:8
#, no-wrap
msgid "With this instruction, you can get out immediately of a <code><a cbot|while>while</a></code> or <code><a cbot|for>for</a></code> loop."
msgstr ""
#. type: Plain text
#: ../E/break.txt:10 ../E/continue.txt:10
#, no-wrap
msgid "Here is an example:"
msgstr ""
#. type: Source code
#: ../E/break.txt:11
#, no-wrap
msgid ""
"<c/>int i = 0;\n"
"while ( true )\n"
"{\n"
"\t<n/>Instructions ...<c/>\n"
"\ti = i+1;\n"
"\tif ( i >= 10 )\n"
"\t{\n"
"\t\tbreak;\n"
"\t}\n"
"\t<n/>more instructions ...<c/>\n"
"}"
msgstr ""
#. type: \b; header
#: ../E/category.txt:1
#, no-wrap
msgid "Value <code>Categories</code>"
msgstr ""
#. type: Plain text
#: ../E/category.txt:2
#, no-wrap
msgid "Categories represent the names of objects in the CBOT language. Everything in COLOBOT is an object: robots, buildings, raw materials, etc., even yourself."
msgstr ""
#. type: Plain text
#: ../E/category.txt:34
#, no-wrap
msgid ""
" <code><a object|titanore>TitaniumOre</a> </code>Titanium Ore\n"
" <code><a object|uranore>UraniumOre</a> </code>Uranium Ore\n"
" <code><a object|titan>Titanium</a> </code>Cube of converted Titanium\n"
" <code><a object|power>PowerCell</a> </code>Regular Power Cell\n"
" <code><a object|atomic>NuclearCell</a> </code>Nuclear Power Cell\n"
" <code><a object|bullet>OrgaMatter</a> </code>Organic Matter\n"
" <code><a object|bbox>BlackBox</a> </code>Black Box\n"
" <code><a object|tnt>TNT</a> </code>Explosive device\n"
" <code><a object|key>KeyA..D</a> </code>Keys A, B, C and D"
msgstr ""
#. type: Plain text
#: ../E/category.txt:47
#, no-wrap
msgid ""
"<button 158/> <code><a object|bottr>PracticeBot</a> </code>Practice Bot\n"
"<button 173/> <code><a object|bottarg>TargetBot</a> </code>Target Bot"
msgstr ""
#. type: Plain text
#: ../E/category.txt:50
#, no-wrap
msgid ""
"<button 137/> <code><a object|botgr>WheeledGrabber</a> </code>Wheeled Grabber\n"
"<button 138/> <code><a object|botgc>TrackedGrabber</a> </code>Tracked Grabber\n"
"<button 139/> <code><a object|botgj>WingedGrabber</a> </code>Winged Grabber\n"
"<button 150/> <code><a object|botgs>LeggedGrabber</a> </code>Legged Grabber"
msgstr ""
#. type: Plain text
#: ../E/category.txt:55
#, no-wrap
msgid ""
"<button 140/> <code><a object|botsr>WheeledSniffer</a> </code>Wheeled Sniffer\n"
"<button 141/> <code><a object|botsc>TrackedSniffer</a> </code>Tracked Sniffer\n"
"<button 142/> <code><a object|botsj>WingedSniffer</a> </code>Winged Sniffer\n"
"<button 152/> <code><a object|botss>LeggedSniffer</a> </code>Legged Sniffer"
msgstr ""
#. type: Plain text
#: ../E/category.txt:60
#, no-wrap
msgid ""
"<button 143/> <code><a object|botfr>WheeledShooter</a> </code>Wheeled Shooter\n"
"<button 144/> <code><a object|botfc>TrackedShooter</a> </code>Tracked Shooter\n"
"<button 145/> <code><a object|botfj>WingedShooter</a> </code>Winged Shooter\n"
"<button 151/> <code><a object|botfs>LeggedShooter</a> </code>Legged Shooter"
msgstr ""
#. type: Plain text
#: ../E/category.txt:65
#, no-wrap
msgid ""
"<button 153/> <code><a object|botor>WheeledOrgaShooter</a> </code>Wheeled Orga Shooter\n"
"<button 154/> <code><a object|botoc>TrackedOrgaShooter</a> </code>Tracked Orga Shooter\n"
"<button 155/> <code><a object|botoj>WingedOrgaShooter</a> </code>Winged Orga Shooter\n"
"<button 156/> <code><a object|botos>LeggedOrgaShooter</a> </code>Legged Orga Shooter"
msgstr ""
#. type: Plain text
#: ../E/category.txt:75
#, no-wrap
msgid ""
"<button 149/> <code><a object|botsub>Subber</a> </code>Subber\n"
"<button 148/> <code><a object|botrecy>Recycler</a> </code>Recycler\n"
"<button 157/> <code><a object|botshld>Shielder</a> </code>Shielder\n"
"<button 146/> <code><a object|bottump>Thumper</a> </code>Thumper\n"
"<button 147/> <code><a object|botphaz>PhazerShooter</a> </code>Phazer Shooter"
msgstr ""
#. type: Plain text
#: ../E/category.txt:84
#, no-wrap
msgid ""
" <code><a object|mother>AlienQueen</a> </code>Alien Queen\n"
" <code><a object|egg>AlienEgg</a> </code>Alien Egg\n"
" <code><a object|ant>AlienAnt</a> </code>Ant\n"
" <code><a object|spider>AlienSpider</a> </code>Spider\n"
" <code><a object|wasp>AlienWasp</a> </code>Wasp\n"
" <code><a object|worm>AlienWorm</a> </code>Worm"
msgstr ""
#. type: Plain text
#: ../E/category.txt:120
#, no-wrap
msgid "<a cbot>CBOT Language</a> and <a cbot|type>Variables</a>."
msgstr ""
#. type: \b; header
#: ../E/class.txt:1
#, no-wrap
msgid "Instruction <code>class</code>"
msgstr ""
#. type: Source code
#: ../E/class.txt:4
#, no-wrap
msgid ""
"public class ClassName\n"
"{\n"
"\tdeclarations;\n"
"}"
msgstr ""
#. type: \b; header
#: ../E/close.txt:1
#, no-wrap
msgid "Instruction <code>close</code>"
msgstr ""
#. type: Plain text
#: ../E/close.txt:2
#, no-wrap
msgid "Close a file opened previously with <code><a cbot|open>open</a></code>. This is a method of the <code><a cbot|file>file</a></code> class; therefore you cannot write <code>close()</code> but only <code>handle.close()</code>:"
msgstr ""
#. type: Source code
#: ../E/close.txt:4
#, no-wrap
msgid "\thandle.close();"
msgstr ""
#. type: Plain text
#: ../E/close.txt:7
#, no-wrap
msgid ""
"<code><a cbot|file>file</a></code>, <code><a cbot|open>open</a></code>, <code><a cbot|readln>readln</a></code>, <code><a cbot|writeln>writeln</a></code> and <code><a cbot|eof>eof</a></code>.\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/cond.txt:1
#, no-wrap
msgid "Conditions"
msgstr ""
#. type: Plain text
#: ../E/expr.txt:117
#, no-wrap
msgid ""
"<code>a == b </code><code>a</code> equals <code>b</code>\n"
"<code>a != b </code><code>a</code> is different from <code>b</code>\n"
"<code>a < b </code><code>a</code> smaller than <code>b</code>\n"
"<code>a <= b </code><code>a</code> smaller than or equal to <code>b</code>\n"
"<code>a > b </code><code>a</code> greater than <code>b</code>\n"
"<code>a >= b </code><code>a</code> greater than or equal to <code>b</code>"
msgstr ""
#. type: Plain text
#: ../E/expr.txt:125
#, no-wrap
msgid ""
"<code>12 == 12 </code>returns true\n"
"<code>45 != 47 </code>returns true \n"
"<code>99 == 98 </code>returns false\n"
"<code>12 < -1 </code>returns false\n"
"<code>12 >= 10 </code>returns true \n"
"<code>12 >= 12 </code>returns true "
msgstr ""
#. type: Plain text
#: ../E/expr.txt:133
#, no-wrap
msgid "Be careful not to confuse the equality comparison <code>==</code> with the assignment of a <a cbot|var>variable</a> <code>=</code>."
msgstr ""
#. type: Plain text
#: ../E/expr.txt:135
#, no-wrap
msgid ""
"<code>a == b</code> is an expression that compares <code>a</code> with <code>b</code>.\n"
"<code>a = b</code> is an expression that copies the value of <code>b</code> into <code>a</code>."
msgstr ""
#. type: \b; header
#: ../E/continue.txt:1
#, no-wrap
msgid "Instruction <code>continue</code>"
msgstr ""
#. type: Source code
#: ../E/continue.txt:3
#, no-wrap
msgid ""
"<c/>while ( condition )\n"
"{\n"
"\tcontinue;\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/continue.txt:8
#, no-wrap
msgid "With this instruction, you can jump over the rest of instructions in the <code><a cbot|bloc>bloc</a></code> of a <code><a cbot|while>while</a></code> or <code><a cbot|for>for</a></code> loop: The execution will resume at the beginning of the bloc, the next time the loop is repeated."
msgstr ""
#. type: Source code
#: ../E/continue.txt:11
#, no-wrap
msgid ""
"<c/>int i = 0;\n"
"while ( i < 5 )\n"
"{\n"
"\ti = i+1;\n"
"\tif ( i == 3 )\n"
"\t{\n"
"\t\tcontinue;\n"
"\t}\n"
"\t<n/>Instructions ...<c/>\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/continue.txt:22
#, no-wrap
msgid "The instructions will only be executed for the values of <code>i</code> 1, 2, 4 and 5."
msgstr ""
#. type: \b; header
#: ../E/deletef.txt:1
#, no-wrap
msgid "Instruction <code>deletefile</code>"
msgstr ""
#. type: Plain text
#: ../E/deletef.txt:2
#, no-wrap
msgid "The deletefile instruction deletes an existing file in the files/ folder. "
msgstr ""
#. type: Plain text
#: ../E/deletef.txt:4
#, no-wrap
msgid "Files can only be deleted in the files/ folder which is located in the folder inside Colobot save directory. You cannot not delete files that are located elsewhere than in the files/ folder."
msgstr ""
#. type: Source code
#: ../E/deletef.txt:7
#, no-wrap
msgid "<c/>deletefile ( filename );<n/>"
msgstr ""
#. type: \b; header
#: ../E/delinfo.txt:1
#, no-wrap
msgid "Instruction <code>deleteinfo</code>"
msgstr ""
#. type: Source code
#: ../E/delinfo.txt:3
#, no-wrap
msgid "<c/>deleteinfo ( name, power );<n/>"
msgstr ""
#. type: Plain text
#: ../E/delinfo.txt:5
#, no-wrap
msgid "Delete an existing information in the closest <a object|exchange>information exchange post</a>."
msgstr ""
#. type: \t; header
#: ../E/delinfo.txt:7 ../E/receive.txt:7 ../E/send.txt:7 ../E/testinfo.txt:7
#, no-wrap
msgid "name: <code>string</code>"
msgstr ""
#. type: Plain text
#: ../E/delinfo.txt:8
#, no-wrap
msgid "Name of the information to be deleted. This name is a string: it must be written in quotation marks \"\"."
msgstr ""
#. type: \t; header
#: ../E/delinfo.txt:10 ../E/receive.txt:10 ../E/send.txt:14 ../E/testinfo.txt:10
#, no-wrap
msgid "power: <code>float</code>"
msgstr ""
#. type: Plain text
#: ../E/delinfo.txt:11
#, no-wrap
msgid "Power of the transmitter, which corresponds to the maximal distance between the sender and the exchange post. If the distance is longer, the information won't be deleted. Default value is 10 metres."
msgstr ""
#. type: Plain text
#: ../E/delinfo.txt:14
#, no-wrap
msgid ""
"<code><a cbot|receive>receive</a></code>, <code><a cbot|send>send</a></code> and <code><a cbot|testinfo>testinfo</a></code>.\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/direct.txt:1
#, no-wrap
msgid "Instruction <code>direction</code>"
msgstr ""
#. type: Source code
#: ../E/direct.txt:3
#, no-wrap
msgid "<c/>direction ( pos );<n/>"
msgstr ""
#. type: Plain text
#: ../E/direct.txt:5
#, no-wrap
msgid "Calculates the rotation that a robot must perform in order to point towards a given position. "
msgstr ""
#. type: \t; header
#: ../E/direct.txt:7 ../E/goto.txt:17
#, no-wrap
msgid "pos: <code><a cbot|point>point</a></code>"
msgstr ""
#. type: Plain text
#: ../E/direct.txt:8
#, no-wrap
msgid "Position towards which the robot must point."
msgstr ""
#. type: \t; header
#: ../E/acos.txt:8 ../E/asin.txt:8 ../E/atan.txt:8 ../E/atan2.txt:13 ../E/ceil.txt:9 ../E/cos.txt:8 ../E/direct.txt:10 ../E/dist.txt:26 ../E/dist2d.txt:10 ../E/flatgrnd.txt:13 ../E/floor.txt:9 ../E/pow.txt:11 ../E/rand.txt:5 ../E/receive.txt:13 ../E/round.txt:9 ../E/sin.txt:8 ../E/sqrt.txt:8 ../E/tan.txt:8 ../E/topo.txt:10 ../E/trunc.txt:9
#, no-wrap
msgid "Return value: <code><a cbot|float>float</a></code>"
msgstr ""
#. type: Plain text
#: ../E/direct.txt:11
#, no-wrap
msgid "Angle of the rotation that must be performed. -90 means f. ex. a rotation of 90 degrees to the right. "
msgstr ""
#. type: \b; header
#: ../E/dist.txt:1
#, no-wrap
msgid "Instruction <code>distance</code>"
msgstr ""
#. type: Plain text
#: ../E/dist.txt:2
#, no-wrap
msgid "With the instruction <code>distance( , )</code> you can calculate the distance between two positions."
msgstr ""
#. type: \b; header
#: ../E/build.txt:4 ../E/buildingenabled.txt:4 ../E/canbuild.txt:4 ../E/dist.txt:4 ../E/drop.txt:4 ../E/fire.txt:4 ../E/function.txt:16 ../E/goto.txt:4 ../E/grab.txt:4 ../E/if.txt:4 ../E/motor.txt:4 ../E/move.txt:4 ../E/radar.txt:4 ../E/switch.txt:4 ../E/turn.txt:4 ../E/wait.txt:4 ../E/while.txt:4
#, no-wrap
msgid "Basic use"
msgstr ""
#. type: Plain text
#: ../E/dist.txt:5
#, no-wrap
msgid "If you write <code>position</code> alone, this gives you the position of the bot that executes the program. If you write the name of a variable followed by <code>.position</code>, this gives you the position of the object described in the variable."
msgstr ""
#. type: Plain text
#: ../E/dist.txt:7
#, no-wrap
msgid "Here is a program that moves forward, covering exactly the distance between the bot and the closest ant:"
msgstr ""
#. type: Source code
#: ../E/dist.txt:9
#, no-wrap
msgid ""
"\titem = <a cbot|radar>radar</a>(AlienAnt);\n"
"\t<a cbot|move>move</a>(distance(position, item.position));"
msgstr ""
#. type: Plain text
#: ../E/dist.txt:12
#, no-wrap
msgid "This is of course pure suicide. Better to stop 40 meters before, in order to be at shooting range:"
msgstr ""
#. type: Source code
#: ../E/dist.txt:14
#, no-wrap
msgid ""
"\titem = radar(AlienAnt);\n"
"\tmove(distance(position, item.position) - 40);"
msgstr ""
#. type: \b; header, \t; header
#: ../E/build.txt:11 ../E/buildingenabled.txt:12 ../E/canbuild.txt:12 ../E/detect.txt:4 ../E/dist.txt:17 ../E/drop.txt:11 ../E/errmode.txt:4 ../E/file.txt:10 ../E/fire.txt:9 ../E/float.txt:19 ../E/goto.txt:11 ../E/grab.txt:11 ../E/if.txt:22 ../E/int.txt:13 ../E/motor.txt:14 ../E/move.txt:7 ../E/radar.txt:13 ../E/radarall.txt:11 ../E/return.txt:9 ../E/switch.txt:46 ../E/turn.txt:18 ../E/wait.txt:9 ../E/while.txt:19
#, no-wrap
msgid "For specialists"
msgstr ""
#. type: Plain text, \t; header
#: ../E/abstime.txt:2 ../E/acos.txt:2 ../E/aim.txt:2 ../E/asin.txt:2 ../E/atan.txt:2 ../E/atan2.txt:2 ../E/build.txt:12 ../E/buildingenabled.txt:13 ../E/canbuild.txt:13 ../E/canresearch.txt:2 ../E/ceil.txt:2 ../E/cos.txt:2 ../E/deflag.txt:2 ../E/deletef.txt:6 ../E/delinfo.txt:2 ../E/destroy.txt:2 ../E/detect.txt:5 ../E/dist.txt:18 ../E/dist2d.txt:2 ../E/do.txt:2 ../E/drop.txt:12 ../E/errmode.txt:5 ../E/factory.txt:2 ../E/fire.txt:10 ../E/flag.txt:2 ../E/flatgrnd.txt:2 ../E/flatspace.txt:2 ../E/floor.txt:2 ../E/for.txt:2 ../E/goto.txt:12 ../E/grab.txt:12 ../E/if.txt:23 ../E/isbusy.txt:2 ../E/jet.txt:2 ../E/message.txt:2 ../E/move.txt:8 ../E/pencolor.txt:2 ../E/pendown.txt:2 ../E/penup.txt:2 ../E/penwidth.txt:2 ../E/pow.txt:2 ../E/produce.txt:2 ../E/radar.txt:14 ../E/radarall.txt:12 ../E/rand.txt:2 ../E/readln.txt:8 ../E/receive.txt:2 ../E/recycle.txt:2 ../E/research.txt:2 ../E/researched.txt:2 ../E/retobj.txt:2 ../E/round.txt:2 ../E/search.txt:2 ../E/send.txt:2 ../E/shield.txt:2 ../E/sin.txt:2 ../E/sniff.txt:2 ../E/space.txt:2 ../E/sqrt.txt:2 ../E/strfind.txt:4 ../E/strleft.txt:4 ../E/strlen.txt:4 ../E/strlower.txt:4 ../E/strmid.txt:4 ../E/strright.txt:4 ../E/strupper.txt:4 ../E/strval.txt:8 ../E/switch.txt:47 ../E/takeoff.txt:2 ../E/tan.txt:2 ../E/testinfo.txt:2 ../E/thump.txt:2 ../E/topo.txt:2 ../E/trunc.txt:2 ../E/turn.txt:19 ../E/wait.txt:10 ../E/writeln.txt:8
#, no-wrap
msgid "Syntax:"
msgstr ""
#. type: Source code
#: ../E/dist.txt:19
#, no-wrap
msgid "<c/>distance ( pos1, pos2 );<n/>"
msgstr ""
#. type: Plain text
#: ../E/dist.txt:21
#, no-wrap
msgid "Calculates the distance between two positions. "
msgstr ""
#. type: \t; header
#: ../E/dist.txt:23 ../E/dist2d.txt:7
#, no-wrap
msgid "pos1, pos2: <code><a cbot|point>point</a></code>"
msgstr ""
#. type: Plain text
#: ../E/dist.txt:24 ../E/dist2d.txt:8
#, no-wrap
msgid "Coordinates of the two positions. "
msgstr ""
#. type: Plain text
#: ../E/dist.txt:27 ../E/dist2d.txt:11
#, no-wrap
msgid "Distance between the two positions."
msgstr ""
#. type: \b; header
#: ../E/dist2d.txt:1
#, no-wrap
msgid "Instruction <code>distance2d</code>"
msgstr ""
#. type: Source code
#: ../E/dist2d.txt:3
#, no-wrap
msgid "<c/>distance2d ( pos1, pos2 );<n/>"
msgstr ""
#. type: Plain text
#: ../E/dist2d.txt:5
#, no-wrap
msgid "Calculates the distance between two positions (ignores the z coordinate)."
msgstr ""
#. type: \b; header
#: ../E/do.txt:1
#, no-wrap
msgid "Instruction <code>do - while</code>"
msgstr ""
#. type: Source code
#: ../E/do.txt:3
#, no-wrap
msgid ""
"<code>do\n"
"{\n"
"\t</code>Instructions ...<c/>\n"
"}\n"
"while ( condition );"
msgstr ""
#. type: Plain text
#: ../E/do.txt:9
#, no-wrap
msgid ""
"This instruction allows you to perform several times the instructions inside the <a cbot|bloc>block</a>. The instructions are executed at least once, because the condition is tested only afterwards.\n"
"Be careful not to confuse the instruction <c/>do { } while ( );<n/> with the instruction <code><a cbot|while>while</a> ( ) { }</code>; the latter tests the condition before the instructions in the block are executed. "
msgstr ""
#. type: \t; header
#: ../E/do.txt:12 ../E/for.txt:13 ../E/while.txt:30
#, no-wrap
msgid "<code>condition</code>"
msgstr ""
#. type: Plain text
#: ../E/do.txt:13 ../E/while.txt:31
#, no-wrap
msgid "The instructions in the block are performed over and over again, as long as the <a cbot|cond>condition</a> is true. "
msgstr ""
#. type: Plain text
#: ../E/do.txt:15 ../E/while.txt:33
#, no-wrap
msgid "Here is an example :"
msgstr ""
#. type: Source code
#: ../E/do.txt:16
#, no-wrap
msgid ""
"<c/>do\n"
"{\n"
"\tp = radar(TitaniumOre);\n"
"}\n"
"while ( p == null );"
msgstr ""
#. type: \t; header
#: ../E/do.txt:22 ../E/float.txt:11 ../E/for.txt:33 ../E/if.txt:36 ../E/int.txt:10 ../E/switch.txt:67 ../E/while.txt:41
#, no-wrap
msgid "Attention"
msgstr ""
#. type: Plain text
#: ../E/do.txt:23
#, no-wrap
msgid "Always put a <a cbot|term>semicolon</a> at the end of the line <code>while ( )</code>."
msgstr ""
#. type: Plain text
#: ../E/do.txt:25
#, no-wrap
msgid "The instructions <code><a cbot|break>break</a></code> and <code><a cbot|continue>continue</a></code> can be useful inside a block following the instruction <code>do { }</code>."
msgstr ""
#. type: \b; header
#: ../E/drop.txt:1
#, no-wrap
msgid "Instruction <code>drop</code>"
msgstr ""
#. type: Plain text
#: ../E/drop.txt:2
#, no-wrap
msgid "The instruction <c/>drop();<n/> instructs the bot to drop whatever the operating arm is carrying on the ground, on the platform of a building or on the power cell location of a bot."
msgstr ""
#. type: Plain text
#: ../E/drop.txt:5
#, no-wrap
msgid "The instruction <c/>drop();<n/> written in this form drops the object in front of the bot. Here is a short program that grabs an object in front of the bot and drops it 5 meters further:"
msgstr ""
#. type: Source code
#: ../E/drop.txt:7
#, no-wrap
msgid ""
"\t<a cbot|grab>grab</a>();\n"
"\t<a cbot|move>move</a>(5);\n"
"\tdrop();"
msgstr ""
#. type: Source code
#: ../E/drop.txt:13
#, no-wrap
msgid "<c/>drop ( oper );<n/>"
msgstr ""
#. type: Plain text
#: ../E/drop.txt:15
#, no-wrap
msgid "This instruction appeals to the operating arm of a <a object|botgr>grabber bot</a>, in order to drop what it is holding."
msgstr ""
#. type: \t; header
#: ../E/drop.txt:17 ../E/grab.txt:17
#, no-wrap
msgid "oper: <code><a cbot|int>int</a></code> (default value<code>InFront</code>)"
msgstr ""
#. type: Plain text
#: ../E/drop.txt:18
#, no-wrap
msgid ""
"Oper indicates where the robot should drop the object. If no indication is given, the object is dropped in front of the bot. \n"
"<code>InFront </code> Drops in front (default value).\n"
"<code>Behind </code> Drops behind.\n"
"<code>EnergyCell</code> Drops on the bot's own power cell location."
msgstr ""
#. type: Plain text
#: ../E/drop.txt:24
#, no-wrap
msgid ""
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <c/>drop();<n/>.\n"
"<code>== 0 </code>object was dropped\n"
"<code>!= 0 </code>error, no object was dropped"
msgstr ""
#. type: \b; header
#: ../E/eof.txt:1
#, no-wrap
msgid "Instruction <code>eof</code>"
msgstr ""
#. type: Plain text
#: ../E/eof.txt:2
#, no-wrap
msgid "Test the end of file condition of an open file. This is a method of the <code><a cbot|file>file</a></code> class; therefore you cannot write <code>eof()</code> but only <code>handle.eof()</code>:"
msgstr ""
#. type: Source code
#: ../E/eof.txt:4
#, no-wrap
msgid "\tif ( handle.eof() ) "
msgstr ""
#. type: Plain text
#: ../E/eof.txt:6 ../E/readln.txt:11
#, no-wrap
msgid "Example:"
msgstr ""
#. type: Source code
#: ../E/eof.txt:8
#, no-wrap
msgid ""
"\twhile ( not handle.eof() )\n"
"\t{\n"
"\t\ts = handle.readln();\n"
"\t}"
msgstr ""
#. type: Plain text
#: ../E/eof.txt:14
#, no-wrap
msgid ""
"<code><a cbot|file>file</a></code>, <code><a cbot|open>open</a></code>, <code><a cbot|close>close</a></code>, <code><a cbot|readln>readln</a></code> and <code><a cbot|writeln>writeln</a></code>.\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/errmode.txt:1
#, no-wrap
msgid "Instruction <code>errmode</code>"
msgstr ""
#. type: Plain text
#: ../E/errmode.txt:2
#, no-wrap
msgid "The <c/>errmode();<n/> instruction allows you to chose if the program should stop when an error occurs in one of the following instructions: <code><a cbot|goto>goto</a></code>, <code><a cbot|move>move</a></code>, <code><a cbot|grab>grab</a></code>, <code><a cbot|drop>drop</a></code>, etc."
msgstr ""
#. type: Source code
#: ../E/errmode.txt:6
#, no-wrap
msgid "<c/>errmode ( mode );<n/>"
msgstr ""
#. type: Plain text
#: ../E/errmode.txt:8
#, no-wrap
msgid "Normally the program is stopped when an error occurs. If you use the instruction <c/>errmode(0);<n/> at the beginning of the program, the instructions listed above return a value different from zero if the instruction could not be performed."
msgstr ""
#. type: \t; header
#: ../E/errmode.txt:10
#, no-wrap
msgid "mode: <code><a cbot|float>float</a></code> (<code>1</code> per default)"
msgstr ""
#. type: Plain text
#: ../E/errmode.txt:11
#, no-wrap
msgid ""
"Error treatment mode.\n"
"<code>0</code> -> continues program execution and returns a non zero value\n"
"<code>1</code> -> stops the program (default behavior)"
msgstr ""
#. type: Plain text
#: ../E/errmode.txt:15
#, no-wrap
msgid "Example 1:"
msgstr ""
#. type: Source code
#: ../E/errmode.txt:16
#, no-wrap
msgid ""
"<c/>errmode(0);\n"
"while ( goto(pos) != 0 )\n"
"{\n"
"\twait(2);\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/errmode.txt:22
#, no-wrap
msgid "Example 2:"
msgstr ""
#. type: Source code
#: ../E/errmode.txt:23
#, no-wrap
msgid ""
"<c/>errmode(0);\n"
"int err;\n"
"err = goto(pos);\n"
"if ( err != 0 )\n"
"{\n"
"\t<n/>goto did not perform correctly ...<code>\n"
"\t</code>take some appropriate action ...<c/>\n"
"}"
msgstr ""
#. type: \b; header
#: ../E/expr.txt:1
#, no-wrap
msgid "Expressions"
msgstr ""
#. type: Plain text
#: ../E/expr.txt:87
#, no-wrap
msgid "is equivalent to"
msgstr ""
#. type: Plain text
#: ../E/expr.txt:179
#, no-wrap
msgid "The operators <code>++</code> and <code>--</code> allow you to increment (++) or to decrement (--) a variable in very compact and efficient manner."
msgstr ""
#. type: \b; header
#: ../E/extern.txt:1
#, no-wrap
msgid "Instruction <code>extern</code>"
msgstr ""
#. type: Plain text
#: ../E/extern.txt:2
#, no-wrap
msgid "The <code>extern</code> instruction determines the <a cbot|function>function</a> that acts as main program of a robot. The name of the function declared with <code>extern</code> will apear in the program list in the lower left corner of the screen."
msgstr ""
#. type: Source code
#: ../E/extern.txt:4
#, no-wrap
msgid ""
"extern void object::MowDown( )\n"
"{\n"
"\twhile ( true )\n"
"\t{\n"
"\t\tfire(1);\n"
"\t\tturn(10);\n"
"\t}\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/extern.txt:13
#, no-wrap
msgid "If the program contains other functions, only the main function must be preceded by <code>extern</code>."
msgstr ""
#. type: Source code
#: ../E/extern.txt:15
#, no-wrap
msgid ""
"extern void object::Square( )\n"
"{\n"
"\tfor ( int i=0 ; i<4 ; i++ )\n"
"\t{\n"
"\t\tLine(10);\n"
"\t}\n"
"}\n"
"\n"
"void object::Line(float dist)\n"
"{\n"
"\tmove(dist);\n"
"\tturn(90);\n"
"}"
msgstr ""
#. type: \b; header
#: ../E/false.txt:1
#, no-wrap
msgid "Type <code>false</code>"
msgstr ""
#. type: Plain text
#: ../E/false.txt:2
#, no-wrap
msgid "This value means that a condition is not true; it is one of the two values that a <a cbot|bool>boolean</a> <a cbot|var>variable</a> can take."
msgstr ""
#. type: \b; header
#: ../E/file.txt:1
#, no-wrap
msgid "Type <code>file</code>"
msgstr ""
#. type: Plain text
#: ../E/file.txt:2
#, no-wrap
msgid "This type is used for accessing files in the files/ folder."
msgstr ""
#. type: Source code
#: ../E/file.txt:4
#, no-wrap
msgid "\tfile handle();"
msgstr ""
#. type: Plain text
#: ../E/file.txt:6
#, no-wrap
msgid "Use the syntax above for declaring a file handle. You must use () to create an instance of the <code>file</code> class. Without the () the handle would have the value <code><a cbot|null>null</a></code>."
msgstr ""
#. type: Plain text
#: ../E/file.txt:8
#, no-wrap
msgid "Files can only be created and opened in the files/ folder which is located in the folder inside Colobot save directory. You cannot not create or open files elsewhere than in the files/ folder."
msgstr ""
#. type: Plain text
#: ../E/file.txt:11
#, no-wrap
msgid "<code>file</code> is actually not a simple type but a class. <code>open</code>, <code>close</code>, <code>writeln</code> etc. are methods of the <code>file</code> class. This is the reason why we always write <code>handle.method()</code>:"
msgstr ""
#. type: Source code
#: ../E/file.txt:13
#, no-wrap
msgid ""
"\thandle.open(\"test.txt\", \"w\");\n"
"\thandle.close();"
msgstr ""
#. type: Plain text
#: ../E/file.txt:17
#, no-wrap
msgid ""
"<code><a cbot|open>open</a></code>, <code><a cbot|close>close</a></code>, <code><a cbot|readln>readln</a></code>, <code><a cbot|writeln>writeln</a></code> and <code><a cbot|eof>eof</a></code>.\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/fire.txt:1
#, no-wrap
msgid "Instruction <code>fire</code>"
msgstr ""
#. type: Plain text
#: ../E/fire.txt:2
#, no-wrap
msgid "The instruction <c/>fire();<n/> fires the bot's onboard cannon."
msgstr ""
#. type: Plain text
#: ../E/fire.txt:5
#, no-wrap
msgid "Generally this instruction is used to shoot one-second bursts:"
msgstr ""
#. type: Source code
#: ../E/fire.txt:7
#, no-wrap
msgid "\tfire(1);"
msgstr ""
#. type: Source code
#: ../E/fire.txt:11
#, no-wrap
msgid "<c/>fire ( time );<n/>"
msgstr ""
#. type: Plain text
#: ../E/fire.txt:20
#, no-wrap
msgid "In order to move the gun upward or downward, use the instruction <code><a cbot|aim>aim</a></code>."
msgstr ""
#. type: \t; header
#: ../E/fire.txt:22 ../E/wait.txt:15
#, no-wrap
msgid "time: <code><a cbot|float>float</a></code>"
msgstr ""
#. type: Plain text
#: ../E/fire.txt:23
#, no-wrap
msgid "Duration of the burst. Generally, the value given is 1. Shorter bursts can also be performed in order to spare time and energy."
msgstr ""
#. type: Plain text
#: ../E/fire.txt:26
#, no-wrap
msgid ""
"Zero if OK, or a value different from zero if an error occurred.\n"
"<code>== 0 </code>the cannon has been fired\n"
"<code>!= 0 </code>error, the cannon could not be fired"
msgstr ""
#. type: \b; header
#: ../E/flatgrnd.txt:1
#, no-wrap
msgid "Instruction <code>flatground</code>"
msgstr ""
#. type: Source code
#: ../E/flatgrnd.txt:3
#, no-wrap
msgid "<c/>flatground ( center, rmax );<n/>"
msgstr ""
#. type: Plain text
#: ../E/flatgrnd.txt:5
#, no-wrap
msgid "Calculates the maximal radius of a flat zone on which a building ca be built."
msgstr ""
#. type: \t; header
#: ../E/flatgrnd.txt:7 ../E/flatspace.txt:7
#, no-wrap
msgid "center: <code><a cbot|point>point</a></code>"
msgstr ""
#. type: Plain text
#: ../E/flatgrnd.txt:8
#, no-wrap
msgid "Center of the circlular zone."
msgstr ""
#. type: \t; header
#: ../E/flatgrnd.txt:10
#, no-wrap
msgid "rmax: <code><a cbot|float>float</a></code>"
msgstr ""
#. type: Plain text
#: ../E/flatgrnd.txt:11
#, no-wrap
msgid "Maximal radius."
msgstr ""
#. type: Plain text
#: ../E/flatgrnd.txt:14
#, no-wrap
msgid "Radius of the flat zone (always between 0 and rmax)."
msgstr ""
#. type: \b; header
#: ../E/float.txt:1
#, no-wrap
msgid "Type <code>float</code>"
msgstr ""
#. type: Plain text
#: ../E/float.txt:2
#, no-wrap
msgid "Use this type for most variables that contains numbers. Variables of this type can contain positive and negative numbers, whole or real numbers, for example: "
msgstr ""
#. type: Source code
#: ../E/float.txt:4
#, no-wrap
msgid ""
"\t12.9\n"
"\t1.125\n"
"\t0.002\n"
"\t-4.1"
msgstr ""
#. type: Plain text
#: ../E/float.txt:9
#, no-wrap
msgid "If you need only whole numbers (f. ex. 12 or -5000), you should rather use the type <code><a cbot|int>int</a></code>."
msgstr ""
#. type: Plain text
#: ../E/float.txt:12
#, no-wrap
msgid "Do not insert space or colon characters into a number. To separate the whole part from the fractional part, use a dot. "
msgstr ""
#. type: Source code
#: ../E/float.txt:14
#, no-wrap
msgid ""
" Write and not\n"
" 12.56 12 . 56\n"
" -54.34 -54,34\n"
"12895.69 12,895.69"
msgstr ""
#. type: Plain text
#: ../E/float.txt:20
#, no-wrap
msgid ""
"Floating point numbers are represented in Colobot with 32 bits.\n"
"The highest value that can be represented is 3.4E+38.\n"
"The smallest value that can be represented is 3.4E-38."
msgstr ""
#. type: \b; header
#: ../E/for.txt:1
#, no-wrap
msgid "Instruction <code>for</code>"
msgstr ""
#. type: Source code
#: ../E/for.txt:3
#, no-wrap
msgid ""
"<c/>for ( before ; condition ; end )\n"
"{\n"
"\t<n/>Instructions ...<c/>\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/for.txt:8
#, no-wrap
msgid "This instruction allows you to execute a certain number of times the instructions contained in the <a cbot|bloc>block</a>."
msgstr ""
#. type: \t; header
#: ../E/for.txt:10
#, no-wrap
msgid "<code>before</code>"
msgstr ""
#. type: Plain text
#: ../E/for.txt:14
#, no-wrap
msgid "This <a cbot|cond>condition</a> determines if another instance of the loop must be executed. It is tested before every instance of the loop. "
msgstr ""
#. type: \t; header
#: ../E/for.txt:16
#, no-wrap
msgid "<code>end</code>"
msgstr ""
#. type: Source code
#: ../E/for.txt:21
#, no-wrap
msgid ""
"{\n"
"\tmessage(i) ;\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/for.txt:25
#, no-wrap
msgid "The following example is strictly equivalent to a <code>for</code>-loop, but it uses the instruction <code><a cbot|while>while</a></code>:"
msgstr ""
#. type: Source code
#: ../E/for.txt:26
#, no-wrap
msgid ""
"<c/>before;\n"
"while ( condition )\n"
"{\n"
"\t<n/>Instructions ...<c/>\n"
"\tend;\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/for.txt:34
#, no-wrap
msgid "Do not put a <a cbot|term>semicolon</a> at the end of the line <code>for ( )</code>."
msgstr ""
#. type: Plain text
#: ../E/for.txt:36
#, no-wrap
msgid "The instructions <code><a cbot|break>break</a></code> and <code><a cbot|continue>continue</a></code> can be useful inside a block following the instruction <code>for </code>."
msgstr ""
#. type: \b; header
#: ../E/function.txt:1
#, no-wrap
msgid "Functions"
msgstr ""
#. type: Plain text
#: ../E/function.txt:118
#, no-wrap
msgid "You can also declare a function <a cbot|public>public</a> so it can be used by other bots."
msgstr ""
#. type: \b; header
#: ../E/goto.txt:1
#, no-wrap
msgid "Instruction <code>goto</code>"
msgstr ""
#. type: Plain text
#: ../E/goto.txt:2
#, no-wrap
msgid "The instruction <c/>goto();<n/> instructs the bot to reach a given position."
msgstr ""
#. type: Plain text
#: ../E/goto.txt:5
#, no-wrap
msgid "The most current use consists in moving the bot to an object located with the instruction <c/><a cbot|radar>radar</a>();<n/>. If the information returned by the <c/><a cbot|radar>radar</a>();<n/> has been stored in a certain variable, write the name of the variable followed by <code>.position</code> in order to get the position of the object. Here is an example of a program that looks for a <a object|titan>titanium cube</a>, goes to the position and grabs it:"
msgstr ""
#. type: Source code
#: ../E/goto.txt:7
#, no-wrap
msgid ""
"\titem = <a cbot|radar>radar</a>(Titanium);\n"
"\tgoto(item.position);\n"
"\t<a cbot|grab>grab</a>();"
msgstr ""
#. type: Source code
#: ../E/goto.txt:13
#, no-wrap
msgid "<c/>goto ( position, altitude, goal, crash );<n/>"
msgstr ""
#. type: Plain text
#: ../E/goto.txt:15
#, no-wrap
msgid "Tells the robot to go to the given position, avoiding all the obstacles if this is possible. "
msgstr ""
#. type: Plain text
#: ../E/goto.txt:18
#, no-wrap
msgid "Coordinates of the goal position."
msgstr ""
#. type: \t; header
#: ../E/goto.txt:20
#, no-wrap
msgid "altitude: <code><a cbot|float>float</a></code>"
msgstr ""
#. type: Plain text
#: ../E/goto.txt:21
#, no-wrap
msgid "Flight altitude for <a object|botgj>winged bots</a>. The altitude is useful only for <a object|botgj>winged bots</a>. From the initial altitude, the bot climbs higher until it reaches the specified hight. When arriving close to destination, it goes down to touch the ground at the given position. If no value is given, an altitude of 10 meters is the default value. On very short moves, even winged bot stay on the ground. For all bot except winged bots, this parameter is ignored. "
msgstr ""
#. type: \t; header
#: ../E/goto.txt:23
#, no-wrap
msgid "goal: <code><a cbot|int>int</a></code> (default value <code>0</code>)"
msgstr ""
#. type: Plain text
#: ../E/goto.txt:24
#, no-wrap
msgid ""
"This parameter tells the bot how it must reach the goal: \n"
"<code>0</code> stops exactly at the goal position\n"
"<code>1</code> goes close to the goal position, without stopping.\n"
"If no value is given, <code>0</code> (precision) is the default value."
msgstr ""
#. type: Plain text
#: ../E/goto.txt:30
#, no-wrap
msgid ""
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <code>goto()</code>.\n"
"<code>== 0 </code>Goal position reached\n"
"<code>!= 0 </code>Goal position impossible to reach"
msgstr ""
#. type: \b; header
#: ../E/grab.txt:1
#, no-wrap
msgid "Instruction <code>grab</code>"
msgstr ""
#. type: Plain text
#: ../E/grab.txt:2
#, no-wrap
msgid "The instruction <c/>grab();<n/> instructs the bot to use the operating arm to grab an object located on the ground, on the platform of a building or on the power cell location of a bot."
msgstr ""
#. type: Plain text
#: ../E/grab.txt:5
#, no-wrap
msgid "The instruction <c/>grab();<n/> written in this form grabs the object located in front of the bot. Here is a short program that grabs an object in front of the bot and drops it 5 meters further:"
msgstr ""
#. type: Source code
#: ../E/grab.txt:7
#, no-wrap
msgid ""
"\tgrab();\n"
"\t<a cbot|move>move</a>(5);\n"
"\t<a cbot|drop>drop</a>();"
msgstr ""
#. type: Source code
#: ../E/grab.txt:13
#, no-wrap
msgid "<c/>grab ( oper );<n/>"
msgstr ""
#. type: Plain text
#: ../E/grab.txt:15
#, no-wrap
msgid "This instruction appeals to the operating arm of a <a object|botgr>grabber bot</a>, in order to grab the closest object."
msgstr ""
#. type: Plain text
#: ../E/grab.txt:18
#, no-wrap
msgid ""
"Oper indicates where the bot should look for an object to grab. If no indication is given, the object is picked up in front of the bot.\n"
"<code>InFront </code> Grabs in front (default value).\n"
"<code>Behind </code> Grabs behind.\n"
"<code>EnergyCell</code> Grabs the bot's own power cell."
msgstr ""
#. type: Plain text
#: ../E/grab.txt:24
#, no-wrap
msgid ""
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <c/>grab();<n/>.\n"
"<code>== 0 </code>an object was grabbed\n"
"<code>!= 0 </code>error, no object was grabbed"
msgstr ""
#. type: \b; header
#: ../E/if.txt:1
#, no-wrap
msgid "Instructions <code>if</code> and <code>else</code>"
msgstr ""
#. type: Plain text
#: ../E/if.txt:2
#, no-wrap
msgid "With the instruction <code>if() {}</code> you can execute a set of instructions only if a certain condition is true. Write the condition in brackets <code>()</code>, and the instructions in braces <code>{}</code>."
msgstr ""
#. type: Plain text
#: ../E/if.txt:5
#, no-wrap
msgid "Here is a concrete example: The bot will shoot only if the target is closer than 40 meters:"
msgstr ""
#. type: Source code
#: ../E/if.txt:7
#, no-wrap
msgid ""
"\titem = <a cbot|radar>radar</a>(AlienAnt);\n"
"\tif (<a cbot|dist>distance</a>(position, item.position) < 40)\n"
"\t{\n"
"\t\tfire(1);\n"
"\t}"
msgstr ""
#. type: Plain text
#: ../E/if.txt:13
#, no-wrap
msgid "You can also test if an object exists at all. If the instruction <c/><a cbot|radar>radar</a>();<n/> does not find the requested object, it returns the value <code>null</code>. So you can test if an object does not exists with the condition <code>(item == null)</code>, or test if it exists with <code>(item != null)</code>. Two equal signs <code>==</code> test equality, an exclamation mark followed by an equal sign <code>!=</code> test inequality. Here is a test that will go to rechage the <a object|power>power cell</a> only if there is a <a object|station>power station</a>:"
msgstr ""
#. type: Source code
#: ../E/if.txt:15
#, no-wrap
msgid ""
"\titem = <a cbot|radar>radar</a>(PowerStation);\n"
"\tif (item != null)\n"
"\t{\n"
"\t\t<a cbot|goto>goto</a>(item.position);\n"
"\t\t<a cbot|wait>wait</a>(5);\n"
"\t}"
msgstr ""
#. type: Source code
#: ../E/if.txt:24
#, no-wrap
msgid ""
"<code>if ( condition )\n"
"{\n"
"\t</code>Instructions A ...<code>\n"
"}\n"
"else\n"
"{\n"
"\t</code>Instructions B ...<c/>\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/if.txt:33
#, no-wrap
msgid ""
"With this conditional structure you can execute a <a cbot|bloc>bloc</a> A or a <a cbot|bloc>bloc</a> B depending on a <a cbot|cond>condition</a>. If the condition is true, bloc A is executed. If the condition is false, bloc B is executed. \n"
"Part <code>else { }</code> is not compulsory. "
msgstr ""
#. type: Plain text
#: ../E/if.txt:37
#, no-wrap
msgid "Do not put a <a cbot|term>semicolon</a> at the end of the line <code>if ( )</code>."
msgstr ""
#. type: \b; header
#: ../E/int.txt:1
#, no-wrap
msgid "Type <code>int</code>"
msgstr ""
#. type: Plain text
#: ../E/int.txt:2
#, no-wrap
msgid "Use this type for variables that contain only whole numbers, negative or positive. For example: "
msgstr ""
#. type: Source code
#: ../E/int.txt:4
#, no-wrap
msgid ""
"\t12\n"
"\t1000\n"
"\t-4"
msgstr ""
#. type: Plain text
#: ../E/int.txt:8
#, no-wrap
msgid "To represent real numbers like 12.05 or -0.005, use the type <code><a cbot|float>float</a></code>."
msgstr ""
#. type: Plain text
#: ../E/int.txt:11
#, no-wrap
msgid "Do not put space or colon signs inside a number. "
msgstr ""
#. type: Plain text
#: ../E/int.txt:14
#, no-wrap
msgid ""
"Numbers of the type <code>int</code> are represented with 32 bits.\n"
"The highest number that can be represented is (2^31)-1, that is 2'147'483'647.\n"
"The smallest number that can be represented is -(2^31), that is -2'147'483'648."
msgstr ""
#. type: \b; header
#: ../E/jet.txt:1
#, no-wrap
msgid "Instruction <code>jet</code>"
msgstr ""
#. type: Source code
#: ../E/jet.txt:3
#, no-wrap
msgid "<c/>jet ( power );<n/>"
msgstr ""
#. type: Plain text
#: ../E/jet.txt:5
#, no-wrap
msgid "Direct control of the jet of a <a object|botgj>winged bot</a>. The jet is what makes the bot fly. Use this instruction in order to take off, climb, descend or land."
msgstr ""
#. type: \t; header
#: ../E/jet.txt:7 ../E/produce.txt:21
#, no-wrap
msgid "power: <code><a cbot|float>float</a></code>"
msgstr ""
#. type: Plain text
#: ../E/jet.txt:8
#, no-wrap
msgid "Power of the jet, ranges between <code>-1</code> and <code>+1</code>. <c/>jet(1);<n/> instructs the bot to climb as fast as possible, <c/>jet(-1);<n/> descends as fast as possible, <c/>jet(0);<n/> stabilizes the altitude. In order to get slower altitude changes, use intermediate values, for example <c/>jet(0.3);<n/>."
msgstr ""
#. type: \t; header
#: ../E/jet.txt:11 ../E/message.txt:21 ../E/motor.txt:35 ../E/shield.txt:15 ../E/wait.txt:18
#, no-wrap
msgid "Return value: <code><a cbot|void>void</a></code>"
msgstr ""
#. type: Plain text
#: ../E/jet.txt:12 ../E/message.txt:22 ../E/motor.txt:36 ../E/shield.txt:16 ../E/wait.txt:19
#, no-wrap
msgid "None."
msgstr ""
#. type: \b; header
#: ../E/message.txt:1
#, no-wrap
msgid "Instruction <code>message</code>"
msgstr ""
#. type: Source code
#: ../E/message.txt:3
#, no-wrap
msgid "<c/>message ( text, type );<n/>"
msgstr ""
#. type: Plain text
#: ../E/message.txt:5
#, no-wrap
msgid "Prints a message on top of the screen. After a few seconds, the message disappears automatically. "
msgstr ""
#. type: \t; header
#: ../E/message.txt:7
#, no-wrap
msgid "text: <code><a cbot|string>string</a></code>"
msgstr ""
#. type: Plain text
#: ../E/message.txt:8
#, no-wrap
msgid ""
"Text that is to be displayed. It is possible to append several texts and/or values with the operator <code>+</code>:\n"
"<c/>message(\"Not found\");<n/> \n"
"<c/>message(angle);<n/> \n"
"<c/>message(n + \" object(s) found\");<n/> \n"
"<c/>message(\"Distance = \" + dist + \" meters\");<n/> "
msgstr ""
#. type: \t; header
#: ../E/message.txt:14
#, no-wrap
msgid "type: <code><a cbot|int>int</a></code> (default value <code>DisplayMessage</code>)"
msgstr ""
#. type: Bullet: 'o'
#: ../E/message.txt:16
#, no-wrap
msgid "<code>DisplayMessage</code> Standard message on yellow background."
msgstr ""
#. type: Bullet: 'o'
#: ../E/message.txt:17
#, no-wrap
msgid "<code>DisplayInfo </code> Information on green background."
msgstr ""
#. type: Bullet: 'o'
#: ../E/message.txt:18
#, no-wrap
msgid "<code>DisplayWarning</code> Warning on blue background."
msgstr ""
#. type: Bullet: 'o'
#: ../E/message.txt:19
#, no-wrap
msgid "<code>DisplayError </code> Error on red background."
msgstr ""
#. type: \b; header
#: ../E/motor.txt:1
#, no-wrap
msgid "Instruction <code>motor</code>"
msgstr ""
#. type: Plain text
#: ../E/motor.txt:2
#, no-wrap
msgid "The instruction <c/>motor( , );<n/> sets the speed for the left-hand and the right-hand motor of the bot."
msgstr ""
#. type: Plain text
#: ../E/motor.txt:5
#, no-wrap
msgid "The speed given to the motors will remain constant during the execution of the following instructions. Thanks to this characteristic it is possible to perform a rotation during the instruction <c/><a cbot|fire>fire</a>();<n/>. This will sweep a whole zone with only one burst. Here is an example that will sweep the zone in front of the bot:"
msgstr ""
#. type: Source code
#: ../E/motor.txt:7
#, no-wrap
msgid ""
"\t<a cbot|turn>turn</a>(45); // turns 45 degrees left\n"
"\tmotor(0.5, -0.5); // slow rotation to the right\n"
"\t<a cbot|fire>fire</a>(2); // fire\n"
"\tmotor(0,0); // stops the rotation"
msgstr ""
#. type: Plain text
#: ../E/motor.txt:12
#, no-wrap
msgid "With the left-hand motor turning half-speed forward and the right-hand motor turning half-speed backward, the bot will turn slowly on itself during the 2-second-burst."
msgstr ""
#. type: Source code
#: ../E/motor.txt:16
#, no-wrap
msgid "<c/>motor ( left, right );<n/>"
msgstr ""
#. type: Plain text
#: ../E/motor.txt:18
#, no-wrap
msgid "Gives speed instructions to the right and left motors of the robot. The motors will keep this speed until a new motor instruction is performed, or until a <code><a cbot|move>move</a></code>, <code><a cbot|turn>turn</a></code> or <code><a cbot|goto>goto</a></code> instruction is performed."
msgstr ""
#. type: \t; header
#: ../E/motor.txt:20
#, no-wrap
msgid "left: <code><a cbot|float>float</a></code>"
msgstr ""
#. type: Plain text
#: ../E/motor.txt:21
#, no-wrap
msgid "Speed instruction for the left motor; the value must range between -1 and 1. "
msgstr ""
#. type: \t; header
#: ../E/motor.txt:23
#, no-wrap
msgid "right: <code><a cbot|float>float</a></code>"
msgstr ""
#. type: Plain text
#: ../E/motor.txt:24
#, no-wrap
msgid "Speed instruction for the right motor; the value must range between -1 and 1. "
msgstr ""
#. type: Plain text
#: ../E/motor.txt:26
#, no-wrap
msgid ""
"Examples :\n"
"<c/>motor(1, 1);<n/> moves forward with highest possible speed.\n"
"<c/>motor(-0.5, -0.5);<n/> moves backward with half speed.\n"
"<c/>motor(1, -1);<n/> turns right as fast as possible. "
msgstr ""
#. type: Plain text
#: ../E/motor.txt:31
#, no-wrap
msgid ""
"Note :\n"
"<c/>motor(2, 2);<n/> will not move forward any faster than <code>motor(1, 1)</code> \n"
"<c/>motor(-2, -2);<n/> will not move backward any faster than <code>motor(-1, -1)</code>"
msgstr ""
#. type: \b; header
#: ../E/move.txt:1
#, no-wrap
msgid "Instruction <code>move</code>"
msgstr ""
#. type: Plain text
#: ../E/move.txt:2
#, no-wrap
msgid "The instruction <c/>move();<n/> instructs the bot to move forward or backward while keeping the same orientation. In brackets you must specify the length of the move in meters."
msgstr ""
#. type: Plain text
#: ../E/move.txt:5
#, no-wrap
msgid "If you want the bot to move forward 30 meters, write <c/>move(30);<n/>. In order to move the bot backward after it dropped a chunk of <a object|titanore>titanium ore</a> on the <a object|convert>converter</a>, write <c/>move(-2.5);<n/>."
msgstr ""
#. type: Source code
#: ../E/move.txt:9
#, no-wrap
msgid "<c/>move ( length );<n/>"
msgstr ""
#. type: Plain text
#: ../E/move.txt:11
#, no-wrap
msgid "Moves forward or backward of a given distance, always keeping the current orientation of the bot. "
msgstr ""
#. type: \t; header
#: ../E/move.txt:13
#, no-wrap
msgid "length: <code><a cbot|float>float</a></code>"
msgstr ""
#. type: Plain text
#: ../E/move.txt:14
#, no-wrap
msgid "Length of the move, in meters. A negative value makes the bot move backward. "
msgstr ""
#. type: Plain text
#: ../E/move.txt:17
#, no-wrap
msgid ""
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <code>move()</code>.\n"
"<code>== 0 </code>Move executed\n"
"<code>!= 0 </code>error, the instruction was not performed correctly"
msgstr ""
#. type: \b; header
#: ../E/nan.txt:1
#, no-wrap
msgid "Type <code>nan</code>"
msgstr ""
#. type: Plain text
#: ../E/nan.txt:2
#, no-wrap
msgid ""
"This special value indicates that a <a cbot|var>variable</a> of type <code><a cbot|int>int</a></code> or <code><a cbot|float>float</a></code> contains no number, but \"nothing\". \n"
"For example, if the instruction <code><a cbot|receive>receive</a></code> can not get the requested information, it returns <code>nan</code> :"
msgstr ""
#. type: Source code
#: ../E/nan.txt:5
#, no-wrap
msgid ""
"\tvalue = receive(\"Length\");\n"
"\tif ( value == nan ) // not found ?\n"
"\t{\n"
"\t\t\n"
"\t}"
msgstr ""
#. type: \t; header
#: ../E/nan.txt:11
#, no-wrap
msgid "Dictionnary"
msgstr ""
#. type: Plain text
#: ../E/nan.txt:12
#, no-wrap
msgid "<code>nan</code> = Not A Number "
msgstr ""
#. type: \b; header
#: ../E/new.txt:1
#, no-wrap
msgid "Instruction <code>new</code> (for specialists)"
msgstr ""
#. type: Plain text
#: ../E/new.txt:2
#, no-wrap
msgid ""
"The <code>new</code> operator creates a <a cbot|class>class</a> instance:\n"
"<c/><s/>\tMyClass item; // now item is a null reference"
msgstr ""
#. type: Source code
#: ../E/new.txt:4
#, no-wrap
msgid ""
"\titem = new MyClass(); // now item is a reference\n"
"\t // to a new class instance"
msgstr ""
#. type: Plain text
#: ../E/new.txt:7
#, no-wrap
msgid "If you want to create a new instance at declaration time you can ommit the new <code>new</code> operator by putting () after the declaration:"
msgstr ""
#. type: Plain text
#: ../E/new.txt:9
#, no-wrap
msgid ""
"Instead of:\n"
"<c/><s/>\tMyClass item = new MyClass();\n"
"<n/>you can write:\n"
"<c/><s/>\tMyClass item();"
msgstr ""
#. type: Plain text
#: ../E/new.txt:14
#, no-wrap
msgid ""
"If your class has a constructor with parameters you can write:\n"
"<c/><s/>\tMyClass item = new MyClass(2, 3);\n"
"<n/>or:\n"
"<c/><s/>\tMyClass item(2, 3);"
msgstr ""
#. type: Plain text
#: ../E/new.txt:21
#, no-wrap
msgid ""
"<code><a cbot|class>class</a></code>, <code><a cbot|pointer>reference</a></code>\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/null.txt:1
#, no-wrap
msgid "Type <code>null</code>"
msgstr ""
#. type: Plain text
#: ../E/null.txt:2
#, no-wrap
msgid "This special value indicates that the variable containing it does not reference an instance."
msgstr ""
#. type: Plain text
#: ../E/null.txt:5
#, no-wrap
msgid ""
"<a cbot|pointer>References</a>\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/object.txt:1
#, no-wrap
msgid "Type <code>object</code>"
msgstr ""
#. type: Source code
#: ../E/object.txt:22
#, no-wrap
msgid "<code>category</code>"
msgstr ""
#. type: Source code
#: ../E/object.txt:25
#, no-wrap
msgid "<code>position</code>"
msgstr ""
#. type: Plain text
#: ../E/object.txt:26
#, no-wrap
msgid "Position of the object on the planet, in meters. The coordinates <code>x</code> and <code>y</code> correspond to the location on a map, the <code>z</code> coordinate corresponds to the altitude above (respectively below) sea level. "
msgstr ""
#. type: Source code
#: ../E/object.txt:28
#, no-wrap
msgid "<code>orientation</code>"
msgstr ""
#. type: Plain text
#: ../E/object.txt:29
#, no-wrap
msgid "Orientation of the object, in degrees. The orientation tells you what direction the object is facing. An orientation of <code>0</code> corresponds to an object facing eastwards, thus following the positive <code>x</code> axis. The orientation is measured counterclockwise. "
msgstr ""
#. type: Source code
#: ../E/object.txt:31
#, no-wrap
msgid "<code>pitch</code>"
msgstr ""
#. type: Plain text
#: ../E/object.txt:32
#, no-wrap
msgid "Forward/backward angle of the robot. A pitch of <code>0</code> means that the bot is standing on flat ground. A positive inclination means that it is facing upwards, a negative inclination means that it is facing downwards. "
msgstr ""
#. type: Source code
#: ../E/object.txt:34
#, no-wrap
msgid "<code>roll</code>"
msgstr ""
#. type: Plain text
#: ../E/object.txt:35
#, no-wrap
msgid "Left/right angle of the bot, in degrees. A positive value means that the bot is leaning to the left side, a negative value means that it is leaning to the right side. "
msgstr ""
#. type: Source code
#: ../E/object.txt:37
#, no-wrap
msgid "<code>energyLevel</code>"
msgstr ""
#. type: Plain text
#: ../E/object.txt:38
#, no-wrap
msgid "Energy level, between 0 and 1. A normal <a object|power>power cell</a> that is fully charged returns the value <code>1</code>. A <a object|atomic>nuclear power cell</a> never returns a value higher than 1, it just lasts longer. Attention: The energy level of a bot is always zero, because the energy is not contained in the bot, but in the power cell. To know the energy level of the power cell of a bot, you must write <code>energyCell.energyLevel</code>. "
msgstr ""
#. type: Source code
#: ../E/object.txt:40
#, no-wrap
msgid "<code>shieldLevel</code>"
msgstr ""
#. type: Plain text
#: ../E/object.txt:41
#, no-wrap
msgid ""
"Shield level of a robot or building. A level <code>1</code> indicates that the shield is still perfect. Every time that the bot or building gets a bullet or collides with another object, the shield level decreases. When the level reaches <code>0</code>, the next bullet or collision will destroy the bot or building. \n"
"Bots can re-energize their shield on a <a object|repair>repair center</a>. The shield of a building is repaired if it lays inside the protection sphere of a <a object|botshld>shielder</a>."
msgstr ""
#. type: Source code
#: ../E/object.txt:44
#, no-wrap
msgid "<code>temperature</code>"
msgstr ""
#. type: Plain text
#: ../E/object.txt:45
#, no-wrap
msgid "Temperature of the jet of <a object|botgj>winged bots</a>. <code>0</code> corresponds to a cold jet. When used, the temperature increases progressively. When it reaches the value <code>1</code>, the jet is overheated and stops working, until it cooled down a little. "
msgstr ""
#. type: Source code
#: ../E/object.txt:47
#, no-wrap
msgid "<code>altitude</code>"
msgstr ""
#. type: Plain text
#: ../E/object.txt:48
#, no-wrap
msgid "The <code>z</code> coordinate of the position indicates the altitude above sea level, whereas the <code>altitude</code> indicates the height above ground. This value is meaningful only for <a object|botgj>winged bots</a> and for <a object|wasp>wasps</a>. For all other objects, this value is zero. "
msgstr ""
#. type: Source code
#: ../E/object.txt:50
#, no-wrap
msgid "<code>lifeTime</code>"
msgstr ""
#. type: Plain text
#: ../E/object.txt:51
#, no-wrap
msgid "The age of the object in seconds since it's creation."
msgstr ""
#. type: Source code
#: ../E/object.txt:53
#, no-wrap
msgid "<code>energyCell</code>"
msgstr ""
#. type: Plain text
#: ../E/object.txt:54
#, no-wrap
msgid ""
"This information is special, because it returns the information about another object, in this case the power pack. This means that energyCell contains all the characteristics of a normal object, for example <code>category</code> (PowerCell or NuclearCell), <code>position</code> (the position of the cell), etc.\n"
"If you want to know the energy level of a robot, you must not check <code>energyLevel</code>, but <code>energyCell.energyLevel</code>.\n"
"If the bot has bot no power cell, <code>energyCell</code> returns <code>null</code>."
msgstr ""
#. type: Source code
#: ../E/object.txt:58
#, no-wrap
msgid "<code>load</code>"
msgstr ""
#. type: Plain text
#: ../E/object.txt:59
#, no-wrap
msgid "This information also returns the description of a whole object: the description of the object carried by a <a object|botgr>grabber</a>. If it carries nothing, <code>load</code> returns <code>null</code>."
msgstr ""
#. type: \t; header, \b; header
#: ../E/expr.txt:100 ../E/expr.txt:124 ../E/expr.txt:146 ../E/expr.txt:171 ../E/expr.txt:188 ../E/factory.txt:21 ../E/object.txt:70
#, no-wrap
msgid "Examples"
msgstr ""
#. type: Plain text
#: ../E/object.txt:71
#, no-wrap
msgid "The type <code>object</code> returns the special value <code><a cbot|null>null</a></code> when the object does not exist. For example:"
msgstr ""
#. type: Source code
#: ../E/object.txt:73
#, no-wrap
msgid ""
"\tobject a;\n"
"\ta = radar(BotGrabberRoller);\n"
"\tif ( a == null ) // object does not exist ?\n"
"\t{\n"
"\t}\n"
"\tif ( a.position.z > 50 ) // is it on a mountain ?\n"
"\t{\n"
"\t}"
msgstr ""
#. type: \b; header
#: ../E/open.txt:1
#, no-wrap
msgid "Instruction <code>open</code>"
msgstr ""
#. type: Plain text
#: ../E/open.txt:2
#, no-wrap
msgid "Open a text file in the files/ folder. This is a method of the <code><a cbot|file>file</a></code> class. This is the reason why we always write <code>handle.open()</code>:"
msgstr ""
#. type: Source code
#: ../E/open.txt:4
#, no-wrap
msgid "\thandle.open(\"test.txt\", \"w\");"
msgstr ""
#. type: Plain text
#: ../E/open.txt:6
#, no-wrap
msgid "To open a file, proceed as follows:"
msgstr ""
#. type: Source code
#: ../E/open.txt:8
#, no-wrap
msgid ""
"\tfile handle();\n"
"\thandle.open(\"filename\", \"w\");\n"
"\thandle.writeln(\"abc\");\n"
"\thandle.close();"
msgstr ""
#. type: Plain text
#: ../E/open.txt:17
#, no-wrap
msgid "Files can only be created and opened in the files/ folder which is located in the folder inside Colobot save directory. You cannot not create or open files that are located elsewhere than in the files/ folder."
msgstr ""
#. type: Plain text
#: ../E/open.txt:20
#, no-wrap
msgid ""
"<code><a cbot|file>file</a></code>, <code><a cbot|close>close</a></code>, <code><a cbot|readln>readln</a></code>, <code><a cbot|writeln>writeln</a></code> and <code><a cbot|eof>eof</a></code>.\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/openfile.txt:1
#, no-wrap
msgid "Instruction <code>openfile</code>"
msgstr ""
#. type: Source code
#: ../E/openfile.txt:4
#, no-wrap
msgid "file handle = openfile(\"filename\", \"r\");"
msgstr ""
#. type: \b; header
#: ../E/point.txt:1
#, no-wrap
msgid "Type <code>point</code>"
msgstr ""
#. type: Plain text
#: ../E/point.txt:2
#, no-wrap
msgid ""
"Variables of this type contain the coordinates of a point in space. This type is made of three values that represent the <code>x</code>, <code>y</code> and <code>z</code> coordinates.\n"
"<code>x</code> and <code>y</code> correspond to the place on the ground. The positive <code>x</code> axis faces towards east, the positive <code>y</code> axis faces towards north. \n"
"The <code>z</code> value corresponds to the altitude above sea level. "
msgstr ""
#. type: Plain text
#: ../E/point.txt:6
#, no-wrap
msgid "If you want to declare a variable of type point, you can write: "
msgstr ""
#. type: Source code
#: ../E/point.txt:8
#, no-wrap
msgid "\tpoint a (10, 20, 30);"
msgstr ""
#. type: Plain text
#: ../E/point.txt:10
#, no-wrap
msgid "You can also set the variable taking one value after another:"
msgstr ""
#. type: Source code
#: ../E/point.txt:12
#, no-wrap
msgid ""
"\tpoint b;\n"
"\tb.x = 10;\n"
"\tb.y = 20;\n"
"\tb.z = 30;"
msgstr ""
#. type: Plain text
#: ../E/point.txt:17
#, no-wrap
msgid "With these examples, the following <a cbot|cond>condition</a> is true:"
msgstr ""
#. type: Source code
#: ../E/point.txt:19
#, no-wrap
msgid ""
"\tif ( a == b )\n"
"\t{\n"
"\t}"
msgstr ""
#. type: Plain text
#: ../E/point.txt:22
#, no-wrap
msgid ""
"<n/> \n"
"The following declaration :"
msgstr ""
#. type: Source code
#: ../E/point.txt:25
#, no-wrap
msgid "\tpoint c (4, 7);"
msgstr ""
#. type: Plain text
#: ../E/point.txt:27
#, no-wrap
msgid "Is equivalent to :"
msgstr ""
#. type: Source code
#: ../E/point.txt:29
#, no-wrap
msgid ""
"\tpoint c;\n"
"\tc.x = 4;\n"
"\tc.y = 7;\n"
"\tc.z = 0;"
msgstr ""
#. type: \b; header
#: ../E/pointer.txt:1
#, no-wrap
msgid "References (for specialists)"
msgstr ""
#. type: Plain text
#: ../E/pointer.txt:2
#, no-wrap
msgid "CBOT uses references for <a cbot|class>classes</a> and <a cbot|array>arrays</a>. Any class variable actually contains a reference to the instance. The instance actually contains the class fields. Several references can reference the same instance. A <code><a cbot|null>null</a></code> reference references nothing. You can compare an instance to a suitcase and a reference to a carrier. Each time we need a new suitcase we create a new instance with a carrier. But a suitcase can be carried by more than one carrier. A carrier who carries no suitcase is a <code><a cbot|null>null</a></code> reference."
msgstr ""
#. type: Plain text
#: ../E/pointer.txt:4
#, no-wrap
msgid ""
"Example:\n"
"<c/><s/>{"
msgstr ""
#. type: Source code
#: ../E/pointer.txt:6
#, no-wrap
msgid ""
"\tMyClass item1(); // create a new instance\n"
"\t // referenced by item1\n"
"\tMyClass item2; // create a null reference\n"
"\titem2 = item1; // copy the reference,\n"
"\t // item2 and item1 now reference\n"
"\t // the same instance\n"
"\titem1.a = 12; // modifies the instance\n"
"\t // referenced by item1 (and item2)\n"
"\tmessage(item2.a);// displays 12\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/pointer.txt:17
#, no-wrap
msgid "If you pass a <a cbot|class>class</a> instance as parameter to a function, the function only receives a reference to the instance. That means if you modify the instance in the function, the instance that has been specified by the caller will be actuallay modified."
msgstr ""
#. type: Plain text
#: ../E/pointer.txt:19
#, no-wrap
msgid "<c/><s/>void Test( MyClass item )"
msgstr ""
#. type: Source code
#: ../E/pointer.txt:20
#, no-wrap
msgid ""
"{\n"
"\titem.a = 12; // modify the original instance\n"
"\titem = new MyClass(); // new local instance\n"
"\titem.a = 33; // modifie the local instance\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/pointer.txt:26
#, no-wrap
msgid ""
"Calling the fucntion <code>Test()</code>:\n"
"<c/><s/>{"
msgstr ""
#. type: Source code
#: ../E/pointer.txt:28
#, no-wrap
msgid ""
"\tMyClass toto();\n"
"\tTest(toto);\n"
"\tmessage(toto.a); // displays 12\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/pointer.txt:33
#, no-wrap
msgid "The instance containing the field <code>a = 33</code> is referenced only by the newly created instance <code>item</code> inside the fucntion <code>Test</code>. At the end of <code>Test</code> this newly created instance referenced by <code>item</code> is automatically deleted."
msgstr ""
#. type: Plain text
#: ../E/pointer.txt:35
#, no-wrap
msgid ""
"A function can return an instance:\n"
"<c/><s/>MyClass Test2( )"
msgstr ""
#. type: Plain text
#: ../E/pointer.txt:43
#, no-wrap
msgid ""
"Call the function like this:\n"
"<c/><s/>{"
msgstr ""
#. type: Source code
#: ../E/pointer.txt:45
#, no-wrap
msgid ""
"\tMyClass toto;\n"
"\ttoto = Test2(); // toto will contain a reference to\n"
"\t // the instance created by Test2()\n"
"\tmessage(toto.a); // displays 33\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/pointer.txt:52
#, no-wrap
msgid ""
"<code><a cbot|class>class</a></code>, <code><a cbot|new>new</a></code>\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/private.txt:1
#, no-wrap
msgid "Instruction <code>private</code> (for specialists)"
msgstr ""
#. type: Source code
#: ../E/private.txt:6
#, no-wrap
msgid ""
"public class MyClass\n"
"{\n"
"\tint b; // public by default\n"
"\tpublic int a; // also public \n"
"\tprivate point position; // private\n"
"}\n"
"void Test()\n"
"{\n"
"\tMyClass item;\n"
"\titem.a = item.b = 12; // ok\n"
"\tmessage( item.position ); // this is an error\n"
"}"
msgstr ""
#. type: \b; header
#: ../E/public.txt:1
#, no-wrap
msgid "Instruction <code>public</code> (for specialists)"
msgstr ""
#. type: Plain text
#: ../E/public.txt:2
#, no-wrap
msgid "This instruction has two distinct purposes:"
msgstr ""
#. type: Bullet: '1)'
#: ../E/public.txt:4
#, no-wrap
msgid "Make a function available to other bots."
msgstr ""
#. type: Bullet: '2)'
#: ../E/public.txt:5
#, no-wrap
msgid "Make a class member accessible from outside the class definition."
msgstr ""
#. type: \b; header
#: ../E/public.txt:7
#, no-wrap
msgid "Instruction <code>public</code> for functions"
msgstr ""
#. type: Plain text
#: ../E/public.txt:8
#, no-wrap
msgid "If you put <code>public</code> before a <a cbot|function>function</a> definition, you can make the function available to programs in other bots in the same mission."
msgstr ""
#. type: Plain text
#: ../E/public.txt:10
#, no-wrap
msgid "For example in the first bot we would have:"
msgstr ""
#. type: Source code
#: ../E/public.txt:12
#, no-wrap
msgid ""
"public void object::Segment(float dist, float angle)\n"
"{\n"
"\tmove(dist);\n"
"\tturn(angle);\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/public.txt:18
#, no-wrap
msgid "And in another bot we would have:"
msgstr ""
#. type: Source code
#: ../E/public.txt:20
#, no-wrap
msgid ""
"extern void object::Square( )\n"
"{\n"
"\tfor ( int i=0 ; i<4 ; i++ )\n"
"\t{\n"
"\t\tSegment(10, 90);\n"
"\t\tfire(1);\n"
"\t}\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/public.txt:29
#, no-wrap
msgid "If you have declared a function <code>public</code>, you cannot define a function with the same name and arguments in another bot of the same mission."
msgstr ""
#. type: Plain text
#: ../E/public.txt:31
#, no-wrap
msgid "If a bot containing a <code>public</code> function is destroyed, the other bots that make use of this function will be stopped with an error."
msgstr ""
#. type: \b; header
#: ../E/public.txt:33
#, no-wrap
msgid "Instruction <code>public</code> for classes"
msgstr ""
#. type: Source code
#: ../E/public.txt:36
#, no-wrap
msgid ""
"public class MyClass\n"
"{\n"
"\tint b; // public by default\n"
"\tpublic int a; // also public \n"
"\tprivate point position; // privat\n"
"}\n"
"void Test()\n"
"{\n"
"\tMyClass item;\n"
"\titem.a = item.b = 12; // ok\n"
"\tmessage( item.position ); // this is an error\n"
"}"
msgstr ""
#. type: \b; header
#: ../E/radar.txt:1
#, no-wrap
msgid "Instruction <code>radar</code>"
msgstr ""
#. type: Plain text
#: ../E/radar.txt:5
#, no-wrap
msgid "Write in brackets the <a cbot|category>name of the object</a> that you look for. Put the result in a variable of the <a cbot|type>type</a> <code>object</code>. Here is an example that looks for the closest ant:"
msgstr ""
#. type: Source code
#: ../E/radar.txt:7
#, no-wrap
msgid ""
"// At the beginning of the program:\n"
"object item; // variable declaration\n"
"\n"
"// Look for the closest ant\n"
"item = radar(AlienAnt);"
msgstr ""
#. type: Plain text
#: ../E/radar.txt:17
#, no-wrap
msgid "Detects an object according to several parameters. "
msgstr ""
#. type: Image filename
#: ../E/radar.txt:19
#, no-wrap
msgid "radar1"
msgstr ""
#. type: Plain text
#: ../E/radar.txt:20
#, no-wrap
msgid "Seen from above, the purple zone corresponds to the zone where objects will be detected. "
msgstr ""
#. type: \t; header
#: ../E/produce.txt:15 ../E/search.txt:7
#, no-wrap
msgid "category: <code><a cbot|int>int</a></code>"
msgstr ""
#. type: Plain text
#: ../E/radar.txt:34
#, no-wrap
msgid ""
"Direction that the radar is facing, in degrees. \n"
"<code> 0</code> -> radar is facing straight ahead\n"
"<code>-90</code> -> radar is facing a quarter turn right\n"
"<code> 90</code> -> radar is facing a quarter turn left"
msgstr ""
#. type: Plain text
#: ../E/radar.txt:40
#, no-wrap
msgid "Opening angle of the radar, in degrees. "
msgstr ""
#. type: Plain text
#: ../E/radar.txt:43
#, no-wrap
msgid "Minimum detection distance, in meters. Objects that are closer than the minimum distance will not be detected. "
msgstr ""
#. type: Plain text
#: ../E/radar.txt:46
#, no-wrap
msgid "Maximum detection distance, in meters. Objects that are farther away than the maximum distance will not be detected. "
msgstr ""
#. type: Plain text
#: ../E/radar.txt:49
#, no-wrap
msgid "Determines which way the objects are detected. With value <code>1</code>, returns the closest object found in the specified zone. With value <code>-1</code>, the farthest object in the zone will be returned. "
msgstr ""
#. type: \t; header
#: ../E/radar.txt:65 ../E/retobj.txt:10 ../E/search.txt:22
#, no-wrap
msgid "Return value: <code><a cbot|object>object</a></code>"
msgstr ""
#. type: Plain text
#: ../E/radar.txt:66
#, no-wrap
msgid "Returns the first object found that corresponds to the specified category in the specified zone. If no object was found, returns the value <code><a cbot|null>null</a></code>."
msgstr ""
#. type: \t; header
#: ../E/expr.txt:132 ../E/radar.txt:68
#, no-wrap
msgid "Remark"
msgstr ""
#. type: Plain text
#: ../E/radar.txt:69
#, no-wrap
msgid "You do not have to give all the parameters. Here are two examples of instructions that are equivalent: "
msgstr ""
#. type: Source code
#: ../E/radar.txt:71
#, no-wrap
msgid ""
"\tradar(Titanium, 0, 360, 0, 1000);\n"
"\tradar(Titanium); // equivalent"
msgstr ""
#. type: Source code
#: ../E/radar.txt:74
#, no-wrap
msgid ""
"\tradar(Titanium, 0, 90, 0, 1000);\n"
"\tradar(Titanium, 0, 90); // equivalent"
msgstr ""
#. type: Plain text
#: ../E/radar.txt:77
#, no-wrap
msgid ""
"When one or more parameters are not specified, the default values indicated above are used instead; only the first parameter is compulsory.\n"
"Generally, only the first parameter is specified: f. ex. <code>radar (AlienAnt)</code> detects the closest ant, wherever it may be. "
msgstr ""
#. type: \b; header
#: ../E/readln.txt:1
#, no-wrap
msgid "Instruction <code>readln</code>"
msgstr ""
#. type: Plain text
#: ../E/readln.txt:2
#, no-wrap
msgid "Read one line from an open file in the files/ folder. This is a method of the <code><a cbot|file>file</a></code> class. This is the reason why we always write <code>handle.readln()</code>:"
msgstr ""
#. type: Source code
#: ../E/readln.txt:4
#, no-wrap
msgid "\ts = handle.readln();"
msgstr ""
#. type: Plain text
#: ../E/readln.txt:6
#, no-wrap
msgid "The file must have been opened for reading (<code>\"r\"</code>) with the <code><a cbot|open>open</a></code> instruction. <code>readln</code> returns the string containing the whole line but without the end of line characters 0x0D (CR) and 0x0A (LF)."
msgstr ""
#. type: Source code
#: ../E/readln.txt:9
#, no-wrap
msgid "<c/>string = handle.readln ( );<n/>"
msgstr ""
#. type: Source code
#: ../E/readln.txt:13
#, no-wrap
msgid ""
"\tstring s;\n"
"\ts = handle.readln();\n"
"\tif ( s == \"abc\" )\n"
"\t..."
msgstr ""
#. type: Plain text
#: ../E/readln.txt:19
#, no-wrap
msgid ""
"<code><a cbot|file>file</a></code>, <code><a cbot|open>open</a></code>, <code><a cbot|close>close</a></code>, <code><a cbot|writeln>writeln</a></code> and <code><a cbot|eof>eof</a></code>.\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/receive.txt:1
#, no-wrap
msgid "Instruction <code>receive</code>"
msgstr ""
#. type: Source code
#: ../E/receive.txt:3
#, no-wrap
msgid "<c/>receive ( name, power );<n/>"
msgstr ""
#. type: Plain text
#: ../E/receive.txt:5
#, no-wrap
msgid "Retrieves an information from the closest <a object|exchange>information exchange post</a>."
msgstr ""
#. type: Plain text
#: ../E/receive.txt:8
#, no-wrap
msgid "Name of the information required from the exchange post. This name is a string: it must be written in quotation marks \"\"."
msgstr ""
#. type: Plain text
#: ../E/receive.txt:11
#, no-wrap
msgid "Power of the receiver, which corresponds to maximal distance between the receiver and the exchange post. If the distance is longer, no information is received. Default value is 10 metres."
msgstr ""
#. type: Plain text
#: ../E/receive.txt:14
#, no-wrap
msgid "Value of the retrieved information. If no exchange post is close enough, or if the name of the requested information does not exist in the exchange post, the value <code>nan</code> is returned."
msgstr ""
#. type: Plain text
#: ../E/receive.txt:17
#, no-wrap
msgid ""
"<code><a cbot|send>send</a></code>, <code><a cbot|testinfo>testinfo</a></code> and <code><a cbot|delinfo>deleteinfo</a></code>.\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/recycle.txt:1
#, no-wrap
msgid "Instruction <code>recycle</code>"
msgstr ""
#. type: Source code
#: ../E/recycle.txt:3
#, no-wrap
msgid "<c/>recycle ( );<n/>"
msgstr ""
#. type: Plain text
#: ../E/recycle.txt:5
#, no-wrap
msgid "Recycles the derelict bot in front of the <a object|botrecy>recycler</a> into a <a object|titan>titanium cube</a>."
msgstr ""
#. type: Plain text
#: ../E/recycle.txt:8
#, no-wrap
msgid ""
"Zero if OK, or a value different from zero if an error occurred.\n"
"<code>== 0 </code>the derelict bot has been recycled\n"
"<code>!= 0 </code>error, no derelict bot could be recycled"
msgstr ""
#. type: \b; header
#: ../E/retobj.txt:1
#, no-wrap
msgid "Instruction <code>retobject</code>"
msgstr ""
#. type: Source code
#: ../E/retobj.txt:3
#, no-wrap
msgid "<c/>retobject ( number );<n/>"
msgstr ""
#. type: Plain text
#: ../E/retobj.txt:5
#, no-wrap
msgid "Returns the object corresponding to the given number."
msgstr ""
#. type: \t; header
#: ../E/retobj.txt:7
#, no-wrap
msgid "number: <code><a cbot|int>int</a></code>"
msgstr ""
#. type: Plain text
#: ../E/retobj.txt:8
#, no-wrap
msgid "Number of the object, between 0 and n. \"n\" represents the total number of objects in the scene. "
msgstr ""
#. type: Plain text
#: ../E/retobj.txt:11
#, no-wrap
msgid "Object corresponding to the number. The return value <code><a cbot|null>null</a></code> means that no object corresponds to this number, because the number was too high, and there are not so many objects in the scene. "
msgstr ""
#. type: \b; header
#: ../E/return.txt:1
#, no-wrap
msgid "Instruction <code>return</code>"
msgstr ""
#. type: Plain text
#: ../E/return.txt:2
#, no-wrap
msgid "Returns from a function. Syntax:"
msgstr ""
#. type: Source code
#: ../E/return.txt:4
#, no-wrap
msgid ""
"void function ( )\n"
"{\n"
"\treturn;\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/return.txt:10
#, no-wrap
msgid "If the <a cbot|function>function</a> has a return type, the <code>return</code> instruction must be followed by the value to be returned:"
msgstr ""
#. type: Source code
#: ../E/return.txt:12
#, no-wrap
msgid ""
"float Pi ( )\n"
"{\n"
"\treturn 3.1415;\n"
"}"
msgstr ""
#. type: Source code
#: ../E/return.txt:17
#, no-wrap
msgid ""
"float Mean (float a, float b)\n"
"{\n"
"\treturn (a+b)/2;\n"
"}"
msgstr ""
#. type: Source code
#: ../E/return.txt:22
#, no-wrap
msgid ""
"string Sign (float a)\n"
"{\n"
"\tif ( a > 0 ) return \"positive\";\n"
"\tif ( a < 0 ) return \"negative\";\n"
"\treturn \"null\";\n"
"}"
msgstr ""
#. type: \b; header
#: ../E/search.txt:1
#, no-wrap
msgid "Instruction <code>search</code>"
msgstr ""
#. type: Source code
#: ../E/search.txt:3
#, no-wrap
msgid "<c/>search ( category, position );<n/>"
msgstr ""
#. type: \t; header
#: ../E/produce.txt:9 ../E/topo.txt:7
#, no-wrap
msgid "position: <code><a cbot|point>point</a></code>"
msgstr ""
#. type: Plain text
#: ../E/search.txt:20
#, no-wrap
msgid "<code>search</code> returns the object of the given category that is closest to the position indicated here. "
msgstr ""
#. type: Plain text
#: ../E/search.txt:23
#, no-wrap
msgid "Characteristics of the object that has been found. The value <code><a cbot|null>null</a></code> means that no object of this category has been found. "
msgstr ""
#. type: \b; header
#: ../E/send.txt:1
#, no-wrap
msgid "Instruction <code>send</code>"
msgstr ""
#. type: Source code
#: ../E/send.txt:3
#, no-wrap
msgid "<c/>send ( name, value, power );<n/>"
msgstr ""
#. type: Plain text
#: ../E/send.txt:5
#, no-wrap
msgid "Sends an information to the closest <a object|exchange>information exchange post</a>."
msgstr ""
#. type: Plain text
#: ../E/send.txt:8
#, no-wrap
msgid ""
"Name of the information to be sent to the exchange post. This name is a string: it must be written in quotation marks \"\".\n"
"If there is any information having this name, a new entry is created, as far as the total number of entries does not exceed 10. If there is already an information having this name, value is simply replaced by the new."
msgstr ""
#. type: \t; header
#: ../E/send.txt:11
#, no-wrap
msgid "value: <code>float</code>"
msgstr ""
#. type: Plain text
#: ../E/send.txt:12
#, no-wrap
msgid "Value of the information to be sent."
msgstr ""
#. type: Plain text
#: ../E/send.txt:15
#, no-wrap
msgid "Power of the transmitter, which corresponds to the maximal distance to where information can be the sent. Default value is 10 metres."
msgstr ""
#. type: Plain text
#: ../E/send.txt:18
#, no-wrap
msgid ""
"<code><a cbot|receive>receive</a></code>, <code><a cbot|testinfo>testinfo</a></code> and <code><a cbot|delinfo>deleteinfo</a></code>.\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/shield.txt:1
#, no-wrap
msgid "Instruction <code>shield</code>"
msgstr ""
#. type: Source code
#: ../E/shield.txt:3
#, no-wrap
msgid "<c/>shield ( oper, radius );<n/>"
msgstr ""
#. type: Plain text
#: ../E/shield.txt:5
#, no-wrap
msgid "Activates or deactivates the shield of the <a object|botshld>shielder</a>. You can of course move the shielder when the shield is active. It protects all objects that are inside the shielded sphere from enemy fire. The radius of the sphere can range between 10 and 25 meters."
msgstr ""
#. type: \t; header
#: ../E/shield.txt:7
#, no-wrap
msgid "oper: <code><a cbot|float>float</a></code>"
msgstr ""
#. type: Plain text
#: ../E/shield.txt:8
#, no-wrap
msgid ""
"<code>1</code> activates the shield.\n"
"<code>0</code> deactivates the shield\n"
"A normal <a object|power>power cell</a> fully charged can maintain the shield active during 20 seconds. When the cell is empty, the shield deactivates."
msgstr ""
#. type: \t; header
#: ../E/shield.txt:12
#, no-wrap
msgid "radius: <code><a cbot|float>float</a></code>"
msgstr ""
#. type: Plain text
#: ../E/shield.txt:13
#, no-wrap
msgid "Radius of the shield, ranging between 10 and 25 meters."
msgstr ""
#. type: \b; header
#: ../E/sizeof.txt:1
#, no-wrap
msgid "Instruction <code>sizeof</code>"
msgstr ""
#. type: Plain text
#: ../E/sizeof.txt:2
#, no-wrap
msgid ""
"The sizeof function lets you know the number of elements contained in an <a cbot|array>array</a>.\n"
"That is the index of the last element plus one (\"empty\" elements are counted)."
msgstr ""
#. type: Source code
#: ../E/sizeof.txt:5
#, no-wrap
msgid ""
"{\n"
"\tint a[12];\n"
"\ta[5] = 345;\n"
"\tmessage( sizeof(a) ); // will display 6\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/sizeof.txt:11
#, no-wrap
msgid "In this example we have 6 elements in the array after <code>a[5]=345</code>. The non initialized elements <code>[0]</code>, <code>[1]</code>, <code>[2]</code>, <code>[3]</code> and <code>[4]</code> will be counted."
msgstr ""
#. type: Plain text
#: ../E/sizeof.txt:13
#, no-wrap
msgid "With multidimensionnal arrays you can get the size of a sub array:"
msgstr ""
#. type: Source code
#: ../E/sizeof.txt:15
#, no-wrap
msgid ""
"float xy[][]; // 2 dimensionnal array\n"
"xy[5][10] = 67;\n"
"message( sizeof(xy) ); // will display 6\n"
"message( sizeof(xy[5]) ); // will display 11\n"
msgstr ""
#. type: \b; header
#: ../E/sniff.txt:1
#, no-wrap
msgid "Instruction <code>sniff</code>"
msgstr ""
#. type: Source code
#: ../E/sniff.txt:3
#, no-wrap
msgid "<c/>sniff ( );<n/>"
msgstr ""
#. type: Plain text
#: ../E/sniff.txt:5
#, no-wrap
msgid "Sounds the underground in front of the <a object|botsr>sniffer</a>. According to what raw materials were detected, the following objects will be created: "
msgstr ""
#. type: Plain text
#: ../E/sniff.txt:7
#, no-wrap
msgid ""
"<code>TitaniumSpot</code> -> <a object|stonspot>Red cross</a>\n"
"<code>UraniumSpot </code> -> <a object|uranspot>Yellow circle</a>\n"
"<code>PowerSpot </code> -> <a object|enerspot>Green cross</a>"
msgstr ""
#. type: Plain text
#: ../E/sniff.txt:12
#, no-wrap
msgid ""
"Zero if everything is OK, or a value different from zero if an error occurred. \n"
"<code>== 0 </code>sounding performed\n"
"<code>!= 0 </code>sounding impossible"
msgstr ""
#. type: \b; header
#: ../E/space.txt:1
#, no-wrap
msgid "Instruction <code>space</code>"
msgstr ""
#. type: Source code
#: ../E/space.txt:3
#, no-wrap
msgid "<c/>space ( center, rmin, rmax, dist );<n/>"
msgstr ""
#. type: Plain text
#: ../E/space.txt:5
#, no-wrap
msgid "Determines the position of the nearest free space around a given position."
msgstr ""
#. type: \t; header
#: ../E/space.txt:7
#, no-wrap
msgid "center: <code><a cbot|point>point</a></code> (default: bot position)"
msgstr ""
#. type: Plain text
#: ../E/flatspace.txt:8 ../E/space.txt:8
#, no-wrap
msgid "Desired position of the free space."
msgstr ""
#. type: \t; header
#: ../E/flatspace.txt:13 ../E/space.txt:10
#, no-wrap
msgid "rmin: <code><a cbot|float>float</a></code> (default value: <code>8</code>)"
msgstr ""
#. type: Plain text
#: ../E/flatspace.txt:14 ../E/space.txt:11
#, no-wrap
msgid "Minimum distance from the desired position."
msgstr ""
#. type: \t; header
#: ../E/flatspace.txt:16 ../E/space.txt:13
#, no-wrap
msgid "rmax: <code><a cbot|float>float</a></code> (default value: <code>50</code>)"
msgstr ""
#. type: Plain text
#: ../E/flatspace.txt:17 ../E/space.txt:14
#, no-wrap
msgid "Maximum distance from the desired position."
msgstr ""
#. type: \t; header
#: ../E/flatspace.txt:19 ../E/space.txt:16
#, no-wrap
msgid "dist: <code><a cbot|float>float</a></code> (default value: <code>4</code>)"
msgstr ""
#. type: Plain text
#: ../E/flatspace.txt:20 ../E/space.txt:17
#, no-wrap
msgid "Required distance between two free spaces."
msgstr ""
#. type: \t; header
#: ../E/flatspace.txt:22 ../E/space.txt:19
#, no-wrap
msgid "Return: <code><a cbot|point>point</a></code>"
msgstr ""
#. type: Plain text
#: ../E/flatspace.txt:23 ../E/space.txt:20
#, no-wrap
msgid "Position of the free space."
msgstr ""
#. type: \b; header
#: ../E/static.txt:1
#, no-wrap
msgid "Instruction <code>static</code> (for specialists)"
msgstr ""
#. type: Plain text
#: ../E/static.txt:2
#, no-wrap
msgid "<a cbot|class>Class</a> members declared with <code>static</code> are shared between all instances of the class."
msgstr ""
#. type: Source code
#: ../E/static.txt:4
#, no-wrap
msgid ""
"public class MyClass\n"
"{\n"
"\tstatic int nb = 1;\n"
"\tstatic string [ ] list = null;\n"
"}\n"
"void Test ()\n"
"{\n"
"\tMyClasse item1();\n"
"\tMyClasse item2();\n"
"\titem1.nb = 3;\n"
"\titem1.list[item1.nb] = \"Hello\";\n"
"\tmessage( item2.list[item2.nb] ); // display \"Hello\"\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/static.txt:18
#, no-wrap
msgid "<code>Static</code> members can be declared <code><a cbot|private>private</a></code> so they will be only acessible from within class members (including constructors and destructors)."
msgstr ""
#. type: Plain text
#: ../E/static.txt:21
#, no-wrap
msgid ""
"<code><a cbot|class>class</a></code>, <code><a cbot|synchro>synchronized</a></code>\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/strfind.txt:1
#, no-wrap
msgid "Instruction <code>strfind</code>"
msgstr ""
#. type: Plain text
#: ../E/strfind.txt:2
#, no-wrap
msgid "Find a substring in a string and returns the position of the first substring found or <a cbot|nan>nan</a> if the substring has not been found."
msgstr ""
#. type: Source code
#: ../E/strfind.txt:5
#, no-wrap
msgid "<c/>strfind ( string, sub );<n/>"
msgstr ""
#. type: \t; header
#: ../E/strfind.txt:7
#, no-wrap
msgid "string: <code><a cbot|string>string</a></code>"
msgstr ""
#. type: Plain text
#: ../E/strfind.txt:8
#, no-wrap
msgid "String we are searching in."
msgstr ""
#. type: \t; header
#: ../E/strfind.txt:10
#, no-wrap
msgid "sub: <code><a cbot|string>string</a></code>"
msgstr ""
#. type: Plain text
#: ../E/strfind.txt:11
#, no-wrap
msgid "Substring we are searching for."
msgstr ""
#. type: Plain text
#: ../E/array.txt:35 ../E/strfind.txt:13 ../E/strleft.txt:10 ../E/strlen.txt:7 ../E/strlower.txt:7 ../E/strmid.txt:13 ../E/strright.txt:10 ../E/strupper.txt:7 ../E/strval.txt:4 ../E/strval.txt:11 ../E/writeln.txt:11
#, no-wrap
msgid "Examples:"
msgstr ""
#. type: Source code
#: ../E/strfind.txt:14
#, no-wrap
msgid ""
"<c/>\tint pos = strfind(\"abcdef\", \"ab\"); // pos will be 0\n"
"\tint pos = strfind(\"abcdef\", \"de\"); // pos will be 3\n"
"\tint pos = strfind(\"abcdef\", \"xy\"); // pos will be <a cbot|nan>nan</a>"
msgstr ""
#. type: Plain text
#: ../E/strfind.txt:19
#, no-wrap
msgid ""
"<code><a cbot|strlen>strlen</a></code>, <code><a cbot|strleft>strleft</a></code>, <code><a cbot|strright>strright</a></code>, <code><a cbot|strmid>strmid</a></code>, <code><a cbot|strval>strval</a></code>, <code><a cbot|strupper>strupper</a></code>, <code><a cbot|strlower>strlower</a></code>\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/string.txt:1
#, no-wrap
msgid "Type <code>string</code>"
msgstr ""
#. type: Plain text
#: ../E/string.txt:2
#, no-wrap
msgid "Use a variable of this type for storing characters or strings."
msgstr ""
#. type: Plain text
#: ../E/string.txt:4
#, no-wrap
msgid "For example: "
msgstr ""
#. type: Source code
#: ../E/string.txt:5
#, no-wrap
msgid ""
"<c/>\t\"Hello!\"\n"
"\t\"This is a string\"\n"
"\t\"x\"\n"
"\t\"\" // empty string"
msgstr ""
#. type: Plain text
#: ../E/string.txt:10
#, no-wrap
msgid "You can append two strings with the <code>+</code> operator :"
msgstr ""
#. type: Source code
#: ../E/string.txt:11
#, no-wrap
msgid "<c/>\t\"Good morning,\" + \" \" + \"Sir\""
msgstr ""
#. type: Plain text
#: ../E/string.txt:13
#, no-wrap
msgid "Returns the string:"
msgstr ""
#. type: Source code
#: ../E/string.txt:14
#, no-wrap
msgid "<c/>\t\"Good morning, Sir\""
msgstr ""
#. type: Plain text
#: ../E/string.txt:16
#, no-wrap
msgid "If you want to put a quotation mark (\") or a backslash (\\) in a string you must write:"
msgstr ""
#. type: Source code
#: ../E/string.txt:17
#, no-wrap
msgid "<c/>\"This is \\\"very\\\" important\""
msgstr ""
#. type: Plain text
#: ../E/string.txt:18
#, no-wrap
msgid "<n/>which will result in the string <c/> This is \"very\" important."
msgstr ""
#. type: Source code
#: ../E/string.txt:19
#, no-wrap
msgid "<c/>\"%user%\\\\ant.txt\""
msgstr ""
#. type: Plain text
#: ../E/string.txt:20
#, no-wrap
msgid "<n/>will result in <c/>%user%\\ant.txt"
msgstr ""
#. type: Plain text
#: ../E/string.txt:22
#, no-wrap
msgid ""
"Following instructions can be used with strings:\n"
"<code><a cbot|strlen>strlen</a> </code>Get string length\n"
"<code><a cbot|strleft>strleft</a> </code>Extract left part\n"
"<code><a cbot|strright>strright</a> </code>Extract right part\n"
"<code><a cbot|strmid>strmid</a> </code>Extract center part\n"
"<code><a cbot|strfind>strfind</a> </code>Find a substring.\n"
"<code><a cbot|strval>strval</a> </code>Convert string to number\n"
"<code><a cbot|strupper>strupper</a> </code>Convert to upper case\n"
"<code><a cbot|strlower>strlower</a> </code>Convert to lower case"
msgstr ""
#. type: \b; header
#: ../E/strleft.txt:1
#, no-wrap
msgid "Instruction <code>strleft</code>"
msgstr ""
#. type: Plain text
#: ../E/strleft.txt:2
#, no-wrap
msgid "Extracts the first (that is, leftmost) characters from a string."
msgstr ""
#. type: Source code
#: ../E/strleft.txt:5
#, no-wrap
msgid "<c/>strleft ( string, len );<n/>"
msgstr ""
#. type: \t; header
#: ../E/strleft.txt:7 ../E/strmid.txt:10 ../E/strright.txt:7
#, no-wrap
msgid "len: <code><a cbot|int>int</a></code>"
msgstr ""
#. type: Plain text
#: ../E/strleft.txt:8 ../E/strmid.txt:11 ../E/strright.txt:8
#, no-wrap
msgid "Number of characters to be extracted."
msgstr ""
#. type: Source code
#: ../E/strleft.txt:11
#, no-wrap
msgid ""
"<c/>\tstring s = strleft(\"abcdef\", 2); // s is \"ab\"\n"
"\tstring s = strleft(\"abc\", 10); // s is \"abc\""
msgstr ""
#. type: Plain text
#: ../E/strleft.txt:15
#, no-wrap
msgid ""
"<code><a cbot|strlen>strlen</a></code>, <code><a cbot|strright>strright</a></code>, <code><a cbot|strmid>strmid</a></code>, <code><a cbot|strfind>strfind</a></code>, <code><a cbot|strval>strval</a></code>, <code><a cbot|strupper>strupper</a></code>, <code><a cbot|strlower>strlower</a></code>\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/strlen.txt:1
#, no-wrap
msgid "Instruction <code>strlen</code>"
msgstr ""
#. type: Plain text
#: ../E/strlen.txt:2
#, no-wrap
msgid "Get the length of a string."
msgstr ""
#. type: Source code
#: ../E/strlen.txt:5
#, no-wrap
msgid "<c/>strlen ( string );<n/>"
msgstr ""
#. type: Source code
#: ../E/strlen.txt:8
#, no-wrap
msgid ""
"<c/>\tint len = strlen(\"abc\"); // len is 3\n"
"\tint len = strlen(\"\"); // len is 0\n"
"\tif ( strlen(s) == 0 ) // is string empty ?"
msgstr ""
#. type: Plain text
#: ../E/strlen.txt:13
#, no-wrap
msgid ""
"<code><a cbot|strleft>strleft</a></code>, <code><a cbot|strright>strright</a></code>, <code><a cbot|strmid>strmid</a></code>, <code><a cbot|strfind>strfind</a></code>, <code><a cbot|strval>strval</a></code>, <code><a cbot|strupper>strupper</a></code>, <code><a cbot|strlower>strlower</a></code>\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/strlower.txt:1
#, no-wrap
msgid "Instruction <code>strlower</code>"
msgstr ""
#. type: Plain text
#: ../E/strlower.txt:2
#, no-wrap
msgid "Convert all characters in a string to lowercase."
msgstr ""
#. type: Source code
#: ../E/strlower.txt:5
#, no-wrap
msgid "<c/>strlower ( string );<n/>"
msgstr ""
#. type: Source code
#: ../E/strlower.txt:8
#, no-wrap
msgid "<c/>\tstring s = strlower(\"Abc\"); // s is \"abc\""
msgstr ""
#. type: Plain text
#: ../E/strlower.txt:11
#, no-wrap
msgid ""
"<code><a cbot|strlen>strlen</a></code>, <code><a cbot|strleft>strleft</a></code>, <code><a cbot|strright>strright</a></code>, <code><a cbot|strmid>strmid</a></code>, <code><a cbot|strfind>strfind</a></code>, <code><a cbot|strval>strval</a></code>, <code><a cbot|strupper>strupper</a></code>\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/strmid.txt:1
#, no-wrap
msgid "Instruction <code>strmid</code>"
msgstr ""
#. type: Plain text
#: ../E/strmid.txt:2
#, no-wrap
msgid "Extracts a substring of a given length starting at a given position from a string."
msgstr ""
#. type: Source code
#: ../E/strmid.txt:5
#, no-wrap
msgid "<c/>strmid ( string, pos, len );<n/>"
msgstr ""
#. type: \t; header
#: ../E/strmid.txt:7
#, no-wrap
msgid "pos: <code><a cbot|int>int</a></code>"
msgstr ""
#. type: Plain text
#: ../E/strmid.txt:8
#, no-wrap
msgid "The index of the first character that is to be included in the extracted substring."
msgstr ""
#. type: Source code
#: ../E/strmid.txt:14
#, no-wrap
msgid ""
"<c/>\tstring s = strmid(\"abcdef\", 1, 2); // s is \"bc\"\n"
"\tstring s = strmid(\"abcdef\", 4, 5); // s is \"ef\"\n"
"\tstring s = strmid(\"abcdef\", 9, 2); // s is \"\""
msgstr ""
#. type: Plain text
#: ../E/strmid.txt:19
#, no-wrap
msgid ""
"<code><a cbot|strlen>strlen</a></code>, <code><a cbot|strleft>strleft</a></code>, <code><a cbot|strright>strright</a></code>, <code><a cbot|strfind>strfind</a></code>, <code><a cbot|strval>strval</a></code>, <code><a cbot|strupper>strupper</a></code>, <code><a cbot|strlower>strlower</a></code>\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/strright.txt:1
#, no-wrap
msgid "Instruction <code>strright</code>"
msgstr ""
#. type: Plain text
#: ../E/strright.txt:2
#, no-wrap
msgid "Extracts the last (that is, rightmost) characters from a string."
msgstr ""
#. type: Source code
#: ../E/strright.txt:5
#, no-wrap
msgid "<c/>strright ( string, len );<n/>"
msgstr ""
#. type: Source code
#: ../E/strright.txt:11
#, no-wrap
msgid ""
"<c/>\tstring s = strright(\"abcdef\", 2); // s is \"ef\"\n"
"\tstring s = strright(\"abc\", 10); // s is \"abc\""
msgstr ""
#. type: Plain text
#: ../E/strright.txt:15
#, no-wrap
msgid ""
"<code><a cbot|strlen>strlen</a></code>, <code><a cbot|strleft>strleft</a></code>, <code><a cbot|strmid>strmid</a></code>, <code><a cbot|strfind>strfind</a></code>, <code><a cbot|strval>strval</a></code>, <code><a cbot|strupper>strupper</a></code>, <code><a cbot|strlower>strlower</a></code>\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/strupper.txt:1
#, no-wrap
msgid "Instruction <code>strupper</code>"
msgstr ""
#. type: Plain text
#: ../E/strupper.txt:2
#, no-wrap
msgid "Convert all characters in a string to uppercase."
msgstr ""
#. type: Source code
#: ../E/strupper.txt:5
#, no-wrap
msgid "<c/>strupper ( string );<n/>"
msgstr ""
#. type: Source code
#: ../E/strupper.txt:8
#, no-wrap
msgid "<c/>\tstring s = strupper(\"Abc\"); // s is \"ABC\""
msgstr ""
#. type: Plain text
#: ../E/strupper.txt:11
#, no-wrap
msgid ""
"<code><a cbot|strlen>strlen</a></code>, <code><a cbot|strleft>strleft</a></code>, <code><a cbot|strright>strright</a></code>, <code><a cbot|strmid>strmid</a></code>, <code><a cbot|strfind>strfind</a></code>, <code><a cbot|strval>strval</a></code>, <code><a cbot|strlower>strlower</a></code>\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/strval.txt:1
#, no-wrap
msgid "Instruction <code>strval</code>"
msgstr ""
#. type: Plain text
#: ../E/strval.txt:2
#, no-wrap
msgid "Convert a string to a number. Don't confuse the string <code>\"45\"</code> that contains actually the two characters <code>4</code> and <code>5</code> and the number <code>45</code>."
msgstr ""
#. type: Source code
#: ../E/strval.txt:5
#, no-wrap
msgid ""
"<c/>\tstring s = \"45\"+\"12\"; // s contains \"4512\"\n"
"\tfloat n = 45 + 12; // n contains 67"
msgstr ""
#. type: Source code
#: ../E/strval.txt:9
#, no-wrap
msgid "<c/>strval ( string );<n/>"
msgstr ""
#. type: Source code
#: ../E/strval.txt:12
#, no-wrap
msgid ""
"<c/>\tfloat n = strval(\"1.23\"); // n is 1.23\n"
"\tfloat n = strval(\"12abc45\"); // n is 12\n"
"\tfloat n = strval(\"abc\"); // n is 0\n"
"\tfloat n = strval(\"100\")+2; // n is 102"
msgstr ""
#. type: Plain text
#: ../E/strval.txt:18
#, no-wrap
msgid ""
"<code><a cbot|strlen>strlen</a></code>, <code><a cbot|strleft>strleft</a></code>, <code><a cbot|strright>strright</a></code>, <code><a cbot|strmid>strmid</a></code>, <code><a cbot|strfind>strfind</a></code>, <code><a cbot|strupper>strupper</a></code>, <code><a cbot|strlower>strlower</a></code>\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/synchro.txt:1
#, no-wrap
msgid "Instruction <code>synchronized</code> (for specialists)"
msgstr ""
#. type: Plain text
#: ../E/synchro.txt:2
#, no-wrap
msgid "A <a cbot|class>class</a> method can be declared <code>synchronized</code>. This is to make sure that the method is never being executed by more than one bot at the same time."
msgstr ""
#. type: Plain text
#: ../E/synchro.txt:4
#, no-wrap
msgid "The following example illustrates the problem:"
msgstr ""
#. type: Source code
#: ../E/synchro.txt:6
#, no-wrap
msgid ""
"class blocking\n"
"{\n"
"\tstatic int nb = 33;\n"
"\tsynchronized int inc( )\n"
"\t{\n"
"\t\tint val = nb;\n"
"\t\twait ( 2 ); // wait 2 sec.\n"
"\t\tnb = nb + 1;\n"
"\t\treturn val;\n"
"\t}\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/synchro.txt:18
#, no-wrap
msgid ""
"What happens if two bots execute the <code>inc</code> method at the same time?\n"
"Both of them will execute <code>val=nb</code> and wait 2 seconds so both of them will have <code>val=33</code>. With <code>synchronized</code> the first bot starts execution with <code>val=33</code> and then waits 2 seconds and returns. Only once the first bot has returned from the <code>inc</code> method, the second bot will be allowed to enter the <code>inc</code> method and therefore the second bot will always have <code>val=34</code>."
msgstr ""
#. type: Plain text
#: ../E/synchro.txt:21
#, no-wrap
msgid "You can have more than one synchronized method in your <a cbot|class>class</a> in order to prevent simultaneous execution across more than one method. In other words: as long as a bot's program is inside a synchronized method, no other bot can enter any synchronized method of the same class."
msgstr ""
#. type: Plain text
#: ../E/synchro.txt:24
#, no-wrap
msgid ""
"<code><a cbot|class>class</a></code>, <code><a cbot|static>static</a></code>\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/term.txt:1
#, no-wrap
msgid "Semicolon"
msgstr ""
#. type: Plain text
#: ../E/term.txt:2
#, no-wrap
msgid "Always use a semicolon <c/>;<n/> after a simple expression. For example: "
msgstr ""
#. type: Source code
#: ../E/term.txt:4
#, no-wrap
msgid "\tint counter = 0;"
msgstr ""
#. type: Plain text
#: ../E/term.txt:6
#, no-wrap
msgid "However, after a <a cbot|bloc>bloc</a>, never put a semicolon:"
msgstr ""
#. type: Source code
#: ../E/term.txt:8
#, no-wrap
msgid ""
"\t{\n"
"\t\tfloat dist;\n"
"\t\tdist = distance(p1, p2);\n"
"\t} <n/>// no semicolon here!<c/>"
msgstr ""
#. type: Plain text
#: ../E/term.txt:13
#, no-wrap
msgid "Do not use a semicolon either immediately after the instructions <code><a cbot|while>while</a></code>, <code><a cbot|if>if</a></code> or <code><a cbot|for>for</a></code>:"
msgstr ""
#. type: Source code
#: ../E/term.txt:15
#, no-wrap
msgid ""
"\tif ( a < b ) <n/>// no semicolon here!<c/>\n"
"\t{\n"
"\t\tb = 100-a;\n"
"\t}"
msgstr ""
#. type: Plain text
#: ../E/term.txt:20
#, no-wrap
msgid "An instruction is always ended by a semicolon, and not by the end of the line. So you can very well put several instructions on the same line: "
msgstr ""
#. type: Source code
#: ../E/term.txt:22
#, no-wrap
msgid ""
"\tint d=20;\n"
"\tmove(d);\n"
"\tturn(90);"
msgstr ""
#. type: Plain text
#: ../E/term.txt:26
#, no-wrap
msgid "Is equivalent to:"
msgstr ""
#. type: Source code
#: ../E/term.txt:28
#, no-wrap
msgid "\tint d=20; move(d); turn(90);"
msgstr ""
#. type: \b; header
#: ../E/testinfo.txt:1
#, no-wrap
msgid "Instruction <code>testinfo</code>"
msgstr ""
#. type: Source code
#: ../E/testinfo.txt:3
#, no-wrap
msgid "<c/>testinfo ( name, power );<n/>"
msgstr ""
#. type: Plain text
#: ../E/testinfo.txt:5
#, no-wrap
msgid "Tests if an information exists in the closest <a object|exchange>information exchange post</a>."
msgstr ""
#. type: Plain text
#: ../E/testinfo.txt:8
#, no-wrap
msgid "Name of the information to be tested in the exchange post. This name is a string: it must be written in quotation marks \"\"."
msgstr ""
#. type: Plain text
#: ../E/testinfo.txt:11
#, no-wrap
msgid "Power of the transmitter, which corresponds to the maximal distance between the transmitter and the exchange post. If the distance is longer, the function returns <code>false</code>. Default value is 10 metres."
msgstr ""
#. type: \t; header
#: ../E/testinfo.txt:13
#, no-wrap
msgid "Return: <code><a cbot|bool>bool</a></code>"
msgstr ""
#. type: Plain text
#: ../E/testinfo.txt:14
#, no-wrap
msgid "Return <code>true</code> if the information exists. Return and <code>false</code> if the information does not exist or if the receiver is too far away from the exchange post."
msgstr ""
#. type: Plain text
#: ../E/testinfo.txt:17
#, no-wrap
msgid ""
"<code><a cbot|receive>receive</a></code>, <code><a cbot|send>send</a></code> and <code><a cbot|delinfo>deleteinfo</a></code>.\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/this.txt:1
#, no-wrap
msgid "Instruction <code>this</code>"
msgstr ""
#. type: Plain text
#: ../E/this.txt:2
#, no-wrap
msgid "Occasionally, a <a cbot|class>class</a> method needs to know the reference to the instance it is acting upon. For example the instance might want to pass it's own reference to another function. An implicit reference name <code>this</code> is available to methods and <code>this</code> is a reference to the current instance."
msgstr ""
#. type: Source code
#: ../E/this.txt:4
#, no-wrap
msgid ""
"public class MyClass\n"
"{\n"
"\tint m_int;\n"
"\tstring m_str;\n"
"\tvoid MyFunction()\n"
"\t{\n"
"\t\tOtherFunction(this);\n"
"\t\tm_int = 2;\n"
"\t}\n"
"}\n"
"\n"
"void OtherFunction(MyClass obj)\n"
"{\n"
"\tmessage(obj.m_str);\n"
"}\n"
"\n"
"extern void object::Test()\n"
"{\n"
"\tMyClass item();\n"
"\titem.m_str = \"Hello\";\n"
"\titem.MyFunction(); // display \"Hello\"\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/this.txt:27
#, no-wrap
msgid "You can also put <code>this</code> before a field name in a method but this is not necessary. In the example above in the method <code>MyFunction()</code> following two lines have strictly the same meaning:"
msgstr ""
#. type: Source code
#: ../E/this.txt:29
#, no-wrap
msgid ""
"\tm_int = 2;\n"
"\tthis.m_int = 2; // identical"
msgstr ""
#. type: Plain text
#: ../E/this.txt:32
#, no-wrap
msgid "In a method of the <code><a cbot|object>object</a></code> class, you can also use <code>this.</code> before a fieldname."
msgstr ""
#. type: Source code
#: ../E/this.txt:34
#, no-wrap
msgid ""
"extern void object::Display()\n"
"{\n"
"\tmessage(orientation);\n"
"\tmessage(this.orientation); // same thing but\n"
"\t // more explicit\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/this.txt:41
#, no-wrap
msgid "However if a field name is hidden by a parameter declaration or a variable declaration you must use <code>this</code>. In the following example the name <code>value</code> of the parameter is the same as the name of the field <code>value</code> of the <a cbot|class>class</a> <code>MyClass</code>, we must therefore write <code>this.value</code> in order to distinguish the field from the parameter."
msgstr ""
#. type: Source code
#: ../E/this.txt:43
#, no-wrap
msgid ""
"public class MyClass\n"
"{\n"
"\tint value;\n"
"\tvoid Put( int value )\n"
"\t{\n"
"\t\tthis.value = value;\n"
"\t}\n"
"}"
msgstr ""
#. type: \b; header
#: ../E/thump.txt:1
#, no-wrap
msgid "Instruction <code>thump</code>"
msgstr ""
#. type: Source code
#: ../E/thump.txt:3
#, no-wrap
msgid "<c/>thump ( );<n/>"
msgstr ""
#. type: Plain text
#: ../E/thump.txt:5
#, no-wrap
msgid "Activates the weapon system of the <a object|bottump>thumper</a>, that turns ants and spiders belly up and makes them completely harmless for a while."
msgstr ""
#. type: Plain text
#: ../E/thump.txt:8
#, no-wrap
msgid ""
"Zero if everything is OK, a value different from zero if an error occurred. \n"
"<code>== 0 </code>Thumping performed\n"
"<code>!= 0 </code>Operation impossible"
msgstr ""
#. type: \b; header
#: ../E/topo.txt:1
#, no-wrap
msgid "Instruction <code>topo</code>"
msgstr ""
#. type: Source code
#: ../E/topo.txt:3
#, no-wrap
msgid "<c/>topo ( position );<n/>"
msgstr ""
#. type: Plain text
#: ../E/topo.txt:5
#, no-wrap
msgid "Returns the altitude of the ground at a give position. The altitude zero corresponds to sea level. A negative value indicates that at this position ground is covered with water. "
msgstr ""
#. type: Plain text
#: ../E/topo.txt:8
#, no-wrap
msgid "Coordinates of the position whose altitude you want to know. "
msgstr ""
#. type: Plain text
#: ../E/topo.txt:11
#, no-wrap
msgid "Altitude of the ground at the given position."
msgstr ""
#. type: \b; header
#: ../E/true.txt:1
#, no-wrap
msgid "Type <code>true</code>"
msgstr ""
#. type: Plain text
#: ../E/true.txt:2
#, no-wrap
msgid "This value means that a condition is true; it is one of the two values that a <a cbot|bool>boolean</a> <a cbot|var>variable</a> can take."
msgstr ""
#. type: \b; header
#: ../E/turn.txt:1
#, no-wrap
msgid "Instruction <code>turn</code>"
msgstr ""
#. type: Plain text
#: ../E/turn.txt:2
#, no-wrap
msgid "Use the instruction <c/>turn();<n/> to instruct the bot to perform a rotation on itself of a certain number of degrees."
msgstr ""
#. type: Plain text
#: ../E/turn.txt:5
#, no-wrap
msgid "90 degreed means a quarter turn, 180 degrees means a half turn. A positive angle will perform a counterclockwise rotation, a negative angle means a clockwise rotation. Here are some examples with <c/>turn();<n/>:"
msgstr ""
#. type: Plain text
#: ../E/turn.txt:7
#, no-wrap
msgid ""
"<c/>turn(90);<n/> quarter turn to the left\n"
"<c/>turn(-90);<n/> quarter turn to the right (negative angle)\n"
"<c/>turn(180);<n/> half turn"
msgstr ""
#. type: Plain text
#: ../E/turn.txt:11
#, no-wrap
msgid "In order to turn the bot towards an object found with the instruction <c/><a cbot|radar>radar</a>();<n/>, you must calculate the rotation angle with the instruction <code><a cbot|direct>direction</a>()</code>:"
msgstr ""
#. type: Source code
#: ../E/turn.txt:13
#, no-wrap
msgid ""
"\titem = <a cbot|radar>radar</a>(AlienSpider);\n"
"\tturn(<a cbot|direct>direction</a>(item.position));"
msgstr ""
#. type: Plain text
#: ../E/turn.txt:16
#, no-wrap
msgid "After these lines, just fire the cannon, and there is one hostile element less."
msgstr ""
#. type: Source code
#: ../E/turn.txt:20
#, no-wrap
msgid "<c/>turn ( angle );<n/>"
msgstr ""
#. type: Plain text
#: ../E/turn.txt:22
#, no-wrap
msgid "Turns the bot with a given angle, right or left, without moving either forward or backward. "
msgstr ""
#. type: Plain text
#: ../E/turn.txt:25
#, no-wrap
msgid "Angle of the required rotation, in degrees. A positive value turns left, a negative value turns right. <code>turn(180)</code> turns round completely. "
msgstr ""
#. type: Plain text
#: ../E/turn.txt:28
#, no-wrap
msgid ""
"Zero if everything is OK, or a value different from zero if an error occurred. \n"
"<code>== 0 </code>rotation performed\n"
"<code>!= 0 </code>rotation impossible"
msgstr ""
#. type: \b; header
#: ../E/type.txt:1
#, no-wrap
msgid "Variable types"
msgstr ""
#. type: Plain text
#: ../E/type.txt:2
#, no-wrap
msgid "When you define a <a cbot|var>variable</a>, you must give two elements: "
msgstr ""
#. type: Bullet: '1)'
#: ../E/type.txt:4
#, no-wrap
msgid "a name"
msgstr ""
#. type: Bullet: '2)'
#: ../E/type.txt:5
#, no-wrap
msgid "a type"
msgstr ""
#. type: Plain text
#: ../E/type.txt:7
#, no-wrap
msgid "Once you defined a variable, you can use it to put information in it. However, the information that a variable can contain must always be of the correct type: a variable of type <a cbot|float>float</a> can not contain a string, etc."
msgstr ""
#. type: Source code
#: ../E/type.txt:11
#, no-wrap
msgid "<code><a cbot|int>int</a></code>"
msgstr ""
#. type: Plain text
#: ../E/type.txt:12
#, no-wrap
msgid "For a whole number (12, -500, etc.)."
msgstr ""
#. type: Source code
#: ../E/type.txt:14
#, no-wrap
msgid "<code><a cbot|float>float</a></code>"
msgstr ""
#. type: Plain text
#: ../E/type.txt:15
#, no-wrap
msgid "For a real number (12, 3.14, 0.2, -99.98, etc.)."
msgstr ""
#. type: Source code
#: ../E/type.txt:17
#, no-wrap
msgid "<code><a cbot|bool>bool</a></code>"
msgstr ""
#. type: Plain text
#: ../E/type.txt:18
#, no-wrap
msgid "For a boolean variable, that can only take the values <code>true</code> or <code>false</code>."
msgstr ""
#. type: Source code
#: ../E/type.txt:20
#, no-wrap
msgid "<code><a cbot|string>string</a></code>"
msgstr ""
#. type: Plain text
#: ../E/type.txt:21
#, no-wrap
msgid "For texts (\"Hello!\", \"No object found\", etc.)"
msgstr ""
#. type: Source code
#: ../E/type.txt:23
#, no-wrap
msgid "<code><a cbot|point>point</a></code>"
msgstr ""
#. type: Plain text
#: ../E/type.txt:24
#, no-wrap
msgid "For the coordinates of a point in space; a variable of this type consists of three parts named x, y and z."
msgstr ""
#. type: Source code
#: ../E/type.txt:26
#, no-wrap
msgid "<code><a cbot|object>object</a></code>"
msgstr ""
#. type: Plain text
#: ../E/type.txt:27
#, no-wrap
msgid "A variable of this type contains the information about an object (bot, building, enemy, etc.)."
msgstr ""
#. type: Source code
#: ../E/type.txt:29
#, no-wrap
msgid "<code><a cbot|void>void</a></code>"
msgstr ""
#. type: Plain text
#: ../E/type.txt:30
#, no-wrap
msgid "This type is an \"empty type\", that you use when you do not want to specify a type."
msgstr ""
#. type: \b; header
#: ../E/var.txt:1
#, no-wrap
msgid "Variables"
msgstr ""
#. type: Plain text
#: ../E/var.txt:2
#, no-wrap
msgid "A variable is like a box, where you can put some information. The content of the variable can change during the execution of the program."
msgstr ""
#. type: Plain text
#: ../E/var.txt:4
#, no-wrap
msgid "For example, you can use a variable to count the number of titanium ore units that the grabber has collected and carried to the converter. First, you must find a name for it: the name should not be too long, but explain by itself what the variable is used for. Let's call it <code>countTit</code>. This variable must contain only whole numbers, so choose the type <code>int</code>. At the beginning of the program, you must declare the variable. Then you put the value <code>0</code> into the variable, and every time you grab a titanium ore, you increase the variable by <code>1</code>. At every moment, the variable contains the number of titanium ore units that the grabber collected."
msgstr ""
#. type: Plain text
#: ../E/var.txt:6
#, no-wrap
msgid ""
"For the declaration of the variable, write the following line: \n"
"<c/><s/>\tint countTit;<n/>"
msgstr ""
#. type: Plain text
#: ../E/var.txt:9
#, no-wrap
msgid ""
"To put <code>0</code> into the variable, write:\n"
"<c/><s/>\tcountTit = 0;<n/>"
msgstr ""
#. type: Plain text
#: ../E/var.txt:12
#, no-wrap
msgid ""
"At every titanium ore grabbed, write:\n"
"<c/><s/>\tcountTit = countTit + 1<n/>"
msgstr ""
#. type: Plain text
#: ../E/var.txt:15
#, no-wrap
msgid ""
"You have much freedom in the choice of the name for a variable, you can call them by any name, f. ex.: <code>dist</code>, <code>direct</code>, <code>p2</code>, <code>a</code>, <code>x</code>, <code>nothing_2_shoot_at</code>, etc.\n"
"A variable name must always begin with a letter. It can be followed by any combination of letters, digits or the underscore character <code>_</code>. You can of course not use the keywords of the CBOT language like <code><a cbot|for>for</a></code>, <code><a cbot|while>while</a></code>, <code><a cbot|break>break</a></code>, <code><a cbot|continue>continue</a></code>, <code>do</code>, etc.\n"
"You should be careful about the choice of the names that you give to variables; writing a program can become very difficult if you forget the names of variables or if you do not remember what they are used for. Elaborate your own system to find variable names, and do not use names like <code>Bmo45</code>, <code>a</code> or <code>tgBinX</code>."
msgstr ""
#. type: Plain text
#: ../E/var.txt:19
#, no-wrap
msgid "In the example above, the keyword <code>int</code> indicates that this variable can contain only whole numbers, which is adequate to counting objects. If you want to measure a distance, better use a variable that can contain also real numbers, with a fractional part (like 3.45 or 0.034): in this case, use the type <code>float</code>."
msgstr ""
#. type: Bullet: '1)'
#: ../E/var.txt:22
#, no-wrap
msgid "the name,"
msgstr ""
#. type: Bullet: '2)'
#: ../E/var.txt:23
#, no-wrap
msgid "the type of the information stored inside,"
msgstr ""
#. type: Bullet: '3)'
#: ../E/var.txt:24
#, no-wrap
msgid "the content, i.e. the information itself."
msgstr ""
#. type: \t; header
#: ../E/var.txt:26
#, no-wrap
msgid "the name"
msgstr ""
#. type: Plain text
#: ../E/var.txt:27
#, no-wrap
msgid "You need the name to be able to distinguish the different variables from each other."
msgstr ""
#. type: \t; header
#: ../E/var.txt:29
#, no-wrap
msgid "the type"
msgstr ""
#. type: Bullet: 'o'
#: ../E/var.txt:32
#, no-wrap
msgid "<code><a cbot|int>int</a></code> for a whole number (12, -500, etc.)"
msgstr ""
#. type: Bullet: 'o'
#: ../E/var.txt:33
#, no-wrap
msgid "<code><a cbot|float>float</a></code> for a real number (3.14, 0.2, -99.98, etc.)"
msgstr ""
#. type: Bullet: 'o'
#: ../E/var.txt:34
#, no-wrap
msgid "<code><a cbot|string>string</a></code> for a character string (\"Hello!\", \"No object found\", etc.)"
msgstr ""
#. type: Bullet: 'o'
#: ../E/var.txt:35
#, no-wrap
msgid "<code><a cbot|point>point</a></code> for a x,y,z-coordinate in space"
msgstr ""
#. type: Bullet: 'o'
#: ../E/var.txt:36
#, no-wrap
msgid "<code><a cbot|object>object</a></code> for information about an object (bot, building, etc.)"
msgstr ""
#. type: \t; header
#: ../E/var.txt:38
#, no-wrap
msgid "The content"
msgstr ""
#. type: Plain text
#: ../E/var.txt:39
#, no-wrap
msgid "The content of a variable is an information of the kind specified in the type. It can change during the execution of the program. "
msgstr ""
#. type: Plain text
#: ../E/var.txt:41
#, no-wrap
msgid ""
"Once you declared a variable, it still does not contain any value. Before you can use it, you must put a value inside: \n"
"<c/><s/>\tint i, j;"
msgstr ""
#. type: Source code
#: ../E/var.txt:43
#, no-wrap
msgid ""
"\tj = 25; // j takes the value 25\n"
"\tj = i; // can not write this, because i has got no content yet."
msgstr ""
#. type: Plain text
#: ../E/var.txt:46
#, no-wrap
msgid ""
"You can also declare a variable and put a value inside in the same line, writing: \n"
"<c/><s/>\tint countTit = 0;"
msgstr ""
#. type: Plain text
#: ../E/var.txt:49
#, no-wrap
msgid ""
"When you assign a value to a variable with the equals sign <code>=</code>, the value on the right side is copied into the value on the left side. Consider the following example: \n"
"<c/><s/>\tint i, j;"
msgstr ""
#. type: Source code
#: ../E/var.txt:51
#, no-wrap
msgid ""
"\ti = 5+2; // i takes the value 7\n"
"\tj = i+6; // j takes the value of i plus 6, this is 13\n"
"\ti = j; // i takes the value of j, this is 13"
msgstr ""
#. type: Plain text
#: ../E/var.txt:55
#, no-wrap
msgid "At the end of this example, both variables <code>i</code> and <code>j</code> contain the value <code>13</code>."
msgstr ""
#. type: Plain text
#: ../E/var.txt:57
#, no-wrap
msgid ""
"The following assignment is not correct, because on the left side of the equals sign <code>=</code>, there can be only a variable name:\n"
"<c/><s/>\ti+2 = j; // impossible"
msgstr ""
#. type: Plain text
#: ../E/var.txt:60
#, no-wrap
msgid ""
"If you want to exchange the values of two variables, you must use a third variable. Here is an example to exchange the content of two variables <code>a</code> and <code>b</code> :\n"
"<c/><s/>\tint temp;"
msgstr ""
#. type: Source code
#: ../E/var.txt:62
#, no-wrap
msgid ""
"\ttemp = a; // temp takes the value of a\n"
"\ta = b; // the content of b is copied into a\n"
"\tb = temp; // the content of temp is copied into b"
msgstr ""
#. type: \b; header
#: ../E/void.txt:1
#, no-wrap
msgid "Type <code>void</code>"
msgstr ""
#. type: Plain text
#: ../E/void.txt:2
#, no-wrap
msgid "Use this type when you want to declare a function that returns nothing."
msgstr ""
#. type: Plain text
#: ../E/void.txt:4
#, no-wrap
msgid ""
"Example:\n"
"<c/><s/>void MyFunction(int a)"
msgstr ""
#. type: Source code
#: ../E/void.txt:6
#, no-wrap
msgid ""
"{\n"
"\t...\n"
"}"
msgstr ""
#. type: \b; header
#: ../E/wait.txt:1
#, no-wrap
msgid "Instruction <code>wait</code>"
msgstr ""
#. type: Plain text
#: ../E/wait.txt:2
#, no-wrap
msgid "The instruction <c/>wait();<n/> instructs the bot to wait for some seconds, according to the value written in brackets."
msgstr ""
#. type: Plain text
#: ../E/wait.txt:5
#, no-wrap
msgid "In order to wait until the <a object|power>power cell</a> is recharged on a power station, wait 5 seconds with <c/>wait(5);<n/>."
msgstr ""
#. type: Plain text
#: ../E/wait.txt:7
#, no-wrap
msgid "In order to wait until the <a object|convert>converter</a> finished transforming some <a object|titanore>titanium ore</a> in a <a object|titan>titanium cube</a>, wait 15 seconds with <c/>wait(15);<n/>."
msgstr ""
#. type: Source code
#: ../E/wait.txt:11
#, no-wrap
msgid "<c/>wait ( time );<n/>"
msgstr ""
#. type: Plain text
#: ../E/wait.txt:13
#, no-wrap
msgid "Waits for a moment."
msgstr ""
#. type: Plain text
#: ../E/wait.txt:16
#, no-wrap
msgid "Specifies the time that the bot must wait."
msgstr ""
#. type: \b; header
#: ../E/while.txt:1
#, no-wrap
msgid "Instruction <code>while</code>"
msgstr ""
#. type: Plain text
#: ../E/while.txt:2
#, no-wrap
msgid "The instruction <code>while () {}</code> is used to repeat a set of instructions several times."
msgstr ""
#. type: Bullet: 'o'
#: ../E/while.txt:6
#, no-wrap
msgid "look for a spider,"
msgstr ""
#. type: Bullet: 'o'
#: ../E/while.txt:7
#, no-wrap
msgid "turn towards it,"
msgstr ""
#. type: Bullet: 'o'
#: ../E/while.txt:8
#, no-wrap
msgid "shoot."
msgstr ""
#. type: Source code
#: ../E/while.txt:10
#, no-wrap
msgid ""
"\twhile (true)\n"
"\t{\n"
"\t\titem = <a cbot|radar>radar</a>(AlienSpider);\n"
"\t\t<a cbot|turn>turn</a>(direction(item.position));\n"
"\t\t<a cbot|fire>fire</a>(1);\n"
"\t}"
msgstr ""
#. type: Plain text
#: ../E/while.txt:17
#, no-wrap
msgid "Just execute this program once, and it will kill all spiders around it."
msgstr ""
#. type: Source code
#: ../E/while.txt:21
#, no-wrap
msgid ""
"<code>while ( condition )\n"
"{\n"
"\t</code>Instructions ...<c/>\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/while.txt:26
#, no-wrap
msgid "This instruction allows you to perform the instructions inside the <a cbot|bloc>block</a> several times."
msgstr ""
#. type: Plain text
#: ../E/while.txt:28
#, no-wrap
msgid "Be careful not to confuse the instruction <code>while( ) { }</code> with the instruction <c/><a cbot|do>do</a> { } while( );<n/>; the latter tests the condition only after the instructions in the block have been performed a first time. "
msgstr ""
#. type: Source code
#: ../E/while.txt:34
#, no-wrap
msgid ""
"<c/>int i = 0;\n"
"while ( i < 10 )\n"
"{\n"
"\t<n/>Instructions ...<c/>\n"
"\ti = i+1;\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/while.txt:42
#, no-wrap
msgid "Do not put a <a cbot|term>semicolon</a> at the end of the line <code>while ( )</code>."
msgstr ""
#. type: Plain text
#: ../E/while.txt:44
#, no-wrap
msgid "The instructions <code><a cbot|break>break</a></code> and <code><a cbot|continue>continue</a></code> can be useful inside a block following the instruction <code>while { }</code>."
msgstr ""
#. type: \b; header
#: ../E/writeln.txt:1
#, no-wrap
msgid "Instruction <code>writeln</code>"
msgstr ""
#. type: Plain text
#: ../E/writeln.txt:2
#, no-wrap
msgid "Write one line of text to an open file in the files/ folder. This is a method of the <code><a cbot|file>file</a></code> class. This is the reason why we always write <code>handle.writeln()</code>:"
msgstr ""
#. type: Source code
#: ../E/writeln.txt:4
#, no-wrap
msgid "\thandle.writeln(\"abc\");"
msgstr ""
#. type: Plain text
#: ../E/writeln.txt:6
#, no-wrap
msgid "The file must have been opened for writing (<code>\"w\"</code>) with the <code><a cbot|open>open</a></code> instruction. The line will automatically be terminated by the end of line characters 0x0D (CR) and 0x0A (LF)."
msgstr ""
#. type: Source code
#: ../E/writeln.txt:9
#, no-wrap
msgid "<c/>handle.writeln ( string );<n/>"
msgstr ""
#. type: Source code
#: ../E/writeln.txt:13
#, no-wrap
msgid "\twriteln(\"Line of text\");"
msgstr ""
#. type: Source code
#: ../E/writeln.txt:15
#, no-wrap
msgid ""
"\tstring s1 = \"abc\";\n"
"\tstring s2 = \"def\";\n"
"\twriteln(s1 + \" \" + s2);"
msgstr ""
#. type: Plain text
#: ../E/writeln.txt:20
#, no-wrap
msgid ""
"<code><a cbot|file>file</a></code>, <code><a cbot|open>open</a></code>, <code><a cbot|close>close</a></code>, <code><a cbot|readln>readln</a></code> and <code><a cbot|eof>eof</a></code>.\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: Plain text
#: ../E/fire.txt:13
#, no-wrap
msgid "Fires the gun, with a burst that lasts a certain time. The longer the burst, the more energy it needs. This instruction can be used with the following bot types: "
msgstr ""
#. type: Plain text
#: ../E/message.txt:15
#, no-wrap
msgid "Type of the message, that determines the background color. "
msgstr ""
#. type: Plain text
#: ../E/var.txt:21
#, no-wrap
msgid "In fact, a variable is made up of three parts:"
msgstr ""
#. type: Plain text
#: ../E/var.txt:30
#, no-wrap
msgid ""
"The <a cbot|type>type</a> determines what kind of information the variable can contain. According to the type, a variable can contain a whole number, a real number, a string, the coordinates of a point, information about an object, etc. \n"
"Here is a list of the most common variable types:"
msgstr ""
#. type: Plain text
#: ../E/while.txt:5
#, no-wrap
msgid "The most frequent use of <code>while</code> consists in repeating a set of instructions again and again. In order to achieve this, write <code>while (true) {}</code> and put the instructions to be repeated in braces <code>{}</code>. As an example, here is a program that repeats again and again the following actions:"
msgstr ""
#. type: \b; header
#: ../E/acos.txt:1
#, no-wrap
msgid "Instruction <code>acos</code>"
msgstr ""
#. type: Source code
#: ../E/acos.txt:3
#, no-wrap
msgid "<c/>acos ( value );<n/>"
msgstr ""
#. type: \t; header
#: ../E/acos.txt:5 ../E/asin.txt:5 ../E/atan.txt:5 ../E/ceil.txt:6 ../E/floor.txt:6 ../E/round.txt:6 ../E/sqrt.txt:5 ../E/trunc.txt:6
#, no-wrap
msgid "value: <code><a cbot|float>float</a></code>"
msgstr ""
#. type: Plain text
#: ../E/acos.txt:6 ../E/asin.txt:6
#, no-wrap
msgid "Number between -1 and 1 (including both)."
msgstr ""
#. type: Plain text
#: ../E/acos.txt:9
#, no-wrap
msgid "Arcus cosine (in degrees) of the value."
msgstr ""
#. type: Plain text
#: ../E/acos.txt:12 ../E/asin.txt:12 ../E/atan.txt:12 ../E/atan2.txt:17 ../E/cos.txt:12 ../E/pow.txt:15 ../E/rand.txt:9 ../E/sin.txt:12 ../E/sqrt.txt:12 ../E/tan.txt:12
#, no-wrap
msgid "<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|expr>expressions</a>."
msgstr ""
#. type: Source code
#: ../E/aim.txt:3
#, no-wrap
msgid "<c/>aim ( y, x );<n/>"
msgstr ""
#. type: Plain text
#: ../E/aim.txt:5
#, no-wrap
msgid "This instruction sets the vertical and the horizontal angle of the cannon. The following robots are equipped with a cannon: "
msgstr ""
#. type: Plain text
#: ../E/aim.txt:10
#, no-wrap
msgid "When controlling the robot through programming, the gun can be also turned left or right by turning the whole robot with the instruction <code><a cbot|turn>turn</a></code>."
msgstr ""
#. type: \t; header
#: ../E/aim.txt:12 ../E/atan2.txt:7 ../E/pow.txt:8
#, no-wrap
msgid "y: <code><a cbot|float>float</a></code>"
msgstr ""
#. type: \t; header
#: ../E/aim.txt:15
#, no-wrap
msgid "x: <code><a cbot|float>float</a></code> (default value: <code>0</code>)"
msgstr ""
#. type: Plain text
#: ../E/aim.txt:16
#, no-wrap
msgid "Angle in degrees of the gun relative to the robot. A positive value orients the gun to the right. The angle must range from <code>-40</code> to <code>+40</code> degrees for all shooters."
msgstr ""
#. type: \b; header
#: ../E/asin.txt:1
#, no-wrap
msgid "Instruction <code>asin</code>"
msgstr ""
#. type: Source code
#: ../E/asin.txt:3
#, no-wrap
msgid "<c/>asin ( value );<n/>"
msgstr ""
#. type: Plain text
#: ../E/asin.txt:9
#, no-wrap
msgid "Arcus sine (in degrees) of the value."
msgstr ""
#. type: \b; header
#: ../E/atan.txt:1
#, no-wrap
msgid "Instruction <code>atan</code>"
msgstr ""
#. type: Source code
#: ../E/atan.txt:3
#, no-wrap
msgid "<c/>atan ( value );<n/>"
msgstr ""
#. type: Plain text
#: ../E/atan.txt:6 ../E/atan2.txt:8 ../E/atan2.txt:11 ../E/ceil.txt:7 ../E/floor.txt:7 ../E/round.txt:7 ../E/trunc.txt:7
#, no-wrap
msgid "Number."
msgstr ""
#. type: Plain text
#: ../E/atan.txt:9
#, no-wrap
msgid "Arcus tangent (in degrees) of the value."
msgstr ""
#. type: \b; header
#: ../E/atan2.txt:1
#, no-wrap
msgid "Instruction <code>atan2</code>"
msgstr ""
#. type: Source code
#: ../E/atan2.txt:3
#, no-wrap
msgid "<c/>atan2 ( y, x );<n/>"
msgstr ""
#. type: Plain text
#: ../E/atan2.txt:5
#, no-wrap
msgid "The purpose of using two arguments instead of one is to gather information on the signs of the inputs in order to return the appropriate quadrant of the computed angle, which is not possible for the single-argument <c/><a cbot|atan>atan();</a><n/> function. For example, consider a point <code>(-1, -1)</code>: <c/>atan(-1/-1);<n/> is <code>45.00</code> degrees, whereas <c/>atan2(-1, -1);<n/> is <code>-135.00</code> degrees, which is obviously more correct in this case."
msgstr ""
#. type: \t; header
#: ../E/atan2.txt:10 ../E/pow.txt:5
#, no-wrap
msgid "x: <code><a cbot|float>float</a></code>"
msgstr ""
#. type: Plain text
#: ../E/atan2.txt:14
#, no-wrap
msgid "Arcus tangent (in degrees) of <code>y/x</code>."
msgstr ""
#. type: \b; header
#: ../E/build.txt:1
#, no-wrap
msgid "Instruction <code>build</code>"
msgstr ""
#. type: Source code
#: ../E/build.txt:7
#, no-wrap
msgid ""
" <a cbot|object>object</a> item = <a cbot|radar>radar</a>(<a object|titan>Titanium</a>);\n"
" <a cbot|goto>goto</a>(item.position);\n"
" build(<a object|factory>BotFactory</a>);"
msgstr ""
#. type: Source code
#: ../E/build.txt:13
#, no-wrap
msgid "<c/>build ( cat );<n/>"
msgstr ""
#. type: \t; header
#: ../E/build.txt:17 ../E/buildingenabled.txt:16 ../E/canbuild.txt:16 ../E/detect.txt:11 ../E/factory.txt:7 ../E/radar.txt:22
#, no-wrap
msgid "cat: <code><a cbot|int>int</a></code>"
msgstr ""
#. type: Plain text
#: ../E/build.txt:18 ../E/buildingenabled.txt:17 ../E/canbuild.txt:17
#, no-wrap
msgid "<a cbot|category>Category</a> of a building."
msgstr ""
#. type: Plain text
#: ../E/build.txt:21
#, no-wrap
msgid ""
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <code>build()</code>.\n"
"<code>== 0 </code>Successfully built\n"
"<code>!= 0 </code>Impossible to build (for example, the nearest titanium cube is too far away or the specified building is not available in the mission)"
msgstr ""
#. type: \b; header
#: ../E/buildingenabled.txt:1
#, no-wrap
msgid "Instruction <code>buildingenabled</code>"
msgstr ""
#. type: Plain text
#: ../E/buildingenabled.txt:5
#, no-wrap
msgid "It is similar to the <c/><a cbot|canbuild>canbuild();</a><n/> instruction. However, it does not check if a required research has been done."
msgstr ""
#. type: Source code
#: ../E/buildingenabled.txt:7
#, no-wrap
msgid ""
" <a cbot|if>if</a> (buildingenabled(<a object|factory>BotFactory</a>))\n"
" {\n"
" \tbuild(<a object|factory>BotFactory</a>);\n"
" }"
msgstr ""
#. type: Source code
#: ../E/buildingenabled.txt:14
#, no-wrap
msgid "<c/>buildingenabled ( cat );<n/>"
msgstr ""
#. type: \t; header
#: ../E/buildingenabled.txt:19 ../E/canbuild.txt:19 ../E/canresearch.txt:10 ../E/detect.txt:23 ../E/isbusy.txt:10 ../E/researched.txt:10
#, no-wrap
msgid "Return value: <code><a cbot|bool>bool</a></code>"
msgstr ""
#. type: \t; header
#: ../E/destroy.txt:7 ../E/factory.txt:13 ../E/isbusy.txt:7 ../E/research.txt:10 ../E/takeoff.txt:7
#, no-wrap
msgid "<a cbot|object>object</a>"
msgstr ""
#. type: Plain text
#: ../E/isbusy.txt:8
#, no-wrap
msgid "Any building which can take some action (e.g. <a cbot|convert>Converter</a>)."
msgstr ""
#. type: Plain text
#: ../E/isbusy.txt:11
#, no-wrap
msgid ""
"<code><format const>true</format></code> if the object is doing something (e.g. converting)\n"
"<code><format const>false</format></code> if the object is not doing anything"
msgstr ""
#. type: \b; header
#: ../E/canbuild.txt:1
#, no-wrap
msgid "Instruction <code>canbuild</code>"
msgstr ""
#. type: Plain text
#: ../E/canbuild.txt:5
#, no-wrap
msgid "It helps to prevent errors in programs using the <c/><a cbot|build>build();</a><n/> instruction. Here is an example:"
msgstr ""
#. type: Source code
#: ../E/canbuild.txt:7
#, no-wrap
msgid ""
" <a cbot|if>if</a> (canbuild(<a object|factory>BotFactory</a>))\n"
" {\n"
" \tbuild(<a object|factory>BotFactory</a>);\n"
" }"
msgstr ""
#. type: Source code
#: ../E/canbuild.txt:14
#, no-wrap
msgid "<c/>canbuild ( cat );<n/>"
msgstr ""
#. type: Plain text
#: ../E/buildingenabled.txt:20 ../E/canbuild.txt:20
#, no-wrap
msgid "<code>true</code> if the building can be built, <code>false</code> otherwise."
msgstr ""
#. type: \b; header
#: ../E/canresearch.txt:1
#, no-wrap
msgid "Instruction <code>canresearch</code>"
msgstr ""
#. type: Source code
#: ../E/canresearch.txt:3
#, no-wrap
msgid "<c/>canresearch ( research );<n/>"
msgstr ""
#. type: \t; header
#: ../E/canresearch.txt:7 ../E/researched.txt:7
#, no-wrap
msgid "research: <code><a cbot|int>int</a></code>"
msgstr ""
#. type: Plain text
#: ../E/canresearch.txt:8 ../E/research.txt:8 ../E/researched.txt:8
#, no-wrap
msgid "<a cbot|researches>Research name</a>."
msgstr ""
#. type: Plain text
#: ../E/canresearch.txt:11
#, no-wrap
msgid ""
"<format const>true</format> if the research can be done (even if it is already done, to check that, use the <a cbot|researched>researched</a> instruction)\n"
"<format const>false</format> if the research cannot be done"
msgstr ""
#. type: Plain text
#: ../E/category.txt:6
#, no-wrap
msgid "Below are the different categories available:"
msgstr ""
#. type: \t; header
#: ../E/category.txt:8
#, no-wrap
msgid "Buildings:"
msgstr ""
#. type: \t; header
#: ../E/category.txt:32
#, no-wrap
msgid "Portable Objects:"
msgstr ""
#. type: \t; header
#: ../E/category.txt:45
#, no-wrap
msgid "Robots:"
msgstr ""
#. type: \t; header
#: ../E/category.txt:82
#, no-wrap
msgid "Enemies:"
msgstr ""
#. type: \t; header
#: ../E/category.txt:92
#, no-wrap
msgid "Miscellaneous:"
msgstr ""
#. type: \t; header
#: ../E/category.txt:106
#, no-wrap
msgid "Flags and Other Indicators:"
msgstr ""
#. type: \b; header
#: ../E/ceil.txt:1
#, no-wrap
msgid "Instruction <code>ceil</code>"
msgstr ""
#. type: Source code
#: ../E/ceil.txt:3
#, no-wrap
msgid "<c/>ceil ( value );<n/>"
msgstr ""
#. type: Plain text
#: ../E/ceil.txt:4
#, no-wrap
msgid "Rounds up a number."
msgstr ""
#. type: Plain text
#: ../E/ceil.txt:10
#, no-wrap
msgid "Ceiling of the value, i.e. the smallest integer not less than <code>value</code>. For example, <code>ceil(2.1)</code> is <code>3.0</code>."
msgstr ""
#. type: Plain text
#: ../E/ceil.txt:13 ../E/floor.txt:13 ../E/trunc.txt:13
#, no-wrap
msgid "<a cbot|round>round</a>, <a cbot>programming</a>, <a cbot|type>types</a> and <a cbot|expr>expressions</a>."
msgstr ""
#. type: \b; header
#: ../E/colors.txt:1
#, no-wrap
msgid "Value <code>Colors</code>"
msgstr ""
#. type: Plain text
#: ../E/colors.txt:2
#, no-wrap
msgid "Color names are used to define a specific color to use. They can be passed to functions like <a cbot|pendown>pendown</a> or <a cbot|pencolor>pencolor</a>."
msgstr ""
#. type: Plain text
#: ../E/colors.txt:4
#, no-wrap
msgid "In a program, colors are always displayed on a <format const>red background</format>. If a color isn't highlighted in red, it is misspelled. Caps and lower cases should be kept as is."
msgstr ""
#. type: Plain text
#: ../E/colors.txt:6
#, no-wrap
msgid "Below are the different colors available:"
msgstr ""
#. type: Plain text
#: ../E/colors.txt:8
#, no-wrap
msgid ""
"<code><format const>White</format></code>\n"
"<code><format const>Black</format></code>\n"
"<code><format const>Gray</format></code>\n"
"<code><format const>LightGray</format></code>\n"
"<code><format const>Red</format></code>\n"
"<code><format const>Pink</format></code>\n"
"<code><format const>Purple</format></code>\n"
"<code><format const>Orange</format></code>\n"
"<code><format const>Yellow</format></code>\n"
"<code><format const>Beige</format></code>\n"
"<code><format const>Brown</format></code>\n"
"<code><format const>Skin</format></code>\n"
"<code><format const>Green</format></code>\n"
"<code><format const>LightGreen</format></code>\n"
"<code><format const>Blue</format></code>\n"
"<code><format const>LightBlue</format></code>"
msgstr ""
#. type: Plain text
#: ../E/colors.txt:25
#, no-wrap
msgid "You can also draw colored symbols:"
msgstr ""
#. type: Plain text
#: ../E/colors.txt:27
#, no-wrap
msgid ""
"<code><format const>BlackArrow</format></code>\n"
"<code><format const>RedArrow</format></code>"
msgstr ""
#. type: \b; header
#: ../E/cos.txt:1
#, no-wrap
msgid "Instruction <code>cos</code>"
msgstr ""
#. type: Source code
#: ../E/cos.txt:3
#, no-wrap
msgid "<c/>cos ( angle );<n/>"
msgstr ""
#. type: Plain text
#: ../E/cos.txt:6 ../E/sin.txt:6
#, no-wrap
msgid "Angle in degrees."
msgstr ""
#. type: Plain text
#: ../E/cos.txt:9
#, no-wrap
msgid "Cosine of the angle."
msgstr ""
#. type: \b; header
#: ../E/destroy.txt:1
#, no-wrap
msgid "Instruction <code>destroy</code>"
msgstr ""
#. type: Source code
#: ../E/destroy.txt:3
#, no-wrap
msgid "<c/><a cbot|object>object</a>.destroy ( );<n/>"
msgstr ""
#. type: Plain text
#: ../E/destroy.txt:5
#, no-wrap
msgid "Destroys an object."
msgstr ""
#. type: Plain text
#: ../E/destroy.txt:8
#, no-wrap
msgid "<a object|destroy>Destroyer</a>."
msgstr ""
#. type: Plain text
#: ../E/destroy.txt:11
#, no-wrap
msgid ""
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <code>destroy()</code>.\n"
"<code>== 0 </code>The operation of destroying of an object was started\n"
"<code>!= 0 </code>The instruction could not be done (e.g. nothing to destroy)"
msgstr ""
#. type: \b; header
#: ../E/detect.txt:1
#, no-wrap
msgid "Instruction <code>detect</code>"
msgstr ""
#. type: Plain text
#: ../E/detect.txt:2
#, no-wrap
msgid "With the instruction <c/>detect();<n/>, you can look for objects like <a object|mother>enemies</a>, bots, buildings or raw materials, which are in front of the bot. It is a simpler version of <c/><a cbot|radar>radar</a>();<n/>."
msgstr ""
#. type: Source code
#: ../E/detect.txt:6
#, no-wrap
msgid "<c/>detect ( cat );<n/>"
msgstr ""
#. type: Plain text
#: ../E/detect.txt:8
#, no-wrap
msgid "Detects the nearest object of the specified <a cbot|category>category</a> being in front of the bot. It is similar to the following instruction:"
msgstr ""
#. type: Source code
#: ../E/detect.txt:9
#, no-wrap
msgid "<c/>radar(cat, 0, 45, 0, 20);<n/>"
msgstr ""
#. type: Bullet: 'o'
#: ../E/detect.txt:12 ../E/radar.txt:23
#, no-wrap
msgid "<a cbot|category>Category</a> of the objects that should be detected. For example, when you are looking for an ant, write <code>radar(AlienAnt)</code>. "
msgstr ""
#. type: Bullet: 'o'
#: ../E/detect.txt:13
#, no-wrap
msgid "<a cbot|array>Array</a> of categories of the objects that should be detected. For example, when you are looking only for grabbers:<c/>"
msgstr ""
#. type: Source code
#: ../E/detect.txt:14
#, no-wrap
msgid ""
"int bots[4];\n"
"bots[0] = WheeledGrabber;\n"
"bots[1] = TrackedGrabber;\n"
"bots[2] = WingedGrabber;\n"
"bots[3] = LeggedGrabber;\n"
"object nearestGrabber = radar(bots);"
msgstr ""
#. type: Bullet: 'o'
#: ../E/detect.txt:21 ../E/search.txt:17
#, no-wrap
msgid "Keyword <format const>Any</format> if you are looking for any object (including even plants and so on)."
msgstr ""
#. type: Plain text
#: ../E/detect.txt:24
#, no-wrap
msgid ""
"<format const>true</format> if the object was found\n"
"<format const>false</format> if the object was not found"
msgstr ""
#. type: \b; header
#: ../E/factory.txt:1
#, no-wrap
msgid "Instruction <code>factory</code>"
msgstr ""
#. type: Plain text
#: ../E/factory.txt:8
#, no-wrap
msgid "<a cbot|category>Category</a> of the robot to construct."
msgstr ""
#. type: \t; header
#: ../E/factory.txt:10
#, no-wrap
msgid "program: <code><a cbot|string>string</a></code> (default value: <code>\"\"</code>)"
msgstr ""
#. type: Plain text
#: ../E/factory.txt:17
#, no-wrap
msgid ""
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <code>factory()</code>.\n"
"<code>== 0 </code>The construction successfully started\n"
"<code>!= 0 </code>The construction could not be started (e.g. no <a object|titan>Titanium</a> in the factory, the bot is not researched)"
msgstr ""
#. type: \b; header
#: ../E/flatspace.txt:1
#, no-wrap
msgid "Instruction <code>flatspace</code>"
msgstr ""
#. type: Source code
#: ../E/flatspace.txt:3
#, no-wrap
msgid "<c/>flatspace ( center, flatmin, rmin, rmax, dist );<n/>"
msgstr ""
#. type: Plain text
#: ../E/flatspace.txt:5
#, no-wrap
msgid "Determines the position of the nearest free space with at least <code>flatmin</code> of flat ground around a given position. Works similar to <c/><a cbot|space>space();</a><n/>. Useful for finding a place for a <a cbot|category>building</a>."
msgstr ""
#. type: \t; header
#: ../E/flatspace.txt:10
#, no-wrap
msgid "flatmin: <code><a cbot|float>float</a></code>"
msgstr ""
#. type: Plain text
#: ../E/flatspace.txt:11
#, no-wrap
msgid "Minimum radius of flat ground around the desired position."
msgstr ""
#. type: \b; header
#: ../E/floor.txt:1
#, no-wrap
msgid "Instruction <code>floor</code>"
msgstr ""
#. type: Source code
#: ../E/floor.txt:3
#, no-wrap
msgid "<c/>floor ( value );<n/>"
msgstr ""
#. type: Plain text
#: ../E/floor.txt:4
#, no-wrap
msgid "Rounds down a number."
msgstr ""
#. type: Plain text
#: ../E/floor.txt:10
#, no-wrap
msgid "Floor of the value, i.e. the largest integer not greater than <code>value</code>. For example, <code>floor(2.9)</code> is <code>2.00</code>."
msgstr ""
#. type: Plain text
#: ../E/for.txt:19
#, no-wrap
msgid ""
"Example: count from 1 to 4\n"
"<c/><s/><c/>for ( i = 1 ; i <= 4 ; i++ )"
msgstr ""
#. type: Plain text
#: ../E/function.txt:2
#, no-wrap
msgid "Function, simply put, is an instruction created by you."
msgstr ""
#. type: \b; header
#: ../E/function.txt:4
#, no-wrap
msgid "Main function"
msgstr ""
#. type: Plain text
#: ../E/function.txt:5
#, no-wrap
msgid "You probably already know how to create a function. Every program in CBOT must have a main function, which looks like this:"
msgstr ""
#. type: Source code
#: ../E/function.txt:7
#, no-wrap
msgid ""
"extern void object::ProgramName()\n"
"{\n"
"\t\n"
"\t// instructions\n"
"\t\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/function.txt:17
#, no-wrap
msgid "With functions you can divide your program into several parts. Each of them will execute a specific task. For example, see the following program:"
msgstr ""
#. type: Source code
#: ../E/function.txt:19
#, no-wrap
msgid ""
"extern void object::Remote()\n"
"{\n"
"\tsend(\"order\", 1, 100);\n"
"\twait(5);\n"
"\tsend(\"order\", 3, 100);\n"
"\twait(5);\n"
"\tsend(\"order\", 2, 100);\n"
"\twait(5);\n"
"\tsend(\"order\", 4, 100);\n"
"\twait(5);\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/function.txt:31
#, no-wrap
msgid "<code><a cbot|send>send</a></code> and <code><a cbot|wait>wait</a></code> are repeated several times. So it would be a good thing if we created a function that executes these two instructions:"
msgstr ""
#. type: Source code
#: ../E/function.txt:33
#, no-wrap
msgid ""
"void SendToPost(float op)\n"
"{\n"
"\tsend(\"order\", op, 100);\n"
"\twait(5);\n"
"}\n"
"\n"
"extern void object::Remote()\n"
"{\n"
"\tSendToPost(1);\n"
"\tSendToPost(3);\n"
"\tSendToPost(2);\n"
"\tSendToPost(4);\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/function.txt:47
#, no-wrap
msgid "Now the program is much easier to read. It is a good practice to split the program into several functions with self-describing names."
msgstr ""
#. type: \b; header
#: ../E/function.txt:49
#, no-wrap
msgid "Syntax"
msgstr ""
#. type: Source code
#: ../E/function.txt:51
#, no-wrap
msgid ""
"result_type FunctionName(optional_parameters)\n"
"{\n"
"\tbody\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/function.txt:56
#, no-wrap
msgid "Result <a cbot|type>type</a> should be <a cbot/void>void</a> if the function does not give any. Body is just a set of instructions. Function name must be created with the exact same rules applied to <a cbot|var>variables</a>."
msgstr ""
#. type: \t; header
#: ../E/function.txt:58
#, no-wrap
msgid "Parameters"
msgstr ""
#. type: Plain text
#: ../E/function.txt:59
#, no-wrap
msgid "A function can have parameters:"
msgstr ""
#. type: Source code
#: ../E/function.txt:61
#, no-wrap
msgid ""
"void Example(int a, float x, string s)\n"
"{\n"
"\tmessage(a);\n"
"\tmessage(x);\n"
"\tmessage(s);\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/function.txt:68
#, no-wrap
msgid "The <code>Example</code> function will receive an <a cbot|int>integer</a> <code>a</code>, a <a cbot|float>floating point number</a> <code>x</code> and a <a cbot|string>string</a> <code>s</code>. Parameters are \"passed by value\", that is the values of parameter variables in a function are copies of the values the caller specified as variables. If you pass an <code><a cbot|int>int</a></code> to a function, its parameter is a copy of whatever value was being passed as the argument, and the function can change its parameter value without affecting values in the code that invoked the function."
msgstr ""
#. type: Plain text
#: ../E/function.txt:70
#, no-wrap
msgid "If you pass a <a cbot|class>class</a> instance or an <a cbot|array>array</a> as parameter to a function, the function only receives a <a cbot|pointer>reference</a> to the instance or the array. That means if you modify the instance or the array in the function, the instance or the array that has been specified by the caller will be actually modified."
msgstr ""
#. type: \t; header
#: ../E/function.txt:72
#, no-wrap
msgid "Result"
msgstr ""
#. type: Plain text
#: ../E/function.txt:73
#, no-wrap
msgid "A function can also return a result with the <code><a cbot|return>return</a></code> instruction. Therefore the function must be declared no longer as <code><a cbot|void>void</a></code> but as an other <a cbot|type>type</a>:"
msgstr ""
#. type: Source code
#: ../E/function.txt:75
#, no-wrap
msgid ""
"float Average(float a, float b)\n"
"{\n"
"\treturn (a+b)/2;\n"
"}\n"
"\n"
"extern void object::Test( )\n"
"{\n"
"\tfloat value;\n"
"\tvalue = Average(2, 6);\n"
"\tmessage(value); // will display 4\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/function.txt:87
#, no-wrap
msgid "Some other examples:"
msgstr ""
#. type: Source code
#: ../E/function.txt:89
#, no-wrap
msgid ""
"float Pi()\n"
"{\n"
"\treturn 3.1415;\n"
"}\n"
"\n"
"string Sign(float a)\n"
"{\n"
"\tif (a > 0) return \"positive\";\n"
"\tif (a < 0) return \"negative\";\n"
"\treturn \"null\";\n"
"}"
msgstr ""
#. type: \b; header
#: ../E/function.txt:102
#, no-wrap
msgid "Overloading"
msgstr ""
#. type: Plain text
#: ../E/function.txt:103
#, no-wrap
msgid "You can declare several functions with the same name but different parameters:"
msgstr ""
#. type: Source code
#: ../E/function.txt:105
#, no-wrap
msgid ""
"float Pythagoras(float a, float b)\n"
"{\n"
"\treturn sqrt((a*a)+(b*b));\n"
"}\n"
"\n"
"float Pythagoras(float a, float b, float c)\n"
"{\n"
"\treturn sqrt((a*a)+(b*b)+(c*c));\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/function.txt:115
#, no-wrap
msgid "CBOT will call either the one or the other function depending on the parameters passed. They must be distinguishable, i.e. you can't declare two functions with the same name and parameter types in the exact same order, e.g. declaring <code>int Pythagoras(float b, float a)</code> will result in error. Note that result type does not matter."
msgstr ""
#. type: \b; header
#: ../E/function.txt:120
#, no-wrap
msgid "object::"
msgstr ""
#. type: Plain text
#: ../E/function.txt:121
#, no-wrap
msgid "Declaring a function as a part of the <a cbot|object>object</a> namespace gives it access to <code><a cbot|this>this</a></code> <a cbot|pointer>pointer</a>, in other words, to all available properties of the robot which the program is run on."
msgstr ""
#. type: Source code
#: ../E/function.txt:123
#, no-wrap
msgid ""
"void object::Example()\n"
"{\n"
"\tmessage(this.category);\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/object.txt:2
#, no-wrap
msgid "Use this type for variables that contain the characteristics of an object, be it a bot, a building, some raw material, an enemy, etc. Here are all properties of an object: "
msgstr ""
#. type: Plain text
#: ../E/object.txt:20
#, no-wrap
msgid "Also, some objects have additional methods (instructions). See them in <a cbot>the main list</a> in the <c/>\"Instructions specific for some objects\" section."
msgstr ""
#. type: Plain text
#: ../E/object.txt:23
#, no-wrap
msgid "The <n/><a cbot|category>category</a> of an object allows you to know what it is, f. ex. what kind of bot, building, enemy, etc."
msgstr ""
#. type: Source code
#: ../E/object.txt:61
#, no-wrap
msgid "<code>team</code>"
msgstr ""
#. type: Plain text
#: ../E/object.txt:62
#, no-wrap
msgid "The bot's team. Used in <a battles>code battles</a>. If the object has no team assigned (e.g. in no team-based levels, the object being a resource), this is equal to <code>0</code>."
msgstr ""
#. type: Source code
#: ../E/object.txt:64
#, no-wrap
msgid "<code>velocity</code>"
msgstr ""
#. type: Plain text
#: ../E/object.txt:65
#, no-wrap
msgid "Current velocity of the object. Should be treated as a three-dimensional vector."
msgstr ""
#. type: \b; header
#: ../E/pencolor.txt:1
#, no-wrap
msgid "Instruction <code>pencolor</code>"
msgstr ""
#. type: Source code
#: ../E/pencolor.txt:3
#, no-wrap
msgid "<c/>pencolor ( color );<n/>"
msgstr ""
#. type: Plain text
#: ../E/pencolor.txt:4
#, no-wrap
msgid "The instruction <c/>pencolor();<n/> instructs the bot to change the color of the pencil."
msgstr ""
#. type: \t; header
#: ../E/pencolor.txt:6 ../E/pendown.txt:6
#, no-wrap
msgid "color: <code><a cbot|int>int</a></code> (default value: <code>Black</code>)"
msgstr ""
#. type: Plain text
#: ../E/pencolor.txt:7 ../E/pendown.txt:7
#, no-wrap
msgid "<a cbot|colors>Color name</a>."
msgstr ""
#. type: Plain text
#: ../E/pencolor.txt:10
#, no-wrap
msgid ""
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <c/>pencolor();<n/>.\n"
"<code>== 0 </code>The color was changed\n"
"<code>!= 0 </code>The instruction did not work"
msgstr ""
#. type: \b; header
#: ../E/pendown.txt:1
#, no-wrap
msgid "Instruction <code>pendown</code>"
msgstr ""
#. type: Source code
#: ../E/pendown.txt:3
#, no-wrap
msgid "<c/>pendown ( color, width );<n/>"
msgstr ""
#. type: Plain text
#: ../E/pendown.txt:4
#, no-wrap
msgid "The instruction <c/>pendown();<n/> instructs the bot to have the pen down, so it starts drawing."
msgstr ""
#. type: \t; header
#: ../E/pendown.txt:9
#, no-wrap
msgid "width: <code><a cbot|float>float</a></code> (default value: <code>0.5</code>)"
msgstr ""
#. type: Plain text
#: ../E/pendown.txt:10 ../E/penwidth.txt:7
#, no-wrap
msgid "Width of the pen. The width cannot be higher than <code>1.0</code> and cannot be lower than <code>0.0</code>. Passing a higher value will result in the width being the highest possible and passing a lower value will result in the width being the lowest possible."
msgstr ""
#. type: Plain text
#: ../E/pendown.txt:13
#, no-wrap
msgid ""
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <c/>pendown();<n/>.\n"
"<code>== 0 </code>The pen is now down\n"
"<code>!= 0 </code>The instruction did not work"
msgstr ""
#. type: \b; header
#: ../E/penup.txt:1
#, no-wrap
msgid "Instruction <code>penup</code>"
msgstr ""
#. type: Source code
#: ../E/penup.txt:3
#, no-wrap
msgid "<c/>penup ( );<n/>"
msgstr ""
#. type: Plain text
#: ../E/penup.txt:4
#, no-wrap
msgid "The instruction <c/>penup();<n/> instructs the bot to have the pen up, so it stops drawing. The pen is up by default, so it should be used only after using <code><a cbot|pendown>pendown</a></code>."
msgstr ""
#. type: Plain text
#: ../E/penup.txt:7
#, no-wrap
msgid ""
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <c/>penup();<n/>.\n"
"<code>== 0 </code>The pen is now up\n"
"<code>!= 0 </code>The instruction did not work"
msgstr ""
#. type: \b; header
#: ../E/penwidth.txt:1
#, no-wrap
msgid "Instruction <code>penwidth</code>"
msgstr ""
#. type: Source code
#: ../E/penwidth.txt:3
#, no-wrap
msgid "<c/>penwidth ( color );<n/>"
msgstr ""
#. type: Plain text
#: ../E/penwidth.txt:4
#, no-wrap
msgid "The instruction <c/>penwidth();<n/> instructs the bot to change the width of the pencil."
msgstr ""
#. type: \t; header
#: ../E/penwidth.txt:6
#, no-wrap
msgid "width: <code><a cbot|float>float</a></code>"
msgstr ""
#. type: Plain text
#: ../E/penwidth.txt:10
#, no-wrap
msgid ""
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <c/>penwidth();<n/>.\n"
"<code>== 0 </code>The width was changed\n"
"<code>!= 0 </code>The instruction did not work"
msgstr ""
#. type: \b; header
#: ../E/pow.txt:1
#, no-wrap
msgid "Instruction <code>pow</code>"
msgstr ""
#. type: Source code
#: ../E/pow.txt:3
#, no-wrap
msgid "<c/>pow ( x, y );<n/>"
msgstr ""
#. type: Plain text
#: ../E/pow.txt:6
#, no-wrap
msgid "Base."
msgstr ""
#. type: Plain text
#: ../E/pow.txt:9
#, no-wrap
msgid "Exponent."
msgstr ""
#. type: Plain text
#: ../E/pow.txt:12
#, no-wrap
msgid "x to the y (x raised to the yth power)."
msgstr ""
#. type: Source code
#: ../E/radar.txt:15
#, no-wrap
msgid "<c/>radar ( cat, angle, focus, min, max, sens, filter );<n/>"
msgstr ""
#. type: Bullet: 'o'
#: ../E/radar.txt:24
#, no-wrap
msgid "<a cbot|array>Array</a> of categories of the objects that should be detected. For example, when you are looking only for grabbers:"
msgstr ""
#. type: Plain text
#: ../E/radar.txt:25 ../E/search.txt:10
#, no-wrap
msgid "<c/><s/>int bots[4];"
msgstr ""
#. type: Source code
#: ../E/radar.txt:26
#, no-wrap
msgid ""
"bots[0] = WheeledGrabber;\n"
"bots[1] = TrackedGrabber;\n"
"bots[2] = WingedGrabber;\n"
"bots[3] = LeggedGrabber;\n"
"object nearestGrabber = radar(bots);<n/>"
msgstr ""
#. type: Bullet: 'o'
#: ../E/radar.txt:31
#, no-wrap
msgid "Keyword <format const>Any</format> if you are looking for any object (including even plants and so on). Filters may be useful to use with this keyword."
msgstr ""
#. type: \t; header
#: ../E/radar.txt:33
#, no-wrap
msgid "angle: <code><a cbot|float>float</a></code> (default value: <code>0</code>)"
msgstr ""
#. type: \t; header
#: ../E/radar.txt:39
#, no-wrap
msgid "focus: <code><a cbot|float>float</a></code> (default value: <code>360</code>)"
msgstr ""
#. type: \t; header
#: ../E/radar.txt:42
#, no-wrap
msgid "min: <code><a cbot|float>float</a></code> (default value: <code>0</code>)"
msgstr ""
#. type: \t; header
#: ../E/radar.txt:45
#, no-wrap
msgid "max: <code><a cbot|float>float</a></code> (default value: <code>1000</code>)"
msgstr ""
#. type: \t; header
#: ../E/radar.txt:48
#, no-wrap
msgid "sens: <code><a cbot|float>float</a></code> (default value: <code>1</code>)"
msgstr ""
#. type: \t; header
#: ../E/radar.txt:51
#, no-wrap
msgid "filter: <code><a cbot|int>int</a></code> (default value: <code><format const>FilterNone</format></code>)"
msgstr ""
#. type: Plain text
#: ../E/radar.txt:52
#, no-wrap
msgid "Determines which type of objects should be detected. Especially useful in use with an <a cbot|array>array</a> or <format const>Any</format>. The following filters are available:"
msgstr ""
#. type: Plain text
#: ../E/radar.txt:54
#, no-wrap
msgid ""
"<code><format const>FilterNone</format> </code>Detects everything (default)\n"
"<code><format const>FilterOnlyLanding</format> </code>Detects only objects being on the ground\n"
"<code><format const>FilterOnlyFlying</format> </code>Detects only objects not being on the ground\n"
"<code><format const>FilterFriendly</format> </code>Detects only allies (objects in the same team)\n"
"<code><format const>FilterEnemy</format> </code>Detects only enemies (objects in an other team except neutral)\n"
"<code><format const>FilterNeutral</format> </code>Detects only neutral objects (e.g. resources)"
msgstr ""
#. type: Plain text
#: ../E/radar.txt:61
#, no-wrap
msgid "The last three are mainly useful in <a battles>code battles</a>. You can also pass a team ID to search only for objects from a specific team. Attention: you should use <format const>FilterNeutral</format> instead of <code>0</code> or else it will not work."
msgstr ""
#. type: Plain text
#: ../E/radar.txt:63
#, no-wrap
msgid "Filters and IDs can be mixed using bitwise OR operator <code>|</code>, for example <c/>radar(Any, 0, 360, 0, 1000, 1, 2 | FilterOnlyLanding);<n/> will only detect an object from team <code>2</code> that is on the ground. Attention: you can specify only one team ID at once, but you can specify several filters at once."
msgstr ""
#. type: \b; header
#: ../E/rand.txt:1
#, no-wrap
msgid "Instruction <code>rand</code>"
msgstr ""
#. type: Source code
#: ../E/rand.txt:3
#, no-wrap
msgid "<c/>rand ( );<n/>"
msgstr ""
#. type: Plain text
#: ../E/rand.txt:6
#, no-wrap
msgid "Pseudorandom number between 0 and 1 (including 0, but excluding 1)."
msgstr ""
#. type: \b; header
#: ../E/research.txt:1
#, no-wrap
msgid "Instruction <code>research</code>"
msgstr ""
#. type: \t; header
#: ../E/research.txt:7
#, no-wrap
msgid "type: <code><a cbot|int>int</a></code>"
msgstr ""
#. type: Plain text
#: ../E/research.txt:14
#, no-wrap
msgid ""
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <code>research()</code>.\n"
"<code>== 0 </code>The research successfully started\n"
"<code>!= 0 </code>The research could not be started (e.g. the research is disabled in the level, no power cell)"
msgstr ""
#. type: \b; header
#: ../E/researched.txt:1
#, no-wrap
msgid "Instruction <code>researched</code>"
msgstr ""
#. type: Source code
#: ../E/researched.txt:3
#, no-wrap
msgid "<c/>researched ( research );<n/>"
msgstr ""
#. type: \b; header
#: ../E/researches.txt:1
#, no-wrap
msgid "Value <code>Research names</code>"
msgstr ""
#. type: Plain text
#: ../E/researches.txt:2
#, no-wrap
msgid "Research names represent the types of available researches in the CBOT language. You can use them to control <a object|research>ResearchCenter</a> by passing them to appropriate instructions (e.g. <a cbot|research>research</a>, <a cbot|canresearch>canresearch</a>, <a cbot|researched>researched</a>)."
msgstr ""
#. type: Plain text
#: ../E/researches.txt:4
#, no-wrap
msgid "In a program, research names are always displayed on a <format const>red background</format>. If a research name is not highlighted in red, it is misspelled. Caps and lower cases should be kept as is."
msgstr ""
#. type: Plain text
#: ../E/researches.txt:6
#, no-wrap
msgid "Below are the different research names available."
msgstr ""
#. type: \t; header
#: ../E/researches.txt:8
#, no-wrap
msgid "Done by <a object|research>ResearchCenter</a>:"
msgstr ""
#. type: \t; header
#: ../E/researches.txt:19
#, no-wrap
msgid "Done by <a object|labo>AutoLab</a>:"
msgstr ""
#. type: \t; header
#: ../E/researches.txt:24
#, no-wrap
msgid "Impossible to research:"
msgstr ""
#. type: \b; header
#: ../E/round.txt:1
#, no-wrap
msgid "Instruction <code>round</code>"
msgstr ""
#. type: Source code
#: ../E/round.txt:3
#, no-wrap
msgid "<c/>round ( value );<n/>"
msgstr ""
#. type: Plain text
#: ../E/round.txt:4
#, no-wrap
msgid "Rounds a number."
msgstr ""
#. type: Plain text
#: ../E/round.txt:10
#, no-wrap
msgid "Rounded <code>value</code>. For example, <code>round(2.5)</code> is <code>3.0</code>, whereas <code>round(2.4)</code> is <code>2.0</code>."
msgstr ""
#. type: Plain text
#: ../E/round.txt:13
#, no-wrap
msgid "<a cbot|trunc>trunc</a>, <a cbot|floor>floor</a>, <a cbot|ceil>ceil</a>, <a cbot>programming</a>, <a cbot|type>types</a> and <a cbot|expr>expressions</a>."
msgstr ""
#. type: Plain text
#: ../E/search.txt:5
#, no-wrap
msgid "Detects the object of the given category that is closest to the given position. Similar to <c/><a cbot|radar>radar();</a><n/>, but can search starting from the specific point instead of the actual bot's position."
msgstr ""
#. type: Bullet: 'o'
#: ../E/search.txt:8
#, no-wrap
msgid "<a cbot|category>Category</a> of the objects that should be detected. For example, when you are looking for an ant, write <code>search(AlienAnt)</code>. "
msgstr ""
#. type: Bullet: 'o'
#: ../E/search.txt:9
#, no-wrap
msgid "<a cbot|array>Array</a> of categories of the objects that should be detected. For example, when you are looking only for grabbers, starting from a certain point in the level:"
msgstr ""
#. type: Source code
#: ../E/search.txt:11
#, no-wrap
msgid ""
"bots[0] = WheeledGrabber;\n"
"bots[1] = TrackedGrabber;\n"
"bots[2] = WingedGrabber;\n"
"bots[3] = LeggedGrabber;\n"
"point p(50, 24, 0);\n"
"object grabberNearestThePoint = search(bots, p);<n/>"
msgstr ""
#. type: \t; header
#: ../E/search.txt:19
#, no-wrap
msgid "position: <code><a cbot|point>point</a></code> (default value: <code><a cbot|this>this</a>.<a cbot|object>position</a></code>)"
msgstr ""
#. type: \b; header
#: ../E/sin.txt:1
#, no-wrap
msgid "Instruction <code>sin</code>"
msgstr ""
#. type: Source code
#: ../E/sin.txt:3
#, no-wrap
msgid "<c/>sin ( angle );<n/>"
msgstr ""
#. type: Plain text
#: ../E/sin.txt:9
#, no-wrap
msgid "Sine of the angle."
msgstr ""
#. type: \b; header
#: ../E/sqrt.txt:1
#, no-wrap
msgid "Instruction <code>sqrt</code>"
msgstr ""
#. type: Source code
#: ../E/sqrt.txt:3
#, no-wrap
msgid "<c/>sqrt ( value );<n/>"
msgstr ""
#. type: Plain text
#: ../E/sqrt.txt:6
#, no-wrap
msgid "Non-negative number."
msgstr ""
#. type: Plain text
#: ../E/sqrt.txt:9
#, no-wrap
msgid "Square root of the value."
msgstr ""
#. type: \b; header
#: ../E/switch.txt:1
#, no-wrap
msgid "Instructions <code>switch</code>, <code>case</code> and <code>default</code>"
msgstr ""
#. type: Plain text
#: ../E/switch.txt:2
#, no-wrap
msgid "With the instruction <code>switch() {}</code> you can execute a proper set of instructions (a case) basing on some value."
msgstr ""
#. type: Plain text
#: ../E/switch.txt:7
#, no-wrap
msgid "See the following <a cbot|function>function</a>: the bot will be <a cbot|wait>waiting</a> a proper amount of time for a certain task to be completed:"
msgstr ""
#. type: Source code
#: ../E/switch.txt:9
#, no-wrap
msgid ""
"public void WaitForTaskCompleted(object building)\n"
"{\n"
"\tint cat = building.category;\n"
"\t<a cbot|if>if</a> (cat == Converter) wait(15);\n"
"\telse if (cat == BotFactory) wait(15);\n"
"\telse if (cat == PowerPlant) wait(12);\n"
"\telse message(\"Undefined wait time\", DisplayError);\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/switch.txt:18
#, no-wrap
msgid "This function can be also written using the <code>switch() {}</code> instruction:"
msgstr ""
#. type: Source code
#: ../E/switch.txt:20
#, no-wrap
msgid ""
"public void WaitForTaskCompleted(object building)\n"
"{\n"
"\tswitch (building.category)\n"
"\t{\n"
"\t\tcase Converter: wait(15); break;\n"
"\t\tcase BotFactory: wait(15); break;\n"
"\t\tcase PowerPlant: wait(12); break;\n"
"\t\tdefault: message(\"Undefined wait time\", DisplayError);\n"
"\t}\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/switch.txt:31
#, no-wrap
msgid "Which way to write this kind of choice structures, is a matter of taste."
msgstr ""
#. type: Plain text
#: ../E/switch.txt:33
#, no-wrap
msgid "You can also make cases like this:"
msgstr ""
#. type: Source code
#: ../E/switch.txt:35
#, no-wrap
msgid ""
"switch (building.category)\n"
"{\n"
"\tcase Converter:\n"
"\tcase BotFactory:\n"
"\t\twait(15); break;\n"
"\tcase PowerPlant: wait(12); break;\n"
"\tdefault: message(\"Undefined wait time\", DisplayError);\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/switch.txt:44
#, no-wrap
msgid "<a object|convert>Converter</a> and <a object|factory>bot factory</a> have the same waiting time, so in order to not write the same instructions twice, we made multiple cases run the same code. In fact, all code after the highest case used will be executed if we do not <code><a cbot|break>break</a></code> it."
msgstr ""
#. type: Source code
#: ../E/switch.txt:48
#, no-wrap
msgid ""
"<c/>switch ( value )\n"
"{\n"
"\tcase value1: instructions1\n"
"\tcase value2: instructions2\n"
"\t...\n"
"\tcase valueN: instructionsN\n"
"\tdefault: instructionsDefault\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/switch.txt:57
#, no-wrap
msgid "With this conditional structure you can execute <code>instructions1</code> or <code>instructions2</code> ... or <code>instructionsN</code> or <code>instructionsDefault</code> depending on the <code>value</code>."
msgstr ""
#. type: Plain text
#: ../E/switch.txt:59
#, no-wrap
msgid ""
"If the <code>value</code> is equal to <code>value1</code>, <code>instructions1</code> to <code>N</code> (including <code>instructionsDefault</code>) are executed.\n"
"If the <code>value</code> is equal to <code>value2</code>, <code>instructions2</code> to <code>N</code> (including <code>instructionsDefault</code>) are executed.\n"
"And so on.\n"
"If the <code>value</code> is equal to <code>valueN</code>, <code>instructionsN</code> and <code>instructionsDefault</code> are executed.\n"
"If the <code>value</code> is not equal to any value in the given cases, <code>instructionsDefault</code> are executed."
msgstr ""
#. type: Plain text
#: ../E/switch.txt:65
#, no-wrap
msgid "You can exit from the the <code>switch() {}</code> instruction using <code><a cbot|break>break</a></code>."
msgstr ""
#. type: Plain text
#: ../E/switch.txt:68
#, no-wrap
msgid "Do not put a <a cbot|term>semicolon</a> at the end of the <code>switch ( ) { }</code> instruction."
msgstr ""
#. type: \b; header
#: ../E/takeoff.txt:1
#, no-wrap
msgid "Instruction <code>takeoff</code>"
msgstr ""
#. type: Plain text
#: ../E/takeoff.txt:11
#, no-wrap
msgid ""
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <code>takeoff()</code>.\n"
"<code>== 0 </code>Spaceship takes off\n"
"<code>!= 0 </code>Spaceship could not take off (e.g. mission is not finished yet)"
msgstr ""
#. type: \b; header
#: ../E/tan.txt:1
#, no-wrap
msgid "Instruction <code>tan</code>"
msgstr ""
#. type: Source code
#: ../E/tan.txt:3
#, no-wrap
msgid "<c/>tan ( angle );<n/>"
msgstr ""
#. type: Plain text
#: ../E/tan.txt:6
#, no-wrap
msgid "Angle in degrees (except multiples of 90)."
msgstr ""
#. type: Plain text
#: ../E/tan.txt:9
#, no-wrap
msgid "Tangent of the angle."
msgstr ""
#. type: \b; header
#: ../E/trunc.txt:1
#, no-wrap
msgid "Instruction <code>trunc</code>"
msgstr ""
#. type: Source code
#: ../E/trunc.txt:3
#, no-wrap
msgid "<c/>trunc ( value );<n/>"
msgstr ""
#. type: Plain text
#: ../E/trunc.txt:4
#, no-wrap
msgid "Truncation is a method of approximating a decimal number by dropping all decimal places past a certain point without rounding. For positive numbers, it works like the <c/><a cbot|floor>floor();</a><n/> function, and for negative numbers, it works like the <c/><a cbot|ceil>ceil();</a><n/> function. It can be said that it rounds towards zero."
msgstr ""
#. type: Plain text
#: ../E/trunc.txt:10
#, no-wrap
msgid "Truncated <code>value</code>. For example, <code>trunc(-2.5)</code> is <code>-2.00</code>."
msgstr ""
#. type: Plain text
#: ../E/category.txt:4
#, no-wrap
msgid "In a program, categories are always displayed like that: <format const>category</format>. If a category isn't highlighted, it is misspelled. Caps and lower cases should be kept as is."
msgstr ""
#. type: Plain text
#: ../E/type.txt:9
#, no-wrap
msgid "In a program, the name of a type is always displayed like that: <format type>type</format>. If the name of a type is not highlighted, this means that the name is misspelled. Type names are always written with lower case characters. Here is a list of the different types: "
msgstr ""
#. type: \b; header
#: ../E/produce.txt:1
#, no-wrap
msgid "Instruction <code>produce</code>"
msgstr ""
#. type: Source code
#: ../E/produce.txt:3
#, no-wrap
msgid "<c/>produce ( position, orientation, category, program, power );<n/>"
msgstr ""
#. type: Bullet: 'o'
#: ../E/produce.txt:4
#, no-wrap
msgid "r"
msgstr ""
#. type: Source code
#: ../E/produce.txt:5
#, no-wrap
msgid "<c/>produce ( category, power );<n/>"
msgstr ""
#. type: Plain text
#: ../E/produce.txt:7
#, no-wrap
msgid "Immediately creates an <a cbot|category>object</a>."
msgstr ""
#. type: \t; header
#: ../E/produce.txt:12
#, no-wrap
msgid "orientation: <code><a cbot|float>float</a></code>"
msgstr ""
#. type: Plain text
#: ../E/produce.txt:13
#, no-wrap
msgid "Orientation (angle) of the object."
msgstr ""
#. type: Plain text
#: ../E/produce.txt:16
#, no-wrap
msgid "<a cbot|category>Category</a> of the object."
msgstr ""
#. type: \t; header
#: ../E/produce.txt:18
#, no-wrap
msgid "program: <code><a cbot|string>string</a></code>"
msgstr ""
#. type: Plain text
#: ../E/produce.txt:22
#, no-wrap
msgid "Energy level."
msgstr ""
#. type: \t; header
#: ../E/produce.txt:24
#, no-wrap
msgid "Return: <code><a cbot|void>void</a></code>"
msgstr ""
#. type: Plain text
#: ../E/produce.txt:25
#, no-wrap
msgid "Nothing."
msgstr ""
#. type: \b; header
#: ../E/produce.txt:27
#, no-wrap
msgid "Example usage"
msgstr ""
#. type: Plain text
#: ../E/produce.txt:28
#, no-wrap
msgid "It is used by <a object|mother>AlienQueen</a> to produce <a object|egg>AlienEggs</a>."
msgstr ""
#. type: Plain text
#: ../E/produce.txt:10
#, no-wrap
msgid "Where object will be created. The second syntax creates the object at the current bot's position."
msgstr ""
#. type: Plain text
#: ../E/produce.txt:19
#, no-wrap
msgid "Program for the object. Will have effect only for programmable objects like robots or aliens."
msgstr ""
#. type: Plain text
#: ../E/expr.txt:2
#, no-wrap
msgid "Expressions are used for various calculations with many different variables, which return the desired result. What distinguishes them from standard instructions are operators, which are described below."
msgstr ""
#. type: \b; header
#: ../E/expr.txt:8
#, no-wrap
msgid "Binary operations"
msgstr ""
#. type: Plain text
#: ../E/expr.txt:9
#, no-wrap
msgid "Assuming that <code>a</code>, <code>b</code> can be values of declared and initialized variables of types <code>t1</code> and <code>t2</code>, the binary operations can be described as follows:"
msgstr ""
#. type: Source code
#: ../E/expr.txt:10
#, no-wrap
msgid "<code>r = a op b</code>"
msgstr ""
#. type: Plain text
#: ../E/expr.txt:11
#, no-wrap
msgid "Where <code>r</code> is the result of the operation and <code>op</code> is a binary operator which works with values of types <code>t1</code> and <code>t2</code>."
msgstr ""
#. type: \t; header
#: ../E/expr.txt:13
#, no-wrap
msgid "Order of operations"
msgstr ""
#. type: Plain text
#: ../E/expr.txt:14
#, no-wrap
msgid "Let <code>a op1 b op2 c</code> be a legal expression, then the following rules apply:"
msgstr ""
#. type: Bullet: 'o'
#: ../E/expr.txt:15
#, no-wrap
msgid "If <code>op1 == op2</code> or <code>op1</code> is as strong as <code>op2</code> or <code>op1</code> is stronger than <code>op2</code>, first calculate <code>a op1 b</code> and store its result in a temporary variable <code>r</code>, then calculate <code>r op2 c</code>, which is the final result of the expression."
msgstr ""
#. type: Bullet: 'o'
#: ../E/expr.txt:16
#, no-wrap
msgid "If <code>op1</code> is weaker than <code>op2</code>, first calculate <code>b op2 c</code> and store its result in a temporary variable <code>r</code>, then calculate <code>a op1 r</code>, which is the final result of the expression."
msgstr ""
#. type: Plain text
#: ../E/expr.txt:18
#, no-wrap
msgid "Note: an operation can be made stronger by surrounding it in brackets, so for example assuming that <code>op1</code> is weaker than <code>op2</code>, in an expression <code>(a op1 b) op2 c</code> the <code>a op1 b</code> operation will be executed first."
msgstr ""
#. type: Plain text
#: ../E/expr.txt:20
#, no-wrap
msgid "Tip: always use brackets if you are not sure about the order of operations, do not try to remember how strong are each of the operators. Generally it should be fairly obvious."
msgstr ""
#. type: Plain text
#: ../E/expr.txt:22
#, no-wrap
msgid ""
"Here is a complicated example, which uses arithemtic operations described below, showing how expressions are calculated:\n"
"<c/>Assume a, b, c, d, x, y, z, e are all initialized variables of type float or int. Then the following expression should be calculated the following way:\n"
" a * b + c - d / x % (y * z) - e =\n"
"= r1 + c - d / x % (y * z) - e = , r1 = a * b\n"
"= r2 - d / x % (y * z) - e = , r2 = r1 + c\n"
"= r2 - r3 % (y * z) - e = , r3 = d / x\n"
"= r2 - r3 % r4 - e = , r4 = y * z\n"
"= r2 - r5 - e = , r5 = r3 % r4\n"
"= r6 - e = , r6 = r2 - r5\n"
"= r7 , r7 = r6 - e\n"
"r7 is the final result of this expression."
msgstr ""
#. type: \b; header
#: ../E/expr.txt:35
#, no-wrap
msgid "Assignment operator"
msgstr ""
#. type: Plain text
#: ../E/expr.txt:36
#, no-wrap
msgid "<code>=</code> is the assignment operator. It is used to store the result of an expression in a variable."
msgstr ""
#. type: Plain text
#: ../E/expr.txt:38
#, no-wrap
msgid "On the left side of this operator there must be so called l-value and on the right side - r-value. L-values are just <a cbot|var>variables</a><n/>, r-values are expressions or just usual values. This makes the assignment operator kind of special, because what is l-value is pretty restrictive (it cannot be an expression, constant and so on, only single variable). Also, the type of l-value must match the type of r-value (unless a conversion is possible, for example assigning a <code><a cbot|float>float</a></code> to <code><a cbot|int>int</a></code>)."
msgstr ""
#. type: Source code
#: ../E/expr.txt:42
#, no-wrap
msgid ""
" float a;\n"
" float b = 2.0 * (a = 4.0); // b == 8.0"
msgstr ""
#. type: Plain text
#: ../E/expr.txt:45
#, no-wrap
msgid "This example is actually really confusing, but this property is actually useful, because it lets doing something like this:"
msgstr ""
#. type: Source code
#: ../E/expr.txt:47
#, no-wrap
msgid ""
" float a, b, c, d, e;\n"
" a = b = c = d = e = 1.0; // a == b == c == d == e == 1.0"
msgstr ""
#. type: \b; header
#: ../E/expr.txt:50
#, no-wrap
msgid "Basic arithmetic operations"
msgstr ""
#. type: Plain text
#: ../E/expr.txt:51
#, no-wrap
msgid "Binary operators below are working with fundamental number types (<code><a cbot|int>int</a></code>, <code><a cbot|float>float</a></code>)."
msgstr ""
#. type: \t; header
#: ../E/expr.txt:53 ../E/expr.txt:90 ../E/expr.txt:116 ../E/expr.txt:141 ../E/expr.txt:164
#, no-wrap
msgid "List"
msgstr ""
#. type: \t; header
#: ../E/expr.txt:60
#, no-wrap
msgid "Notes"
msgstr ""
#. type: Bullet: 'o'
#: ../E/expr.txt:61
#, no-wrap
msgid "The <code>*</code>, <code>/</code>, <code>%</code> are all stronger than <code>+</code> and <code>-</code>."
msgstr ""
#. type: Bullet: 'o'
#: ../E/expr.txt:62
#, no-wrap
msgid "The result <a cbot|type>type</a> is always <code><a cbot|float>float</a></code>. If <code>a</code> or <code>b</code> are of type <code><a cbot|int>int</a></code>, they are automatically converted to <code><a cbot|float>float</a></code>. Note: this means that results of intermediate calculations tends to be as precise as possible, the precision is lost only during converting the final (<code><a cbot|float>float</a></code>) result to <code><a cbot|int>int</a></code>, for example by the assignment <code>=</code> operator."
msgstr ""
#. type: \t; header
#: ../E/expr.txt:64
#, no-wrap
msgid "Real life examples"
msgstr ""
#. type: \t; header
#: ../E/expr.txt:82
#, no-wrap
msgid "Compound assignment operators"
msgstr ""
#. type: Plain text
#: ../E/expr.txt:83
#, no-wrap
msgid "Besides the <code>=</code> operator for variable assignment there are several compound-assignment operators."
msgstr ""
#. type: Plain text
#: ../E/expr.txt:85
#, no-wrap
msgid "The compound-assignment operators combine the <code>=</code> assignment operator with another binary operator such as <code>+</code> or <code>-</code>. Compound-assignment operators perform the operation specified by the additional operator and then assign the result to the left operand. For example, a compound-assignment expression such as"
msgstr ""
#. type: Source code
#: ../E/expr.txt:86
#, no-wrap
msgid "<code>lvalue += expression</code>"
msgstr ""
#. type: Source code
#: ../E/expr.txt:88
#, no-wrap
msgid "<code>lvalue = lvalue + expression</code>"
msgstr ""
#. type: \b; header
#: ../E/expr.txt:97
#, no-wrap
msgid "String concatenation"
msgstr ""
#. type: Plain text
#: ../E/expr.txt:98
#, no-wrap
msgid "If at least one of the values used with the <code>+</code> operator is a <a cbot|string>string</a>, then the operation of concatenation is performed. The result of the operator is then a string, which is created by joining end-to-end the string and the other value. If the other value is not a string, then it is converted to string beforehand."
msgstr ""
#. type: Source code
#: ../E/expr.txt:102
#, no-wrap
msgid ""
"\tstring s = \"a\" + \"bc\"; // returns \"abc\"\n"
"\tstring s = 1 + \"bc\"; // returns \"1bc\"\n"
"\tstring s = 2.5 + \"bc\"; // returns \"2.5bc\"\n"
"\tstring s = \"a\" + true; // returns \"atrue\""
msgstr ""
#. type: Plain text
#: ../E/expr.txt:107
#, no-wrap
msgid "Tip: the properties of the concatenation <code>+</code> operator is useful with the <a cbot|message>message();</a> function, because it does not work with other types than string. An empty string can be used together with a value in order to create a string, which actually can be passed to the <a cbot|message>message();</a> function:"
msgstr ""
#. type: \b; header
#: ../E/expr.txt:178
#, no-wrap
msgid "Prefix and postfix increment- and decrement operators"
msgstr ""
#. type: Plain text
#: ../E/expr.txt:181
#, no-wrap
msgid "For example to increment the variable <code>a</code> you can write"
msgstr ""
#. type: Source code
#: ../E/expr.txt:182
#, no-wrap
msgid "<c/>a++;<n/>"
msgstr ""
#. type: Plain text
#: ../E/expr.txt:183
#, no-wrap
msgid "instead of"
msgstr ""
#. type: Source code
#: ../E/expr.txt:184
#, no-wrap
msgid "<c/>a = a + 1;<n/>"
msgstr ""
#. type: Plain text
#: ../E/expr.txt:186
#, no-wrap
msgid "The result of the operation <code>a++</code> is the value of the variable <code>a</code> *before* the increment. If you use the prefix operator <code>++a</code> the result of the operation is the value of the variable <code>a</code> *after* the increment. The same holds for the <code>--</code> decrement operator."
msgstr ""
#. type: Plain text
#: ../E/expr.txt:4
#, no-wrap
msgid "Specifically speaking, an expression is an ordered series of operations which yield a result. Operations consist of operators, which are special <a cbot|function>functions</a> <code>T f(t1 x1, t2 x2, ..., tn xn)</code>, where <code>xi</code> is a value of type <code>ti</code>, and <code>T</code> is the result type. For example, <code>float +(float a, float b)</code> returns a sum of values <code>a</code> and <code>b</code>. Note: Operators are a part of the CBOT language and they cannot be defined in program. Also, the operators cannot be used as usual <a cbot|function>functions</a>, they need to be written using a special notation depending on the operator, for example <code>a+b</code>."
msgstr ""
#. type: Plain text
#: ../E/expr.txt:6
#, no-wrap
msgid "In nearly all operations, <a cbot>constants</a>, <a cbot|var>variables</a>, <a cbot|function>functions</a> returning non-<a cbot|void>void</a> type and also other operations can be used as values."
msgstr ""
#. type: Plain text
#: ../E/expr.txt:40
#, no-wrap
msgid "Note: it may be not obvious at first, but notice that <code>=</code> is an *operator* not an instruction. This mean that it can be used in the middle of an other expression! The result of <code>=</code> is the value which was assigned to the l-value - the result of the expression on the right. Example:"
msgstr ""
#. type: Source code
#: ../E/expr.txt:109
#, no-wrap
msgid ""
" float pi = 3.14;\n"
" // message(pi); // does not work\n"
" message(\"\"+pi);"
msgstr ""
#. type: Source code
#: ../E/expr.txt:190
#, no-wrap
msgid ""
" a = 2;\n"
" b = a++;\n"
" // now b contains 2 and a contains 3"
msgstr ""
#. type: Source code
#: ../E/expr.txt:194
#, no-wrap
msgid ""
" a = 2;\n"
" b = ++a;\n"
" // now b contains 3 and a contains 3"
msgstr ""
#. type: \b; header
#: ../E/expr.txt:138
#, no-wrap
msgid "Logical operators"
msgstr ""
#. type: Plain text
#: ../E/expr.txt:139
#, no-wrap
msgid "Logical operators work with values of type <a cbot|bool>bool</a> and they always return a <a cbot|bool>bool</a>. They are mainly used in <a cbot|cond>conditions</a>."
msgstr ""
#. type: \b; header
#: ../E/expr.txt:151
#, no-wrap
msgid "Ternary operator"
msgstr ""
#. type: Plain text
#: ../E/expr.txt:152
#, no-wrap
msgid ""
"The ternary operator is nothing more than a syntax sugar. It is also known as \"inline if\". It might be confusing at first, because its syntax is a little more complicated than other operators. It can be described as follows:\n"
"<code>(condition) ? (result when true) : (result when false)</code>\n"
"Brackets are not needed."
msgstr ""
#. type: Plain text
#: ../E/expr.txt:156
#, no-wrap
msgid "Firstly, the condition is valued and then the first result is returned if the condition is true, otherwise the second result is returned."
msgstr ""
#. type: \t; header
#: ../E/expr.txt:158 ../E/extends.txt:4 ../E/extends.txt:65 ../E/private.txt:4 ../E/protected.txt:4 ../E/super.txt:4
#, no-wrap
msgid "Example"
msgstr ""
#. type: Source code
#: ../E/expr.txt:159
#, no-wrap
msgid "<c/>float c = ((3.0 > 2.0) ? 10.0 : -10.0); // c == 10.0<n/>"
msgstr ""
#. type: Plain text
#: ../E/cond.txt:2
#, no-wrap
msgid "A condition is a special <a cbot|expr>expression</a> that returns a <a cbot|bool>boolean</a> value, that can only be either <code><a cbot|true>true</a></code> or <code><a cbot|false>false</a></code>. With a condition, you can choose f. ex. if the instructions in a <code><a cbot|while>while</a></code> loop must be repeated again, or if the instruction in a <code><a cbot|if>if</a></code> bloc must be executed."
msgstr ""
#. type: \b; header
#: ../E/expr.txt:113
#, no-wrap
msgid "Comparison operators"
msgstr ""
#. type: Plain text
#: ../E/expr.txt:114
#, no-wrap
msgid "Comparison operators work with values of type <a cbot|bool>float</a> and they always return a <a cbot|bool>bool</a>. They are mainly used in <a cbot|cond>conditions</a>."
msgstr ""
#. type: Plain text
#: ../E/expr.txt:142
#, no-wrap
msgid ""
"<code>!a </code>not <code>a</code>\n"
"<code>a && b </code><code>a</code> and <code>b</code>\n"
"<code>a || b </code><code>a</code> or <code>b</code>"
msgstr ""
#. type: Plain text
#: ../E/expr.txt:147
#, no-wrap
msgid ""
"<code>!false </code>returns true\n"
"<code>true && false </code>returns false \n"
"<code>true || false </code>returns true"
msgstr ""
#. type: \b; header
#: ../E/expr.txt:161
#, no-wrap
msgid "Bitwise operators"
msgstr ""
#. type: Plain text
#: ../E/expr.txt:162
#, no-wrap
msgid "Bitwise operators are similar to the logical operator, because they are operating on bits (which can be only 0 or 1, conditions can have a value only of false or true). So in theory, they should be working with basically any type of variable, because each value in the computer must be stored as a sequence of bits."
msgstr ""
#. type: Plain text
#: ../E/expr.txt:165
#, no-wrap
msgid ""
"<code>a & b </code><code>a</code> AND <code>b</code>\n"
"<code>a | b </code><code>a</code> OR <code>b</code>\n"
"<code>a ^ b </code><code>a</code> XOR <code>b</code>\n"
"<code>a >> b </code>shift bits of <code>a</code> to the right <code>b</code> times\n"
"<code>a << b </code>shift bits of <code>a</code> to the left <code>b</code> times"
msgstr ""
#. type: Plain text
#: ../E/expr.txt:172
#, no-wrap
msgid ""
"<code>2 & 1 </code>returns 0\n"
"<code>2 | 1 </code>returns 3\n"
"<code>2 ^ 2 </code>returns 0\n"
"<code>2 >> 1 </code>returns 1\n"
"<code>2 << 1 </code>returns 4"
msgstr ""
#. type: Source code
#: ../E/array.txt:4
#, no-wrap
msgid ""
"int [ ] a; // an array of int\n"
"int a [12]; // an array of int limited to 12 elements\n"
"string s[3]; // an array of 3 strings\n"
"float xy[][]; // a 2 dimensionnal array of floats"
msgstr ""
#. type: \b; header
#: ../E/array.txt:30
#, no-wrap
msgid "Initialization syntax"
msgstr ""
#. type: Plain text
#: ../E/array.txt:31
#, no-wrap
msgid "You can initialize a new array using the following syntax:"
msgstr ""
#. type: Source code
#: ../E/array.txt:33
#, no-wrap
msgid "type arrayName[] = { value0, value1, value2, ..., valueN };"
msgstr ""
#. type: Source code
#: ../E/array.txt:37
#, no-wrap
msgid ""
"int numbers[] = { 10, 20, 30 };\n"
"MyClass objects[] = { new MyClass(1), new MyClass(2) };"
msgstr ""
#. type: Plain text
#: ../E/radar.txt:2
#, no-wrap
msgid "With the instruction <c/>radar();<n/>, you can look for objects like <a object|mother>enemies</a>, bots, buildings or raw materials."
msgstr ""
#. type: Plain text
#: ../E/radar.txt:81
#, no-wrap
msgid "<c/><a cbot|radarall>radarall</a>();<n/>, <a cbot>programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/radarall.txt:1
#, no-wrap
msgid "Instruction <code>radarall</code>"
msgstr ""
#. type: Plain text
#: ../E/radarall.txt:2
#, no-wrap
msgid "<c/>radarall();<n/> is an enhancement of the <c/><a cbot|radar>radar</a>();<n/> function -- it detects all objects matching the given criteria."
msgstr ""
#. type: \b; header
#: ../E/radarall.txt:4
#, no-wrap
msgid "Example<c/>"
msgstr ""
#. type: Source code
#: ../E/radarall.txt:13
#, no-wrap
msgid "<c/>radarall ( cat, angle, focus, min, max, sens, filter );<n/>"
msgstr ""
#. type: Plain text
#: ../E/radarall.txt:15
#, no-wrap
msgid "The function works generally the same as the <c/><a cbot|radar>radar</a>();<n/> function with the only difference being that it returns an <a cbot|array>array</a> of <a cbot|object>objects</a> instead of one object. If no object is found, <code><a cbot|null>null</a></code> is returned."
msgstr ""
#. type: Plain text
#: ../E/radarall.txt:17
#, no-wrap
msgid "The order of objects in the returned array is sorted by distance and depends on the <code>sens</code> parameter. The first object in the array is the object which would be returned by the <c/>radar();<n/> function called with the exactly same parameters."
msgstr ""
#. type: Plain text
#: ../E/radarall.txt:20
#, no-wrap
msgid "<c/><a cbot|radar>radar</a>();<n/>, <a cbot>programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: Plain text
#: ../E/for.txt:11
#, no-wrap
msgid "This set of instructions is executed before the first loop instance."
msgstr ""
#. type: Plain text
#: ../E/for.txt:17
#, no-wrap
msgid "This set of instructions is executed at the end of every instance of the loop. "
msgstr ""
#. type: \t; header
#: ../E/for.txt:38
#, no-wrap
msgid "Executing more instructions"
msgstr ""
#. type: Plain text
#: ../E/for.txt:39
#, no-wrap
msgid "In the <code>before</code> and <code>end</code> part of a <code>for</code> loop you can specify more than one instruction by using comma. Example:"
msgstr ""
#. type: Source code
#: ../E/for.txt:41
#, no-wrap
msgid ""
"int i = 0;\n"
"int j;\n"
"for (i++, j = 2; i < 3 && j > 0; i++, j--)\n"
"{\n"
" message(i);\n"
" message(j);\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/for.txt:49
#, no-wrap
msgid "The output of the above code is <code>1 2 2 1</code>."
msgstr ""
#. type: Source code
#: ../E/radarall.txt:5
#, no-wrap
msgid ""
"object[] items = radarall(PowerCell);\n"
"for (int i = 0; i < sizeof(items); ++i)\n"
"{\n"
" message(items[i].id);\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/category.txt:108
#, no-wrap
msgid ""
" <code><a object|flag>BlueFlag</a> </code>Blue Flag\n"
" <code><a object|flag>RedFlag</a> </code>Red Flag\n"
" <code><a object|flag>GreenFlag</a> </code>Green Flag\n"
" <code><a object|flag>YellowFlag</a> </code>Yellow Flag\n"
" <code><a object|flag>VioletFlag</a> </code>Violet Flag\n"
" <code><a object|waypoint>WayPoint</a> </code>Checkpoint\n"
" <code><a object|target2>Target2</a> </code>Flying checkpoint\n"
" <code><a object|enerspot>PowerSpot</a> </code>Underground Energy Deposit\n"
" <code><a object|stonspot>TitaniumSpot</a> </code>Underground Titanium Deposit\n"
" <code><a object|uranspot>UraniumSpot</a> </code>Underground Uranium Deposit"
msgstr ""
#. type: Plain text
#: ../E/category.txt:10
#, no-wrap
msgid ""
"<button 176/> <code><a object|huston>Houston</a> </code>Mission Control\n"
"<button 171/> <code><a object|base>SpaceShip</a> </code>Spaceship\n"
"<button 160/> <code><a object|factory>BotFactory</a> </code>Robot Factory\n"
"<button 163/> <code><a object|research>ResearchCenter</a> </code>Research Center\n"
"<button 168/> <code><a object|radar>RadarStation</a> </code>Radar\n"
"<button 172/> <code><a object|exchange>ExchangePost</a> </code>Information Exchange Post\n"
"<button 169/> <code><a object|repair>RepairCenter</a> </code>Repair Center\n"
"<button 165/> <code><a object|tower>DefenseTower</a> </code>Defense Tower\n"
"<button 166/> <code><a object|labo>AutoLab</a> </code>Organic Matter Analyzer \n"
"<button 164/> <code><a object|station>PowerStation</a> </code>Power Station\n"
"<button 167/> <code><a object|energy>PowerPlant</a> </code>Power Cell Factory\n"
"<button 170/> <code><a object|nuclear>NuclearPlant</a> </code>Nuclear Plant\n"
"<button 162/> <code><a object|convert>Converter</a> </code>Titanium Converter\n"
"<button 161/> <code><a object|derrick>Derrick</a> </code>Derrick\n"
"<button 174/> <code><a object|captor>PowerCaptor</a> </code>Parabolic Lightning Conductor\n"
"<button 175/> <code><a object|safe>Vault</a> </code>Vault\n"
" <code><a object|start>StartArea</a> </code>Starting Pad\n"
" <code><a object|goal>GoalArea</a> </code>Finishing Pad\n"
" <code><a object|target1>Target1</a> </code>Flying target\n"
" <code><a object|nest>AlienNest</a> </code>Alien Nest"
msgstr ""
#. type: Plain text
#: ../E/class.txt:10
#, no-wrap
msgid "Classes can be only <a cbot|public>public</a>. This means that they can be used by all bots in a mission."
msgstr ""
#. type: \b; header
#: ../E/class.txt:12
#, no-wrap
msgid "Class Members"
msgstr ""
#. type: Plain text
#: ../E/class.txt:13
#, no-wrap
msgid "Class members are fields (<a cbot|var>variables</a>) and methods (<a cbot|function>functions</a>)."
msgstr ""
#. type: Plain text
#: ../E/class.txt:15
#, no-wrap
msgid "For example, the following class dubbed <code>MyClass</code> contains 4 fields (<code>a</code>, <code>b</code>, <code>x</code> and <code>s</code>) and one method (<code>MyFunction</code>)."
msgstr ""
#. type: Source code
#: ../E/class.txt:17
#, no-wrap
msgid ""
"public class MyClass\n"
"{\n"
"\tint a, b;\n"
"\tfloat x = 3.33;\n"
"\tstring s = \"hello\";\n"
"\tfloat MyFunction(float value)\n"
"\t{\n"
"\t\treturn (value * x) - 1;\n"
"\t}\n"
"}"
msgstr ""
#. type: \t; header
#: ../E/class.txt:55
#, no-wrap
msgid "Member Initialization"
msgstr ""
#. type: Plain text
#: ../E/class.txt:60
#, no-wrap
msgid "Example:<c/>"
msgstr ""
#. type: Source code
#: ../E/class.txt:61
#, no-wrap
msgid ""
"public class MyClass\n"
"{\n"
"\tint a, b;\n"
"\tvoid MyClass()\n"
"\t{\n"
"\t\ta = 2; b = 3;\n"
"\t}\n"
"\tvoid MyClass(int a, int b)\n"
"\t{\n"
"\t\tthis.a = a; this.b = b;\n"
"\t}\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/class.txt:76
#, no-wrap
msgid "As the names of the parameters of the second constructor are the same as the names of the two members <code>a</code> and <code>b</code>, we must use the <code><a cbot|this>this</a></code> <a cbot|pointer>reference</a> to avoid confusion with the parameters' names."
msgstr ""
#. type: \b; header
#: ../E/class.txt:78
#, no-wrap
msgid "Object Creation"
msgstr ""
#. type: Plain text
#: ../E/class.txt:79
#, no-wrap
msgid "You can create objects of type <code>YourClass</code> using the <code><a cbot|new>new</a></code> keyword. Example:"
msgstr ""
#. type: \b; header
#: ../E/class.txt:90
#, no-wrap
msgid "Object Destruction"
msgstr ""
#. type: \b; header
#: ../E/class.txt:114
#, no-wrap
msgid "Passing Objects to Functions"
msgstr ""
#. type: Plain text
#: ../E/class.txt:115
#, no-wrap
msgid "Objects in CBOT are passed by <a cbot|pointer>reference</a>. This means that when an object is passed to a <a cbot|function>function</a>, the function receives a copy of a pointer to the instance, not a copy of the object, so any modifications on the object will be visible outside of the function."
msgstr ""
#. type: \b; header
#: ../E/class.txt:117
#, no-wrap
msgid "Inheritance"
msgstr ""
#. type: Plain text
#: ../E/class.txt:118
#, no-wrap
msgid "A class can inherit public and protected members of another class by using the <code><a cbot|extends>extends</a></code> keyword."
msgstr ""
#. type: Plain text
#: ../E/class.txt:2
#, no-wrap
msgid "This keyword allows you to create a class definition by using the following syntax:"
msgstr ""
#. type: \t; header
#: ../E/class.txt:9
#, no-wrap
msgid "All Classes Are Public"
msgstr ""
#. type: \t; header
#: ../E/class.txt:52
#, no-wrap
msgid "Class Members Modifiers"
msgstr ""
#. type: \t; header
#: ../E/class.txt:75
#, no-wrap
msgid "Using <code><a cbot|this>this</a></code>"
msgstr ""
#. type: Source code
#: ../E/class.txt:81
#, no-wrap
msgid ""
"extern void object::Test()\n"
"{\n"
"\tMyClass object1(); // Call default constructor (without parameters)\n"
"\tMyClass object2(4, 5); // Call constructor with two int parameters\n"
"\tMyClass object3; // No constructor called, object3 == null\n"
"\tobject3 = new MyClass(); // We call constructor now, object3 != null\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/class.txt:91
#, no-wrap
msgid "You can also define a destructor. This must be a <code><a cbot|void>void</a></code> fonction without parameters, which has the same name as the class but prefixed with the <code>~</code> character. The destructor is called automatically as soon as the class instance is no more referenced by anyone. Example:"
msgstr ""
#. type: Source code
#: ../E/class.txt:93
#, no-wrap
msgid ""
"public class MyClass\n"
"{\n"
"\tstatic private int counter = 0; // instance counter\n"
"\tvoid MyClass( )\n"
"\t{\n"
"\t\tcounter++; // one instance more\n"
"\t}\n"
"\tvoid ~MyClass( )\n"
"\t{\n"
"\t\tcounter--; // one instance less\n"
"\t}\n"
"}\n"
"extern void object::Test()\n"
"{\n"
"\t // counter == 0\n"
"\tMyClass item1( ); // counter == 1\n"
"\tMyClass item2( ); // counter == 2\n"
"\titem1 = null; // counter == 1\n"
"}\n"
"// counter == 0"
msgstr ""
#. type: \b; header
#: ../E/class.txt:28
#, no-wrap
msgid "Accessing Class Members"
msgstr ""
#. type: Plain text
#: ../E/class.txt:29
#, no-wrap
msgid "Class members can be accessed outside of the class definition by using the <code>.</code> operator. Example:"
msgstr ""
#. type: Plain text
#: ../E/class.txt:50
#, no-wrap
msgid "Class members are <a cbot|public>public</a> by default, which means that they are accessible outside of the class definition. They can also be declared as <code><a cbot|private>private</a></code> or <code><a cbot|protected>protected</a></code>. Such members can only be accessed inside of the class definition."
msgstr ""
#. type: Plain text
#: ../E/class.txt:53
#, no-wrap
msgid "Fields and methods can also be declared as <code><a cbot|static>static</a></code>. Methods can be additionaly declared as <code><a cbot|synchro>synchronized</a></code>."
msgstr ""
#. type: Plain text
#: ../E/class.txt:58
#, no-wrap
msgid "Another way of initiliazing fields is by defining a constructor which is a special method having the same name as the class. This method will be called automatically at <a cbot|new>creation</a> time of a class instance. Constructors can be <a cbot|function>overloaded</a>."
msgstr ""
#. type: Source code
#: ../E/class.txt:31
#, no-wrap
msgid ""
"public class MyClass\n"
"{\n"
"\tint myField = 0;\n"
"\tint MyFunction()\n"
"\t{\n"
"\t\treturn myField * 2;\n"
"\t}\n"
"}\n"
"\n"
"extern void object::Test()\n"
"{\n"
"\tMyClass myObject();\n"
"\tmyObject.myField = 10;\n"
"\tmessage(myObject.MyFunction()); // 20\n"
"\tMyClass mySecondObject();\n"
"\tmySecondObject.myField = myObject.myField - 2;\n"
"\tmessage(mySecondObject.MyFunction()); // 16\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/class.txt:121
#, no-wrap
msgid ""
"<code><a cbot|public>public</a></code>, <code><a cbot|private>private</a></code>, <code><a cbot|protected>protected</a></code>, <code><a cbot|static>static</a></code>, <code><a cbot|synchro>synchronized</a></code>, <code><a cbot|new>new</a></code>, <code><a cbot|pointer>reference</a></code>, <code><a cbot|this>this</a></code>, <code><a cbot|super>super</a></code>, <code><a cbot|extends>extends</a></code>\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/protected.txt:1
#, no-wrap
msgid "Keyword <code>protected</code>"
msgstr ""
#. type: Plain text
#: ../E/protected.txt:2
#, no-wrap
msgid "This is an access modifier for <a cbot|class>class</a> members. Protected class members can be accessed in a child class, but they can't be accessed outside of classes definitions being part of the same inheritance tree (see the <code><a cbot|extends>extends</a></code> keyword)."
msgstr ""
#. type: Source code
#: ../E/protected.txt:6
#, no-wrap
msgid ""
"public class Parent\n"
"{\n"
"\tprotected int field = 0;\n"
"}\n"
"\n"
"public class Child extends Parent\n"
"{\n"
"\tvoid Print()\n"
"\t{\n"
"\t\tmessage(field);\n"
"\t}\n"
"}\n"
"\n"
"extern void object::Test()\n"
"{\n"
"\tChild child();\n"
"\tchild.Print(); // 0\n"
"\t//child.field = 1; // Error!\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/private.txt:2
#, no-wrap
msgid "This is an access modifier for <a cbot|class>class</a> members. Private members are not accessible outside of the class definition."
msgstr ""
#. type: Plain text
#: ../E/private.txt:20
#, no-wrap
msgid ""
"<code><a cbot|class>class</a></code>, <code><a cbot|public>public</a></code>, <code><a cbot|protected>protected</a></code>\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: Plain text
#: ../E/public.txt:34
#, no-wrap
msgid "<code>public</code> is also an access modifier for <a cbot|class>class</a> members, which is the default one. Public members can be accessed from outside of the class definition."
msgstr ""
#. type: Plain text
#: ../E/public.txt:50
#, no-wrap
msgid ""
"<code><a cbot|class>class</a></code>, <code><a cbot|private>private</a></code>, <code><a cbot|protected>protected</a></code>, <code><a cbot|function>functions</a></code>\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: Plain text
#: ../E/protected.txt:27
#, no-wrap
msgid ""
"<code><a cbot|class>class</a></code>, <code><a cbot|public>public</a></code>, <code><a cbot|private>private</a></code>, <code><a cbot|extends>extends</a></code>\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/super.txt:1
#, no-wrap
msgid "Keyword <code>super</code>"
msgstr ""
#. type: Plain text
#: ../E/super.txt:46
#, no-wrap
msgid ""
"<code><a cbot|class>class</a></code>, <code><a cbot|this>this</a></code>\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: Plain text
#: ../E/this.txt:53
#, no-wrap
msgid ""
"<code><a cbot|class>class</a></code>, <code><a cbot|super>super</a></code>\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/extends.txt:1
#, no-wrap
msgid "Keyword <code>extends</code>"
msgstr ""
#. type: \b; header
#: ../E/extends.txt:30
#, no-wrap
msgid "Inherited Members"
msgstr ""
#. type: Plain text
#: ../E/extends.txt:31
#, no-wrap
msgid "Only <code><a cbot|public>public</a></code> and <code><a cbot|protected>protected</a></code> members are inherited. <code><a cbot|private>private</a></code> members are directly inaccessible even for a child, although they can be accessed indirectly through inherited methods."
msgstr ""
#. type: Plain text
#: ../E/extends.txt:33
#, no-wrap
msgid "Constructors and destructors are not inherited, however, they can be overriden."
msgstr ""
#. type: \b; header
#: ../E/extends.txt:35
#, no-wrap
msgid "Method Overriding"
msgstr ""
#. type: Plain text
#: ../E/extends.txt:36
#, no-wrap
msgid "Inherited methods can be overriden (redefined) in the child class definition. Example:"
msgstr ""
#. type: Source code
#: ../E/extends.txt:38
#, no-wrap
msgid ""
"public class Parent\n"
"{\n"
"\tvoid foo()\n"
"\t{\n"
"\t\tmessage(\"foo\");\n"
"\t}\n"
"}\n"
"\n"
"public class Child extends Parent\n"
"{\n"
"\tvoid foo()\n"
"\t{\n"
"\t\tmessage(\"bar\");\n"
"\t}\n"
"}\n"
"\n"
"extern void object::Test()\n"
"{\n"
"\tChild child();\n"
"\tchild.foo(); // Will show \"bar\"\n"
"}"
msgstr ""
#. type: \b; header
#: ../E/extends.txt:62
#, no-wrap
msgid "Polymorphism"
msgstr ""
#. type: Plain text
#: ../E/extends.txt:63
#, no-wrap
msgid "<code><a cbot|pointer>Reference</a></code> of type Parent can point to an object of type Child. However, such a pointer can't be used to access a child member. In order to access a child member, it must be assured that the Parent reference really points to a Child object. If that's the case, it can be safely copied to a pointer of type Child, which has access to the child members."
msgstr ""
#. type: Source code
#: ../E/extends.txt:67
#, no-wrap
msgid ""
"public class Parent\n"
"{\n"
"\tvoid foo()\n"
"\t{\n"
"\t\tmessage(\"foo\");\n"
"\t}\n"
"}\n"
"\n"
"public class Child extends Parent\n"
"{\n"
"\tvoid foo()\n"
"\t{\n"
"\t\tmessage(\"bar\");\n"
"\t}\n"
"\tvoid bar()\n"
"\t{\n"
"\t\tmessage(\"foo bar\");\n"
"\t}\n"
"}\n"
"\n"
"extern void object::Test()\n"
"{\n"
"\tParent people[2];\n"
"\tpeople[0] = new Parent();\n"
"\tpeople[1] = new Child();\n"
"\tfor (int i = 0; i < 2; ++i)\n"
"\t{\n"
"\t\tpeople[i].foo();\n"
"\t}\n"
"\t//people[1].bar(); // Error\n"
"\tChild child = people[1];\n"
"\tchild.bar(); // OK\n"
"}"
msgstr ""
#. type: \b; header
#: ../E/extends.txt:102
#, no-wrap
msgid "Multiple Inheritance"
msgstr ""
#. type: Plain text
#: ../E/extends.txt:103
#, no-wrap
msgid "A child cannot have multiple parents, however, a parent can have many children."
msgstr ""
#. type: Plain text
#: ../E/extends.txt:106
#, no-wrap
msgid ""
"<code><a cbot|class>class</a></code>, <code><a cbot|public>public</a></code>, <code><a cbot|private>private</a></code>, <code><a cbot|protected>protected</a></code>, <code><a cbot|new>new</a></code>, <code><a cbot|pointer>reference</a></code>, <code><a cbot|this>this</a></code>, <code><a cbot|super>super</a></code>\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: Plain text
#: ../E/super.txt:2
#, no-wrap
msgid "This keyword is similar to <code><a cbot|this>this</a></code>, however, it grants access to methods from the parent class (see the <code><a cbot|extends>extends</a></code> keyword), which is especially useful for method overriding."
msgstr ""
#. type: Source code
#: ../E/super.txt:6
#, no-wrap
msgid ""
"public class Parent\n"
"{\n"
"\tprotected int field;\n"
"\t\n"
"\tvoid Parent()\n"
"\t{\n"
"\t\tfield = 0;\n"
"\t}\n"
"\t\n"
"\tvoid Print()\n"
"\t{\n"
"\t\tmessage(\"Parent's field: \" + field);\n"
"\t}\n"
"}\n"
"\n"
"public class Child extends Parent\n"
"{\n"
"\tprivate int childsField;\n"
"\t\n"
"\tvoid Child()\n"
"\t{\n"
"\t\tsuper.Parent();\n"
"\t\tchildsField = field + 1;\n"
"\t}\n"
"\t\n"
"\tvoid Print()\n"
"\t{\n"
"\t\tsuper.Print();\n"
"\t\tmessage(\"Child's field: \" + childsField);\n"
"\t}\n"
"}\n"
"\n"
"extern void object::Test()\n"
"{\n"
"\tChild child();\n"
"\tchild.Print(); // Will show both 0 and 1\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/extends.txt:2
#, no-wrap
msgid "This keyword is used in a <code><a cbot|class>class</a></code> definition when we want the class to inherit members from another class. The class which is extended we usually call a parent or base, the extending class we call a child."
msgstr ""
#. type: Source code
#: ../E/extends.txt:6
#, no-wrap
msgid ""
"public class Parent\n"
"{\n"
"\tvoid foo()\n"
"\t{\n"
"\t\tmessage(\"foo\");\n"
"\t}\n"
"}\n"
"\n"
"public class Child extends Parent\n"
"{\n"
"\tvoid bar()\n"
"\t{\n"
"\t\tmessage(\"bar\");\n"
"\t}\n"
"}\n"
"\n"
"extern void object::Test()\n"
"{\n"
"\tChild child();\n"
"\tchild.foo(); // Will show \"foo\"\n"
"\tchild.bar(); // Will show \"bar\"\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/extends.txt:60
#, no-wrap
msgid "A parent's method can be called inside an overriden method by using the <code><a cbot|super>super</a></code> keyword."
msgstr ""
#. type: Plain text
#: ../E/class.txt:56
#, no-wrap
msgid "As shown in the previous example, the class members can be initialized in the class definition (<c/>int x = 3.33;<n/>)."
msgstr ""
#. type: Plain text
#: ../E/open.txt:13
#, no-wrap
msgid ""
"<code>\"r\"</code> mode: open for reading.\n"
"<code>\"w\"</code> mode: open for writing.\n"
"<code>\"a\"</code> mode: open for appending."
msgstr ""
#. type: Plain text
#: ../E/openfile.txt:2
#, no-wrap
msgid "<c/>openfile();<n/> opens an text file in the files/ folder. This is not a method of the <code><a cbot|file>file</a></code> class but openfile returns a <a cbot|pointer>reference</a> to a new instance of the file class. You must supply two parameters, the filename and the opening mode."
msgstr ""
#. type: Plain text
#: ../E/openfile.txt:6
#, no-wrap
msgid ""
"<code>\"r\"</code> mode: open for reading.\n"
"<code>\"w\"</code> mode: open for writing.\n"
"<code>\"w\"</code> mode: open for appending."
msgstr ""
#. type: Plain text
#: ../E/function.txt:14
#, no-wrap
msgid "Nothing but a name can be changed in the main function. The keyword <code><a cbot|extern>extern</a></code> distinguishes the main function from others."
msgstr ""
#. type: \b; header
#: ../E/function.txt:117
#, no-wrap
msgid "Public Functions"
msgstr ""
#. type: \b; header
#: ../E/function.txt:129
#, no-wrap
msgid "Default Parameters"
msgstr ""
#. type: Plain text
#: ../E/function.txt:130
#, no-wrap
msgid "Last function parameters can have default values that can be omitted when calling."
msgstr ""
#. type: Source code
#: ../E/function.txt:132
#, no-wrap
msgid ""
"float Add(float a = 0.0, float b = 0.0)\n"
"{\n"
"\treturn a + b;\n"
"}\n"
"\n"
"// Somewhere in the main program...\n"
"Add(); // Will return 0.0\n"
"Add(2.0); // Will return 2.0\n"
"Add(2.0, 3.0); // Will return 5.0\n"
"// ..."
msgstr ""
#. type: \t; header
#: ../E/function.txt:144
#, no-wrap
msgid "Default Parameters and Overloading"
msgstr ""
#. type: Plain text
#: ../E/function.txt:145
#, no-wrap
msgid "Functions with default parameters still can be overloaded, one must only ensure that function calls are not ambiguous. For example, consider the following code:"
msgstr ""
#. type: Source code
#: ../E/function.txt:147
#, no-wrap
msgid ""
"float Add(float a = 0.0, float b = 0.0)\n"
"{\n"
"\treturn a + b;\n"
"}\n"
"\n"
"string Add(string a = \"\", string b = \"\")\n"
"{\n"
"\treturn a + b;\n"
"}\n"
"\n"
"// Somewhere in the main program...\n"
"Add(); // Compilation error: ambiguous call\n"
"Add(\"\"); // Ok\n"
"Add(0.0); // Ok\n"
"// ..."
msgstr ""
#. type: Plain text
#: ../E/function.txt:163
#, no-wrap
msgid "Note that in the above example overloading causes the first default parameter to be useless as caller needs to pass it anyway in order to distinguish the two functions."
msgstr ""
#. type: Plain text
#: ../E/category.txt:70
#, no-wrap
msgid ""
"<button 192/> <code><a object|botbr>WheeledBuilder</a> </code>Wheeled Builder\n"
"<button 193/> <code><a object|botbc>TrackedBuilder</a> </code>Tracked Builder\n"
"<button 194/> <code><a object|botbj>WingedBuilder</a> </code>Winged Builder\n"
"<button 195/> <code><a object|botbs>LeggedBuilder</a> </code>Legged Builder"
msgstr ""
#. type: Plain text
#: ../E/build.txt:2
#, no-wrap
msgid "The instruction <c/>build();<n/> instructs the bot to build a building of a given <a cbot|category>category</a>."
msgstr ""
#. type: Plain text
#: ../E/build.txt:5
#, no-wrap
msgid "Here is a program that looks for the nearest <a object|titan>titanium cube</a>, approaches it, and builds a <a object|factory>bot factory</a>."
msgstr ""
#. type: Plain text
#: ../E/build.txt:26
#, no-wrap
msgid ""
"<code><a cbot|canbuild>canbuild</a></code>, <code><a cbot|buildingenabled>buildingenabled</a></code>.\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: Plain text
#: ../E/buildingenabled.txt:2
#, no-wrap
msgid "The instruction <c/>buildingenabled();<n/> lets you know if a building of a given <a cbot|category>category</a> can be built during current mission."
msgstr ""
#. type: Plain text
#: ../E/buildingenabled.txt:23
#, no-wrap
msgid ""
"<code><a cbot|build>build</a></code>, <code><a cbot|canbuild>canbuild</a></code>.\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: Plain text
#: ../E/canbuild.txt:2
#, no-wrap
msgid "The instruction <c/>canbuild();<n/> lets you know if <a object|botbr>Builders</a>, <a object|human>Me</a> or <a object|human>Tech</a> can build a building of a given <a cbot|category>category</a>."
msgstr ""
#. type: Plain text
#: ../E/canbuild.txt:23
#, no-wrap
msgid ""
"<code><a cbot|build>build</a></code>, <code><a cbot|buildingenabled>buildingenabled</a></code>.\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: Plain text
#: ../E/canresearch.txt:5
#, no-wrap
msgid "Checks if a <a cbot|researches>research</a> can be done during current mission."
msgstr ""
#. type: Plain text
#: ../E/canresearch.txt:15
#, no-wrap
msgid ""
"<a cbot|researches>Research names</a>, <code><a cbot|research>research</a></code>, <code><a cbot|researched>researched</a></code>.\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: Source code
#: ../E/factory.txt:3
#, no-wrap
msgid "<c/>factory ( cat, program, object );<n/>"
msgstr ""
#. type: Plain text
#: ../E/factory.txt:5
#, no-wrap
msgid "Starts a construction of a bot of a given <a cbot|category>category</a> and runs a specified program on it after the construction is finished."
msgstr ""
#. type: Plain text
#: ../E/factory.txt:14
#, no-wrap
msgid "<a object|factory>BotFactory</a>, nearest by default."
msgstr ""
#. type: Plain text
#: ../E/factory.txt:62
#, no-wrap
msgid ""
"<code><a cbot|researched>researched</a></code>, <code><a cbot|wait>wait</a></code>.\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: \b; header
#: ../E/isbusy.txt:1
#, no-wrap
msgid "Instruction <code>isbusy</code>"
msgstr ""
#. type: Source code
#: ../E/isbusy.txt:3
#, no-wrap
msgid "<c/>isbusy ( object );<n/>"
msgstr ""
#. type: Plain text
#: ../E/isbusy.txt:5
#, no-wrap
msgid "Checks if a given object is busy."
msgstr ""
#. type: Source code
#: ../E/research.txt:3
#, no-wrap
msgid "<c/>research ( type, object );<n/>"
msgstr ""
#. type: Plain text
#: ../E/research.txt:5
#, no-wrap
msgid "Starts a <a cbot|researches>research</a> of a given type."
msgstr ""
#. type: Plain text
#: ../E/research.txt:11
#, no-wrap
msgid "<a object|research>ResearchCenter</a> or <a object|labo>AutoLab</a>. Nearest research center by default."
msgstr ""
#. type: Plain text
#: ../E/research.txt:19
#, no-wrap
msgid ""
"<a cbot|researches>Research names</a>, <code><a cbot|canresearch>canresearch</a></code>, <code><a cbot|researched>researched</a></code>.\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: Plain text
#: ../E/researched.txt:5
#, no-wrap
msgid "Checks if a <a cbot|researches>research</a> is done."
msgstr ""
#. type: Plain text
#: ../E/researched.txt:11
#, no-wrap
msgid ""
"<format const>true</format> if the research is done\n"
"<format const>false</format> if the research is not done"
msgstr ""
#. type: Plain text
#: ../E/researched.txt:15
#, no-wrap
msgid ""
"<a cbot|researches>Research names</a>, <code><a cbot|research>research</a></code>, <code><a cbot|canresearch>canresearch</a></code>, <code><a cbot|canbuild>canbuild</a></code>.\n"
"<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
msgstr ""
#. type: Plain text
#: ../E/researches.txt:9
#, no-wrap
msgid ""
"<code><format const>ResearchTracked</format> </code>Tracked bots (e.g. <a object|botgc>tracked grabber</a>)\n"
"<code><format const>ResearchWinged</format> </code>Winged bots (e.g. <a object|botgj>winged grabber</a>)\n"
"<code><format const>ResearchShooter</format> </code><a object|botfr>Fireball cannon</a>\n"
"<code><format const>ResearchDefenseTower</format> </code><a object|tower>Defense tower</a>\n"
"<code><format const>ResearchNuclearPlant</format> </code><a object|nuclear>Nuclear plant</a>\n"
"<code><format const>ResearchThumper</format> </code><a object|bottump>Thumper</a>\n"
"<code><format const>ResearchShielder</format> </code><a object|botshld>Shielder</a>\n"
"<code><format const>ResearchPhazerShooter</format> </code><a object|botphaz>Phazer cannon</a>\n"
"<code><format const>ResearchBuilder</format> </code><a object|botbr>Neutron gun</a>"
msgstr ""
#. type: Plain text
#: ../E/researches.txt:20
#, no-wrap
msgid ""
"<code><format const>ResearchTarget</format> </code><a object|bottarg>Target bot</a>\n"
"<code><format const>ResearchLegged</format> </code>Legged bots (e.g. <a object|botgs>legged grabber</a>)\n"
"<code><format const>ResearchOrgaShooter</format> </code><a object|botor>Orgaball cannon</a>"
msgstr ""
#. type: Plain text
#: ../E/researches.txt:25
#, no-wrap
msgid ""
"<code><format const>ResearchSniffer</format> </code><a object|botsr>Sniffer</a>\n"
"<code><format const>ResearchSubber</format> </code><a object|botsub>Subber</a>\n"
"<code><format const>ResearchRecycler</format> </code><a object|botrecy>Recycler</a>"
msgstr ""
#. type: Plain text
#: ../E/researches.txt:30
#, no-wrap
msgid "<a cbot>CBOT Language</a>, <a cbot|type>Variables</a> and <a cbot|category>Categories</a>."
msgstr ""
#. type: Source code
#: ../E/takeoff.txt:3
#, no-wrap
msgid "<c/>takeoff ( object );<n/>"
msgstr ""
#. type: Plain text
#: ../E/takeoff.txt:5
#, no-wrap
msgid "Launch a spaceship."
msgstr ""
#. type: Plain text
#: ../E/takeoff.txt:8
#, no-wrap
msgid "<a object|base>SpaceShip</a>, nearest by default."
msgstr ""
#. type: Plain text
#: ../E/switch.txt:5
#, no-wrap
msgid "Note: the <a cbot|isbusy>isbusy</a> instruction might be much better to use in this scenario."
msgstr ""
#. type: Plain text
#: ../E/build.txt:15
#, no-wrap
msgid "Constructs a building using a titanium cube in front of the <a object|botbr>builder</a>."
msgstr ""
#. type: Source code
#: ../E/pointer.txt:37
#, no-wrap
msgid ""
"{\n"
"\tMyClass item = new MyClass();\n"
"\titem.a = 33;\n"
"\treturn item;\n"
"}"
msgstr ""
#. type: Plain text
#: ../E/category.txt:94
#, no-wrap
msgid ""
"<button 136/> <code><a object|human>Me</a> </code>You!\n"
" <code><a object|mine>Mine</a> </code>Mine\n"
" <code><a object|barrier>Barrier</a> </code>Barrier\n"
" <code><a object|wreck>Wreck</a> </code>Derelict bot\n"
" <code><a object|ruin>Ruin</a> </code>Derelict building\n"
" <code><a object|bush>Bush</a> </code>Greenery\n"
" <code><a object|gravi>GraviPlant</a> </code>Gravi-plant\n"
" <code><a object|crystal>Crystal</a> </code>Crystal\n"
" <code><a object|bromush>BrownMushroom</a> </code>Brown mushroom\n"
" <code><a object|gremush>GreenMushroom</a> </code>Poisonous green mushroom"
msgstr ""
#. type: \b; header
#: ../E/deflag.txt:1
#, no-wrap
msgid "Instruction <code>deflag</code>"
msgstr ""
#. type: Source code
#: ../E/deflag.txt:3
#, no-wrap
msgid "<c/>deflag ( );<n/>"
msgstr ""
#. type: Plain text
#: ../E/deflag.txt:5
#, no-wrap
msgid "Removes a <a object|flag>colored flag</a> in front of the <a object|botsr>sniffer</a>."
msgstr ""
#. type: Plain text
#: ../E/deflag.txt:8
#, no-wrap
msgid ""
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <c/>deflag();<n/>.\n"
"<code>== 0 </code>removed a flag\n"
"<code>!= 0 </code>could not remove a flag"
msgstr ""
#. type: \b; header
#: ../E/flag.txt:1
#, no-wrap
msgid "Instruction <code>flag</code>"
msgstr ""
#. type: Source code
#: ../E/flag.txt:3
#, no-wrap
msgid "<c/>flag ( color );<n/>"
msgstr ""
#. type: Plain text
#: ../E/flag.txt:5
#, no-wrap
msgid "Plants a <a object|flag>colored flag</a> in front of the <a object|botsr>sniffer</a>."
msgstr ""
#. type: \t; header
#: ../E/flag.txt:7
#, no-wrap
msgid "color: <code><a cbot|int>int</a></code> (default value: <code>Blue</code>)"
msgstr ""
#. type: Plain text
#: ../E/flag.txt:8
#, no-wrap
msgid ""
"<code>Blue</code>\n"
"<code>Red</code>\n"
"<code>Green</code>\n"
"<code>Yellow</code>\n"
"<code>Violet</code>"
msgstr ""
#. type: Plain text
#: ../E/flag.txt:15
#, no-wrap
msgid ""
"Normally an error stops the program. You can prevent the program from stopping on errors by using the <code><a cbot|errmode>errmode</a>(0)</code> instruction. A value different from zero if an error occurred is then returned by <c/>flag();<n/>.\n"
"<code>== 0 </code>planted a flag\n"
"<code>!= 0 </code>could not plant a flag"
msgstr ""
#. type: Plain text
#: ../E/factory.txt:11
#, no-wrap
msgid "Program that will be run on the bot after factory finishes the construction. This can be either a <a cbot|public>public</a> <a cbot|function>function</a>, a filename or raw code."
msgstr ""
#. type: Plain text
#: ../E/factory.txt:23
#, no-wrap
msgid "Raw code:"
msgstr ""
#. type: Source code
#: ../E/factory.txt:25
#, no-wrap
msgid ""
" extern void New()\n"
" {\n"
" factory(WheeledGrabber, \"extern void Say123() { message(123); }\");\n"
" }"
msgstr ""
#. type: Plain text
#: ../E/factory.txt:31
#, no-wrap
msgid "Public function:"
msgstr ""
#. type: Source code
#: ../E/factory.txt:33
#, no-wrap
msgid ""
" extern void New()\n"
" {\n"
" factory(WheeledGrabber, \"SayHello\");\n"
" }\n"
"\n"
" public void SayHello()\n"
" {\n"
" message(\"hello\");\n"
" }"
msgstr ""
#. type: Plain text
#: ../E/factory.txt:44
#, no-wrap
msgid "File name:"
msgstr ""
#. type: Plain text
#: ../E/factory.txt:46
#, no-wrap
msgid "Save this as say-foo.cbot. Note: make sure to check the \"Public\" checkbox when saving - this will cause say-foo.cbot to be inside the program/ folder."
msgstr ""
#. type: Source code
#: ../E/factory.txt:48
#, no-wrap
msgid ""
" extern void New()\n"
" {\n"
" message(\"Foo\");\n"
" }"
msgstr ""
#. type: Plain text
#: ../E/factory.txt:54
#, no-wrap
msgid "Run factory like this:"
msgstr ""
#. type: Source code
#: ../E/factory.txt:56
#, no-wrap
msgid ""
" extern void New()\n"
" {\n"
" factory(WheeledGrabber, \"program/say-foo.cbot\");\n"
" }"
msgstr ""
#. type: Plain text
#: ../E/expr.txt:54
#, no-wrap
msgid ""
"<code>+</code> addition\n"
"<code>-</code> subtraction\n"
"<code>*</code> multiplication\n"
"<code>/</code> division\n"
"<code>%</code> remainder of the division (works for <code><a cbot|int>int</a></code> as well as <code><a cbot|float>float</a></code>)"
msgstr ""
#. type: Source code
#: ../E/expr.txt:66
#, no-wrap
msgid ""
" int i = 12 + 3; // i == 15\n"
" int i = 2 - 5; // i == -3\n"
" \n"
" float f = 3.01 * 10; // f == 30.1\n"
" \n"
" int i = 5 / 3; // i == 1 (automatic conversion to int)\n"
" float f = 5 / 3; // f == 1.67\n"
" float f = 5 / 0; // returns an error (division by zero)\n"
" \n"
" int i = 13 % 5; // i == 3\n"
" int i = -8 % 3; // i == -2\n"
" float f = -4.5 % 2.75; // f == -1.75\n"
" \n"
" float f = sin(90) * i; // f == -2.0\n"
" "
msgstr ""
#. type: Plain text
#: ../E/expr.txt:91
#, no-wrap
msgid ""
"<code>+=</code> addition\n"
"<code>-=</code> subtraction\n"
"<code>*=</code> multiplication\n"
"<code>/=</code> division\n"
"<code>%=</code> remainder of the division"
msgstr ""
#. type: Plain text
#: ../E/object.txt:4
#, no-wrap
msgid ""
"<code><a cbot|int>int</a> object.category </code><a cbot|category>Category</a> of the object\n"
"<code><a cbot|point>point</a> object.position </code>Position of the object (x,y,z)\n"
"<code><a cbot|float>float</a> object.orientation </code>Orientation of the object (0..360)\n"
"<code><a cbot|float>float</a> object.pitch </code>Forward/backward angle of the object\n"
"<code><a cbot|float>float</a> object.roll </code>Right/left angle of the object \n"
"<code><a cbot|float>float</a> object.energyLevel </code>Energy level (0..1)\n"
"<code><a cbot|float>float</a> object.shieldLevel </code>Shield level (0..1)\n"
"<code><a cbot|float>float</a> object.temperature </code>Jet temperature (0..1)\n"
"<code><a cbot|float>float</a> object.altitude </code>Altitude above ground\n"
"<code><a cbot|float>float</a> object.lifeTime </code>Lifetime of the object\n"
"<code>object object.energyCell </code>Power cell on the bot\n"
"<code>object object.load </code>Object carried by the bot\n"
"<code><a cbot|int>int</a> object.team </code>The object's team (see <a battles>code battles</a>)\n"
"<code><a cbot|point>point</a> object.velocity </code>Velocity of the object\n"
"<code><a cbot|bool>bool</a> object.dead </code>Is the object dead?"
msgstr ""
#. type: Source code
#: ../E/object.txt:67
#, no-wrap
msgid "<code>dead</code>"
msgstr ""
#. type: Plain text
#: ../E/object.txt:68
#, no-wrap
msgid "True if the object was recently killed (while the death animation is playing). Note that accessing this property or any other property after the death animation finishes will cause an error that stops the program."
msgstr ""
|