{"id":268737,"date":"2015-11-23T08:45:02","date_gmt":"2015-11-23T05:45:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=268737"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=268737","title":{"rendered":"\u0423\u0447\u0435\u0431\u043d\u043e\u0435 \u043f\u043e\u0441\u043e\u0431\u0438\u0435 \u043f\u043e Nim (\u0447\u0430\u0441\u0442\u044c 1)"},"content":{"rendered":"\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u043e\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\u042d\u0442\u043e\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0434\u0435\u043b\u0430\u043b\u0441\u044f \u043f\u043e \u043c\u043e\u0442\u0438\u0432\u0430\u043c <a href=\"http:\/\/habrahabr.ru\/post\/258119\/#comment_8459961\">\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f<\/a> \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f  <a href=\"http:\/\/habrahabr.ru\/users\/stas3k\/\" class=\"user_link\">stas3k<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043d \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b  <a href=\"http:\/\/habrahabr.ru\/users\/frol\/\" class=\"user_link\">frol<\/a> \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0434\u0432\u0435 \u0447\u0430\u0441\u0442\u0438 \u00abNim Tutorial\u00bb. \u041c\u0435\u043d\u044f \u044d\u0442\u043e \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u043e \u0438 \u044f \u043f\u0435\u0440\u0435\u0432\u0451\u043b \u0438\u0445 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u0432 \u043c\u0435\u0440\u0443 \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u0430\u0437\u0443\u043c\u0435\u043d\u0438\u044f. \u0415\u0436\u0435\u043b\u0438 \u043a\u0442\u043e \u043d\u0430\u0439\u0434\u0451\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 (\u043e\u043d\u0438 \u0442\u0430\u043c \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u0435\u0441\u0442\u044c \u2014 \u0433\u043b\u0430\u0437 \u043f\u043e\u0434 \u043a\u043e\u043d\u0435\u0446 \u0441\u043e\u0432\u0441\u0435\u043c \u0443\u0436\u0435 \u0437\u0430\u043c\u044b\u043b\u0438\u043b\u0441\u044f), \u0441\u043e\u043e\u0431\u0449\u0430\u0439\u0442\u0435 \u0432 \u043b\u0438\u0447\u043a\u0443, \u0431\u0443\u0434\u0443 \u043f\u0440\u0430\u0432\u0438\u0442\u044c.  <\/div>\n<\/div>\n<p>  <\/p>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<blockquote><p>\u201cDer Mensch ist doch ein Augentier \u2013 sch\u00f6ne Dinge w\u00fcnsch ich mir.\u201d<\/p><\/blockquote>\n<p><em>(\u0426\u0438\u0442\u0430\u0442\u0430 \u0438\u0437 \u043f\u0435\u0441\u043d\u0438 \u00abMorgenstern\u00bb \u0433\u0440\u0443\u043f\u043f\u044b \u00abRammstein\u00bb. \u041f\u0440\u0438\u043c\u0435\u0440\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434: \u00ab\u041d\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u2013 \u0433\u043b\u0430\u0437\u0430\u0441\u0442\u044b\u0439 \u0437\u0432\u0435\u0440\u044c, \u2013 \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0445 \u0432\u0435\u0449\u0435\u0439\u00bb.)<\/em><\/p>\n<p>  \u042d\u0442\u043e \u2013 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b (tutorial) \u043f\u043e \u044f\u0437\u044b\u043a\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f <em>Nim.<\/em> \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u043c\u0438 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f\u043c\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0442\u0430\u043a\u0438\u043c\u0438 \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0442\u0438\u043f\u044b \u0438\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043d\u043e \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u0435 \u0437\u043d\u0430\u043d\u0438\u044f \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b. \u0411\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043f\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u043c \u043d\u044e\u0430\u043d\u0441\u0430\u043c \u044f\u0437\u044b\u043a\u0430, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435. \u0412\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u043e\u0434\u0430 \u0432 \u044d\u0442\u043e\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0442 <em>\u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0443 \u043f\u043e \u0441\u0442\u0438\u043b\u044e \u044f\u0437\u044b\u043a\u0430 Nim.<\/em><\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<h2>\u041f\u0435\u0440\u0432\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430<\/h2>\n<p>  \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u00abhello world\u00bb:<\/p>\n<pre><code class=\"ruby\"># \u042d\u0442\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 echo(&quot;What's your name? &quot;) var name: string = readLine(stdin) echo(&quot;Hi, &quot;, name, &quot;!&quot;) <\/code><\/pre>\n<p>  \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0432 \u0444\u0430\u0439\u043b <code>greetings.nim<\/code>. \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0439\u0442\u0435 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0435\u0433\u043e:<\/p>\n<pre><code class=\"bash\">nim compile --run greetings.nim <\/code><\/pre>\n<p>  \u041a\u043b\u044e\u0447 <code>--run<\/code> \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 Nim \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0438\u0445 \u043f\u043e\u0441\u043b\u0435 \u0438\u043c\u0435\u043d\u0438 \u0444\u0430\u0439\u043b\u0430:<\/p>\n<pre><code class=\"bash\">nim compile --run greetings.nim arg1 arg2 <\/code><\/pre>\n<p>  \u0423 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0438 \u043a\u043b\u044e\u0447\u0435\u0439 \u0435\u0441\u0442\u044c \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\">nim c -r greetings.nim <\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u043b\u0438\u0437\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0442\u0430\u043a\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"bash\">nim c -d:release greetings.nim <\/code><\/pre>\n<p>  \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 Nim \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438. \u041a\u043b\u044e\u0447 <code>-d:release<\/code> \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u044d\u0442\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e.<\/p>\n<p>  \u0422\u043e, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u043d\u043e \u044f \u043e\u0431\u044a\u044f\u0441\u043d\u044e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441: \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0431\u0435\u0437 \u043e\u0442\u0441\u0442\u0443\u043f\u0430, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u0432 Nim \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u041e\u0442\u0441\u0442\u0443\u043f\u044b \u0434\u0435\u043b\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u0430\u043c\u0438, \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u044f \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u0421\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u0434\u0432\u043e\u0439\u043d\u044b\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0438. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>var<\/code> \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442 \u043d\u043e\u0432\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <code>name<\/code> \u0438 \u0442\u0438\u043f\u043e\u043c <code>string<\/code>, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0435\u0439 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0435\u0440\u043d\u0443\u043b\u0430 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 <code>readLine<\/code>. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0437\u043d\u0430\u0435\u0442, \u0447\u0442\u043e <code>readLine<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0438\u043f \u0432 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0438 (\u044d\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c \u0442\u0438\u043f\u043e\u0432). \u0422\u0430\u043a \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0442\u043e\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c:<\/p>\n<pre><code class=\"bash\">var name = readLine(stdin) <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u2013 \u044d\u0442\u043e \u043f\u043e\u0447\u0442\u0438 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0444\u043e\u0440\u043c\u0430 \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u043e\u0432, \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u0432 Nim: \u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441 \u043c\u0435\u0436\u0434\u0443 \u043a\u0440\u0430\u0442\u043a\u043e\u0441\u0442\u044c\u044e \u0438 \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c\u044e.<\/p>\n<p>  \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u00abhello world\u00bb \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443: <code>echo<\/code>, <code>readLine<\/code> \u0438 \u0442.\u0434. \u042d\u0442\u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u044b \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 <code>system<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u044f\u0432\u043d\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043b\u044e\u0431\u044b\u043c \u0434\u0440\u0443\u0433\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u0435\u043c.<\/p>\n<h2>\u041b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b<\/h2>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b Nim \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435. \u041a\u0430\u043a \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u044f\u0437\u044b\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, Nim \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432, \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432, \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0441\u043b\u043e\u0432, \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432, \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0438 \u0437\u043d\u0430\u043a\u043e\u0432 \u043f\u0443\u043d\u043a\u0442\u0443\u0430\u0446\u0438\u0438.<\/p>\n<h3>\u0421\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b<\/h3>\n<p>  \u0421\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u0434\u0432\u043e\u0439\u043d\u044b\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0438; \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u2013 \u0432 \u043e\u0434\u0438\u043d\u0430\u0440\u043d\u044b\u0435. \u0421\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u044d\u043a\u0440\u0430\u043d\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u043c \u0441\u043b\u044d\u0448\u0435\u043c <code>\\<\/code>: <code>\\n<\/code> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0440\u043e\u043a\u0438, <code>\\t<\/code> \u2013 \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u044e \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u0422\u0430\u043a\u0436\u0435 \u0431\u044b\u0432\u0430\u044e\u0442 <em>\u0441\u044b\u0440\u044b\u0435<\/em> (raw) \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b:<\/p>\n<pre><code class=\"ruby\">r&quot;C:\\program files\\nim&quot; <\/code><\/pre>\n<p>  \u0412 \u0441\u044b\u0440\u044b\u0445 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u0430\u0445 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u0441\u043b\u044d\u0448 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u044d\u043a\u0440\u0430\u043d\u0438\u0440\u0443\u044e\u0449\u0438\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c.<\/p>\n<p>  \u0422\u0440\u0435\u0442\u0438\u0439 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0437\u0430\u043f\u0438\u0441\u0438 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0445 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432, \u044d\u0442\u043e <em>\u0434\u043b\u0438\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b.<\/em> \u041e\u043d\u0438 \u043e\u0431\u0440\u0430\u043c\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u0440\u043e\u0439\u043d\u044b\u043c\u0438 \u043a\u0430\u0432\u044b\u0447\u043a\u0430\u043c\u0438: <code>&quot;&quot;&quot; ... &quot;&quot;&quot;<\/code>, \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 <code>\\<\/code> \u0432 \u043d\u0438\u0445 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u044d\u043a\u0440\u0430\u043d\u0438\u0440\u0443\u044e\u0449\u0438\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c. \u041e\u043d\u0438 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u0434 HTML-\u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<h3>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438<\/h3>\n<p>  \u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0433\u0434\u0435 \u0443\u0433\u043e\u0434\u043d\u043e \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0433\u043e \u0438\u043b\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u0430 \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u0440\u0435\u0448\u0451\u0442\u043a\u0438 <code>#<\/code>. \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0441 <code>##<\/code>:<\/p>\n<pre><code class=\"ruby\"># \u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439.  var myVariable: int ## \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 <\/code><\/pre>\n<p>  \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438, \u0432\u0445\u043e\u0434\u044f\u0442 \u0432 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430! \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>discard<\/code> \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0441 <em>\u0434\u043b\u0438\u043d\u043d\u044b\u043c\u0438 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u043c\u0438 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u0430\u043c\u0438<\/em> \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u043b\u043e\u0447\u043d\u044b\u0445 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432:<\/p>\n<pre><code class=\"ruby\">discard &quot;&quot;&quot; \u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u043b\u044e\u0431\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043d\u0430 Nim \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u043f\u043e \u043e\u0442\u0441\u0442\u0443\u043f\u0430\u043c.       yes(&quot;May I ask a pointless question?&quot;) &quot;&quot;&quot; <\/code><\/pre>\n<p>  <\/p>\n<h3>\u0427\u0438\u0441\u043b\u0430<\/h3>\n<p>  \u0427\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b \u043f\u0438\u0448\u0443\u0442\u0441\u044f \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432. \u0414\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u0431\u0438\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u044f\u0434\u044b \u043f\u043e\u0434\u0447\u0451\u0440\u043a\u0438\u0432\u0430\u043d\u0438\u044f\u043c\u0438: <code>1_000_000<\/code> (\u043e\u0434\u0438\u043d \u043c\u0438\u043b\u043b\u0438\u043e\u043d). \u0427\u0438\u0441\u043b\u0430, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u0442\u043e\u0447\u043a\u0443 (\u0438\u043b\u0438 <code>e<\/code>, \u0438\u043b\u0438 <code>E<\/code>) \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u0430\u043c\u0438 \u0447\u0438\u0441\u0435\u043b \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439: <code>1.0e9<\/code> (\u043e\u0434\u0438\u043d \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434). \u0428\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u044b\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0441 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 <code>0x<\/code>, \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0435 \u2013 \u0441 <code>0b<\/code>, \u0430 \u0432\u043e\u0441\u044c\u043c\u0435\u0440\u0438\u0447\u043d\u044b\u0435 \u2013 \u0441 <code>0o<\/code>. \u0412\u0435\u0434\u0443\u0449\u0438\u0439 \u043d\u043e\u043b\u044c <strong>\u043d\u0435<\/strong> \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0447\u0438\u0441\u043b\u043e \u0432 \u0432\u043e\u0441\u044c\u043c\u0435\u0440\u0438\u0447\u043d\u043e\u0435.<\/p>\n<h2>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>var<\/code><\/h2>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>var<\/code> \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442 \u043d\u043e\u0432\u0443\u044e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043b\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e:<\/p>\n<pre><code class=\"ruby\">var x, y: int # \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c x \u0438 y, \u0438\u043c\u0435\u044e\u0449\u0438\u0435 \u0442\u0438\u043f `int` <\/code><\/pre>\n<p>  \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u0432 \u043f\u043e\u0441\u043b\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 <code>var<\/code> \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0446\u0435\u043b\u0443\u044e \u0441\u0435\u043a\u0446\u0438\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"ruby\">var   x, y: int   # \u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439   a, b, c: string <\/code><\/pre>\n<p>  <\/p>\n<h2>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f<\/h2>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0438\u043b\u0438, \u0431\u043e\u043b\u0435\u0435 \u043e\u0431\u0449\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043c\u0435\u0441\u0442\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"ruby\">var x = &quot;abc&quot; # \u0432\u0432\u043e\u0434\u0438\u0442 \u043d\u043e\u0432\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e `x` \u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442 \u0435\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 x = &quot;xyz&quot;     # \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442 \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 `x` <\/code><\/pre>\n<p>  <code>=<\/code> \u044d\u0442\u043e <em>\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f.<\/em> \u041e\u043d \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043d, \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043d \u0438\u043b\u0438 \u0437\u0430\u043f\u0440\u0435\u0449\u0451\u043d, \u043d\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u0431\u0443\u0434\u0443\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 Nim. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u0434\u043d\u0438\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f \u0438 \u0432\u0441\u0435 \u043e\u043d\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442 \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"ruby\">var x, y = 3  # \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c `x` \u0438 `y` \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 3 echo &quot;x &quot;, x  # \u0432\u044b\u0432\u0435\u0434\u0435\u0442 &quot;x 3&quot; echo &quot;y &quot;, y  # \u0432\u044b\u0432\u0435\u0434\u0435\u0442 &quot;y 3&quot; x = 42        # \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 `x` \u043d\u0430 42, \u043d\u0435 \u043c\u0435\u043d\u044f\u044f `y` echo &quot;x &quot;, x  # \u0432\u044b\u0432\u0435\u0434\u0435\u0442 &quot;x 42&quot; echo &quot;y &quot;, y  # \u0432\u044b\u0432\u0435\u0434\u0435\u0442 &quot;y 3&quot; <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u0434\u043d\u0438\u043c \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435\u043c, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443, \u043c\u043e\u0436\u0435\u0442 \u0434\u0430\u0442\u044c \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 <em>\u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0451\u0442<\/em> \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435 \u0438 \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0441\u0447\u0451\u0442\u0435 \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437. \u0415\u0441\u043b\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432, \u0432\u0430\u0448\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f! \u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u044d\u0442\u043e\u0433\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<h2>\u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b<\/h2>\n<p>  \u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u044d\u0442\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f. \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438:<\/p>\n<pre><code class=\"ruby\">const x = &quot;abc&quot; # \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 x \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 &quot;abc&quot; <\/code><\/pre>\n<p>  \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u0432 \u043f\u043e\u0441\u043b\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 <code>const<\/code> \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0446\u0435\u043b\u0443\u044e \u0441\u0435\u043a\u0446\u0438\u044e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442:<\/p>\n<pre><code class=\"ruby\">const   x = 1   # \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c   y = 2   z = y + 5 # \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b <\/code><\/pre>\n<p>  <\/p>\n<h2>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>let<\/code><\/h2>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>let<\/code> \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043a\u0430\u043a <code>var<\/code>, \u043d\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <em>\u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f:<\/em> \u043f\u043e\u0441\u043b\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043e.<\/p>\n<pre><code class=\"ruby\">let x = &quot;abc&quot; # \u0432\u0432\u043e\u0434\u0438\u0442 \u043d\u043e\u0432\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e `x` \u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442 \u0435\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 x = &quot;xyz&quot;     # \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442: \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435 `x` <\/code><\/pre>\n<p>  \u0420\u0430\u0437\u043b\u0438\u0447\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 <code>let<\/code> \u0438 <code>const<\/code> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435: <code>let<\/code> \u0432\u0432\u043e\u0434\u0438\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0430, \u0430 <code>const<\/code> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u00ab\u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u0441\u0435\u043a\u0446\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445\u00bb:<\/p>\n<pre><code class=\"ruby\">const input = readLine(stdin) # \u041e\u0448\u0438\u0431\u043a\u0430: \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"ruby\">let input = readLine(stdin)   # \u0430 \u044d\u0442\u043e \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 <\/code><\/pre>\n<p>  <\/p>\n<h2>\u041a\u043e\u043c\u0430\u043d\u0434\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u043c<\/h2>\n<p>  \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u0440\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e. \u041d\u043e \u0442\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043c\u043e\u0433\u0443\u0442 \u043b\u0438\u0448\u044c \u0441\u0430\u043c\u044b\u0435 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u043c \u043d\u0443\u0436\u043d\u044b \u0435\u0449\u0451 \u0446\u0438\u043a\u043b\u044b \u0438 \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>if<\/code><\/h3>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>if<\/code> \u2013 \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0442\u043e\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"ruby\">let name = readLine(stdin) if name == &quot;&quot;:   echo(&quot;Poor soul, you lost your name?&quot;) elif name == &quot;name&quot;:   echo(&quot;Very funny, your name is name.&quot;) else:   echo(&quot;Hi, &quot;, name, &quot;!&quot;) <\/code><\/pre>\n<p>  \u0412\u0435\u0442\u043e\u043a <code>elif<\/code> \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u043e\u043b\u044c \u0438 \u0431\u043e\u043b\u0435\u0435, \u0432\u0435\u0442\u043a\u0430 <code>else<\/code> \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0430. \u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e <code>elif<\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435\u043c \u0434\u043b\u044f <code>else if<\/code>, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0437\u043b\u0438\u0448\u043d\u0438\u0445 \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u0432. (<code>&quot;&quot;<\/code> \u044d\u0442\u043e \u043f\u0443\u0441\u0442\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430, \u043e\u043d\u0430 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432.)<\/p>\n<h3>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>case<\/code><\/h3>\n<p>  \u0414\u0440\u0443\u0433\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <code>case<\/code>. \u041e\u043d\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u0442 \u043f\u043e\u0442\u043e\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0442\u043e\u043a:<\/p>\n<pre><code class=\"ruby\">let name = readLine(stdin) case name of &quot;&quot;:   echo(&quot;Poor soul, you lost your name?&quot;) of &quot;name&quot;:   echo(&quot;Very funny, your name is name.&quot;) of &quot;Dave&quot;, &quot;Frank&quot;:   echo(&quot;Cool name!&quot;) else:   echo(&quot;Hi, &quot;, name, &quot;!&quot;) <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f <code>of<\/code> \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0440\u0430\u0437\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u044f\u0442\u044b\u043c\u0438.<\/p>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>case<\/code> \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0446\u0435\u043b\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438, \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u043c\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0438 \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438. (\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u043c\u044b\u0435 \u0442\u0438\u043f\u044b \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e \u043f\u043e\u0437\u0436\u0435.) \u0414\u043b\u044f \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u043c\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439:<\/p>\n<pre><code class=\"ruby\"># \u044d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c\u0441\u044f \u043f\u043e\u0437\u0436\u0435: from strutils import parseInt  echo(&quot;A number please: &quot;) let n = parseInt(readLine(stdin)) case n of 0..2, 4..7: echo(&quot;The number is in the set: {0, 1, 2, 4, 5, 6, 7}&quot;) of 3, 8: echo(&quot;The number is 3 or 8&quot;) <\/code><\/pre>\n<p>  \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u043a\u043e\u0434 \u0432\u044b\u0448\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0430\u0434\u043e \u043f\u043e\u043a\u0440\u044b\u0442\u044c <em>\u0432\u0441\u0435<\/em> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c <code>n<\/code>, \u0430 \u043a\u043e\u0434 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>0..8<\/code>. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 (\u0445\u043e\u0442\u044f \u0442\u0430\u043a\u043e\u0435 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u0432), \u043c\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043c \u044d\u0442\u043e, \u0443\u043a\u0430\u0437\u0430\u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443, \u0447\u0442\u043e \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0438\u0447\u0435\u0433\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e:<\/p>\n<pre><code class=\"ruby\">... case n of 0..2, 4..7: echo(&quot;The number is in the set: {0, 1, 2, 4, 5, 6, 7}&quot;) of 3, 8: echo(&quot;The number is 3 or 8&quot;) else: discard <\/code><\/pre>\n<p>  \u041f\u0443\u0441\u0442\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>discard<\/code> \u044d\u0442\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <em>\u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c.<\/em> \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0437\u043d\u0430\u0435\u0442, \u0447\u0442\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>case<\/code> \u0441 \u0441\u0435\u043a\u0446\u0438\u0435\u0439 <code>else<\/code> \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043e\u0448\u0438\u0431\u043a\u0430 \u0438\u0441\u0447\u0435\u0437\u0430\u0435\u0442. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043a\u0440\u044b\u0442\u044c \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e: \u0432\u043e\u0442 \u043f\u043e\u0447\u0435\u043c\u0443 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0442\u0440\u043e\u043a \u0432\u0435\u0442\u043a\u0430 <code>else<\/code> \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0430.<\/p>\n<p>  \u0412 \u0446\u0435\u043b\u043e\u043c, \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>case<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u0432 \u0442\u0438\u043f\u043e\u0432 \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439, \u0433\u0434\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0442\u043e, \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043e\u0445\u0432\u0430\u0442 \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<h3>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>while<\/code><\/h3>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>while<\/code> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0446\u0438\u043a\u043b:<\/p>\n<pre><code class=\"ruby\">echo(&quot;What's your name? &quot;) var name = readLine(stdin) while name == &quot;&quot;:   echo(&quot;Please tell me your name: &quot;)   name = readLine(stdin)   # `var` \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <\/code><\/pre>\n<p>  \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0446\u0438\u043a\u043b <code>while<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d, \u0447\u0442\u043e\u0431\u044b \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0435\u0433\u043e \u0438\u043c\u044f \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u043e\u043d \u043d\u0435 \u043d\u0430\u0436\u043c\u0451\u0442 ENTER (\u0442.\u0435. \u043d\u0435 \u0432\u0432\u0435\u0434\u0451\u0442 \u043f\u0443\u0441\u0442\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443).<\/p>\n<h3>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>for<\/code><\/h3>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>for<\/code> \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0446\u0438\u043a\u043b \u043f\u043e \u0432\u0441\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u0430. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <code>countup<\/code>:<\/p>\n<pre><code class=\"ruby\">echo(&quot;\u0421\u0447\u0438\u0442\u0430\u0435\u043c \u0434\u043e \u0434\u0435\u0441\u044f\u0442\u0438: &quot;) for i in countup(1, 10):   echo($i) # --&gt; \u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 1 2 3 4 5 6 7 8 9 10 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u0447\u043a\u0430\u0445 <\/code><\/pre>\n<p>  \u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <code>$<\/code> \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e (<code>int<\/code>) \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u0438\u043f\u044b \u0432 \u0441\u0442\u0440\u043e\u043a\u0443. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>i<\/code> \u043d\u0435\u044f\u0432\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0446\u0438\u043a\u043b\u043e\u043c <code>for<\/code> \u0438 \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f <code>int<\/code>, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 <code>countup<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 \u0442\u0438\u043f. <code>i<\/code> \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c 1, 2, .., 10. \u041a\u0430\u0436\u0434\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>echo<\/code>. \u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0434\u0435\u043b\u0430\u0435\u0442 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435:<\/p>\n<pre><code class=\"ruby\">echo(&quot;\u0421\u0447\u0438\u0442\u0430\u0435\u043c \u0434\u043e 10: &quot;) var i = 1 while i &lt;= 10:   echo($i)   inc(i) # \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u043c i \u043d\u0430 1   # --&gt; \u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 1 2 3 4 5 6 7 8 9 10 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u0447\u043a\u0430\u0445 <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u043e\u0442\u0441\u0447\u0451\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u043e\u043b\u044c \u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u043e (\u043d\u043e \u043d\u0435 \u0442\u0430\u043a \u0447\u0430\u0441\u0442\u043e \u043d\u0443\u0436\u0435\u043d):<\/p>\n<pre><code class=\"ruby\">echo(&quot;\u0421\u0447\u0438\u0442\u0430\u0435\u043c \u043e\u0442 10 \u0434\u043e 1: &quot;) for i in countdown(10, 1):   echo($i) # --&gt; \u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 10 9 8 7 6 5 4 3 2 1 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u0447\u043a\u0430\u0445 <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u0442\u0441\u0447\u0451\u0442 \u0441 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0445, \u0432 Nim \u0435\u0441\u0442\u044c \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440 <code>..<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0435\u043b\u0430\u0435\u0442 \u0442\u043e \u0436\u0435, \u0447\u0442\u043e \u0438 <code>countup<\/code>:<\/p>\n<pre><code class=\"ruby\">for i in 1..10:   ... <\/code><\/pre>\n<p>  <\/p>\n<h3>\u041e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>block<\/code><\/h3>\n<p>  \u0423 \u043a\u043e\u043c\u0430\u043d\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u043c \u0435\u0441\u0442\u044c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u043a\u0430 \u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c: \u043e\u043d\u0438 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0442 \u043d\u043e\u0432\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 <code>x<\/code> \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u0446\u0438\u043a\u043b\u0430:<\/p>\n<pre><code class=\"ruby\">while false:   var x = &quot;hi&quot; echo(x) # \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 <\/code><\/pre>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>while<\/code> (<code>for<\/code>) \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043d\u0435\u044f\u0432\u043d\u044b\u0439 \u0431\u043b\u043e\u043a. \u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0432\u0438\u0434\u0438\u043c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043d\u0438 \u0431\u044b\u043b\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u044b. \u041a\u043e\u043c\u0430\u043d\u0434\u0443 <code>block<\/code> \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0431\u043b\u043e\u043a \u044f\u0432\u043d\u043e:<\/p>\n<pre><code class=\"ruby\">block myblock:   var x = &quot;hi&quot; echo(x) # \u0442\u043e\u0436\u0435 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 <\/code><\/pre>\n<p>  <em>\u041c\u0435\u0442\u043a\u0430<\/em> \u0431\u043b\u043e\u043a\u0430 (<code>myblock<\/code> \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435) \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0430.<\/p>\n<h3>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>break<\/code><\/h3>\n<p>  \u0418\u0437 \u0431\u043b\u043e\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0441\u0440\u043e\u0447\u043d\u043e \u0432\u044b\u0439\u0442\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <code>break<\/code>. \u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0442\u044c \u0431\u043b\u043e\u043a\u0438 \u043a\u043e\u043c\u0430\u043d\u0434 <code>while<\/code>, <code>for<\/code> \u0438\u043b\u0438 <code>block<\/code>. \u041e\u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0438\u0437 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0433\u043e \u0431\u043b\u043e\u043a\u0430, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0437\u0430\u0434\u0430\u043d\u0430 \u043c\u0435\u0442\u043a\u0430 \u0431\u043b\u043e\u043a\u0430, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0430\u0434\u043e \u0432\u044b\u0439\u0442\u0438:<\/p>\n<pre><code class=\"ruby\">block myblock:   echo(&quot;\u0432\u0445\u043e\u0434\u0438\u043c \u0432 \u0431\u043b\u043e\u043a&quot;)   while true:     echo(&quot;\u0446\u0438\u043a\u043b&quot;)     break # \u043f\u043e\u043a\u0438\u0434\u0430\u0435\u043c \u0446\u0438\u043a\u043b, \u043d\u043e \u043d\u0435 \u0431\u043b\u043e\u043a   echo(&quot;\u043c\u044b \u0432\u0441\u0451 \u0435\u0449\u0451 \u0432 \u0431\u043b\u043e\u043a\u0435&quot;)  block myblock2:   echo(&quot;\u0432\u0445\u043e\u0434\u0438\u043c \u0432 \u0431\u043b\u043e\u043a&quot;)   while true:     echo(&quot;\u0446\u0438\u043a\u043b&quot;)     break myblock2 # \u043f\u043e\u043a\u0438\u0434\u0430\u0435\u043c \u0431\u043b\u043e\u043a (\u0438 \u0446\u0438\u043a\u043b)   echo(&quot;\u043c\u044b \u0432\u0441\u0451 \u0435\u0449\u0451 \u0432 \u0431\u043b\u043e\u043a\u0435&quot;) <\/code><\/pre>\n<p>  <\/p>\n<h3>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>continue<\/code><\/h3>\n<p>  \u041a\u0430\u043a \u0438 \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>continue<\/code> \u043d\u0435\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438:<\/p>\n<pre><code class=\"ruby\">while true:   let x = readLine(stdin)   if x == &quot;&quot;: continue   echo(x) <\/code><\/pre>\n<p>  <\/p>\n<h3>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>when<\/code><\/h3>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"ruby\">when system.hostOS == &quot;windows&quot;:   echo(&quot;running on Windows!&quot;) elif system.hostOS == &quot;linux&quot;:   echo(&quot;running on Linux!&quot;) elif system.hostOS == &quot;macosx&quot;:   echo(&quot;running on Mac OS X!&quot;) else:   echo(&quot;unknown operating system&quot;) <\/code><\/pre>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>when<\/code> \u043f\u043e\u0447\u0442\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 <code>if<\/code>, \u043d\u043e \u0435\u0441\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f:  <\/p>\n<ul>\n<li>\u043a\u0430\u0436\u0434\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u044b\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c;<\/li>\n<li>\u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u0432\u0435\u0442\u043a\u0438 \u043d\u0435 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0442 \u043d\u043e\u0432\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438;<\/li>\n<li>\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u0434 <em>\u0442\u043e\u043b\u044c\u043a\u043e<\/em> \u0434\u043b\u044f \u043a\u043e\u043c\u0430\u043d\u0434, \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0449\u0438\u0445 \u0432\u0435\u0442\u043a\u0435 \u043f\u043e \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u0443\u0441\u043b\u043e\u0432\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0435\u0440\u043d\u0443\u043b\u043e <code>true<\/code>.<\/li>\n<\/ul>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>when<\/code> \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e-\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0435\u0439 <code>#ifdef<\/code> \u044f\u0437\u044b\u043a\u0430 C.  <\/p>\n<blockquote><p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435<\/strong>: \u0427\u0442\u043e\u0431\u044b \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043a\u0443\u0441\u043e\u043a \u043a\u043e\u0434\u0430, \u0447\u0430\u0441\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e <code>when false:<\/code>. \u0415\u0451 \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u043e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0439.<\/p><\/blockquote>\n<p>  <\/p>\n<h2>\u041a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u043e\u0442\u0441\u0442\u0443\u043f\u044b<\/h2>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u043c, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0435\u0440\u043d\u0451\u043c\u0441\u044f \u043a \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u0432 Nim.<\/p>\n<p>  \u0412 Nim \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 <em>\u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438<\/em> \u0438 <em>\u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438.<\/em> <em>\u041f\u0440\u043e\u0441\u0442\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b,<\/em> \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435, \u0432\u044b\u0437\u043e\u0432 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440 \u0438\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>return<\/code>, \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434. <em>\u0421\u043b\u043e\u0436\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b,<\/em> \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <code>if<\/code>, <code>when<\/code>, <code>for<\/code>, <code>while<\/code> \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043d\u0435\u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e\u0441\u0442\u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0438\u0448\u0443\u0442\u0441\u044f \u0441 \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u043c, \u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u2013 \u043d\u0435\u0442:<\/p>\n<pre><code class=\"ruby\"># \u0434\u043b\u044f \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f \u043e\u0442\u0441\u0442\u0443\u043f \u043d\u0435 \u043d\u0443\u0436\u0435\u043d: if x: x = false  # \u043d\u0443\u0436\u0435\u043d \u043e\u0442\u0441\u0442\u0443\u043f \u0434\u043b\u044f \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e if: if x:   if y:     y = false   else:     y = true  # \u043d\u0443\u0436\u0435\u043d \u043e\u0442\u0441\u0442\u0443\u043f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0434\u0432\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0443\u0441\u043b\u043e\u0432\u0438\u044e: if x:   x = false   y = false <\/code><\/pre>\n<p>  \u0427\u0430\u0441\u0442\u0438 \u043a\u043e\u043c\u0430\u043d\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u044b\u0447\u043d\u043e \u0434\u0430\u044e\u0442 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043d\u0435\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f <em>\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438.<\/em> \u0414\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u0438 \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043e\u0442\u0441\u0442\u0443\u043f\u044b \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445:<\/p>\n<pre><code class=\"ruby\">if thisIsaLongCondition() and     thisIsAnotherLongCondition(1,        2, 3, 4):   x = true <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043a\u0440\u0430\u0442\u043a\u043e, \u0442\u043e \u043e\u0442\u0441\u0442\u0443\u043f\u044b \u0432 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u044b \u043f\u043e\u0441\u043b\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u043f\u043e\u0441\u043b\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u0441\u043a\u043e\u0431\u043e\u043a \u0438 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u044f\u0442\u044b\u0445.<\/p>\n<p>  \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043a\u043e\u0431\u043e\u043a \u0438 \u0442\u043e\u0447\u0435\u043a \u0441 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 (<code>;<\/code>) \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0442\u0430\u043c, \u0433\u0434\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"ruby\"># \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c fac(4) \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438: const fac4 = (var x = 1; for i in 1..4: x *= i; x) <\/code><\/pre>\n<p>  <\/p>\n<h2>\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b<\/h2>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <code>echo<\/code> \u0438 <code>readLine<\/code> \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f <em>\u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440.<\/em> (\u0412 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043e\u043d\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f <em>\u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438<\/em> \u0438\u043b\u0438 <em>\u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438.)<\/em> \u0412 Nim \u043d\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 <code>proc<\/code>:<\/p>\n<pre><code class=\"ruby\">proc yes(question: string): bool =   echo(question, &quot; (y\/n)&quot;)   while true:     case readLine(stdin)     of &quot;y&quot;, &quot;Y&quot;, &quot;yes&quot;, &quot;Yes&quot;: return true     of &quot;n&quot;, &quot;N&quot;, &quot;no&quot;, &quot;No&quot;: return false     else: echo(&quot;Please be clear: yes or no&quot;)  if yes(&quot;Should I delete all your important files?&quot;):   echo(&quot;I'm sorry Dave, I'm afraid I can't do that.&quot;) else:   echo(&quot;I think you know what the problem is just as well as I do.&quot;) <\/code><\/pre>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>yes<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0434\u0430\u0451\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0432\u043e\u043f\u0440\u043e\u0441 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>true<\/code>, \u0435\u0441\u043b\u0438 \u043e\u043d \u043e\u0442\u0432\u0435\u0442\u0438\u043b \u00abyes\u00bb, \u0438 <code>false<\/code>, \u0435\u0441\u043b\u0438 \u043e\u043d \u043e\u0442\u0432\u0435\u0442\u0438\u043b \u00abno\u00bb. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>return<\/code> \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043d\u0435\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u0432\u044b\u0445\u043e\u0434\u0443 \u0438\u0437 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b (\u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0446\u0438\u043a\u043b\u0430 <code>while<\/code>). \u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 <code>(question: string): bool<\/code> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <code>question<\/code> \u0438 \u0442\u0438\u043f\u043e\u043c <code>string<\/code> \u0438 \u0432\u0435\u0440\u043d\u0451\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 <code>bool<\/code>. <code>bool<\/code> \u044d\u0442\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0442\u0438\u043f: \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c, \u044d\u0442\u043e <code>true<\/code> \u0438 <code>false<\/code>. \u0423\u0441\u043b\u043e\u0432\u0438\u044f \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445 <code>if<\/code> \u0438\u043b\u0438 <code>while<\/code> \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u0442\u0438\u043f <code>bool<\/code>.<\/p>\n<p>  \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043b\u043e\u0433\u0438\u0438: \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 <code>question<\/code> \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <em>\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c,<\/em> \u0430 <code>&quot;Should I...&quot;<\/code> \u2013 <em>\u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c,<\/em> \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435.<\/p>\n<h3>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>result<\/code><\/h3>\n<p>  \u0412 \u043b\u044e\u0431\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0435, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0435\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043d\u0435\u044f\u0432\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>result<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>return<\/code> \u0431\u0435\u0437 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0434\u043b\u044f <code>return result<\/code>. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>result<\/code> \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0432\u044b\u0445\u043e\u0434\u0435 \u0438\u0437 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>return<\/code> \u043d\u0435 \u0431\u044b\u043b\u043e.<\/p>\n<pre><code class=\"ruby\">proc sumTillNegative(x: varargs[int]): int =   for i in x:     if i &lt; 0:       return     result = result + i  echo sumTillNegative() # \u0432\u044b\u0432\u0435\u0434\u0435\u0442 0 echo sumTillNegative(3, 4, 5) # \u0432\u044b\u0432\u0435\u0434\u0435\u0442 12 echo sumTillNegative(3, 4 , -1 , 6) # \u0432\u044b\u0432\u0435\u0434\u0435\u0442 7 <\/code><\/pre>\n<p>  \u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0442\u0430\u0440\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>result<\/code> \u0432\u0441\u0435\u0433\u0434\u0430 \u0443\u0436\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0430, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u0435\u0451 \u0441\u043d\u043e\u0432\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>var result<\/code>, \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u0437\u0430\u0442\u0435\u043d\u0435\u043d\u0438\u044e \u0435\u0451 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0441 \u0442\u0435\u043c \u0436\u0435 \u0438\u043c\u0435\u043d\u0435\u043c. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>result<\/code> \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0442\u0438\u043f\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0441\u044b\u043b\u043e\u0447\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0443\u0434\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>nil<\/code>, \u0442\u0430\u043a \u0447\u0442\u043e \u0438\u0445 \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/p>\n<h3>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b<\/h3>\n<p>  \u0412 \u0442\u0435\u043b\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430\u043c\u0438. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0445 \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c, \u044d\u0442\u043e \u0434\u0430\u0451\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c. \u0415\u0441\u043b\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u043d\u0443\u0436\u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u0435\u0451 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u0432 \u0442\u0435\u043b\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>var<\/code>. \u0417\u0430\u0442\u0435\u043d\u0435\u043d\u0438\u0435 \u0438\u043c\u0435\u043d\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438 \u0438\u043d\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f:<\/p>\n<pre><code class=\"ruby\">proc printSeq(s: seq, nprinted: int = -1) =   var nprinted = if nprinted == -1: s.len else: min(nprinted, s.len)   for i in 0 .. &lt;nprinted:     echo s[i] <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0435 \u043d\u0443\u0436\u043d\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0432\u044b\u0437\u0432\u0430\u0432\u0448\u0435\u043c\u0443, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>var<\/code>-\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440:<\/p>\n<pre><code class=\"ruby\">proc divmod(a, b: int; res, remainder: var int) =   res = a div b        # \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0434\u0435\u043b\u0435\u043d\u0438\u0435   remainder = a mod b  # \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0432\u0437\u044f\u0442\u0438\u0435 \u043e\u0441\u0442\u0430\u0442\u043a\u0430  var   x, y: int echo(x) divmod(8, 5, x, y) # \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442 x \u0438 y echo(y) <\/code><\/pre>\n<p>  \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 <code>res<\/code> \u0438 <code>remainder<\/code> \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f <em><code>var<\/code>-\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438.<\/em> \u0422\u0430\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0433\u0443\u0442 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043e\u0439 \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u043d\u0443\u0442 \u0432\u0438\u0434\u0438\u043c\u044b \u0432\u044b\u0437\u0432\u0430\u0432\u0448\u0435\u043c\u0443. \u041e\u0442\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435 \u0432\u043c\u0435\u0441\u0442\u043e <code>var<\/code>-\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043b\u0443\u0447\u0448\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043e\u0440\u0442\u0435\u0436.<\/p>\n<h3>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>discard<\/code><\/h3>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0443\u044e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0438 \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0435\u0451 \u0432\u044b\u0437\u043e\u0432\u0430, <strong>\u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>discard<\/code>. \u0412 Nim \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0437\u044f\u0442\u044c \u0438 \u043e\u0442\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0451\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"ruby\">discard yes(&quot;\u041c\u043e\u0436\u043d\u043e \u043c\u043d\u0435 \u0437\u0430\u0434\u0430\u0442\u044c \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441?&quot;) <\/code><\/pre>\n<p>  \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0451\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u044f\u0432\u043d\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u0430\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0438\u043b\u0438 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440 \u0431\u044b\u043b\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u044b \u0441 \u043f\u0440\u0430\u0433\u043c\u043e\u0439 <code>discardable<\/code>:<\/p>\n<pre><code class=\"ruby\">proc p(x, y: int): int {.discardable.} =   return x + y  p(3, 4) # \u0442\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 <\/code><\/pre>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0443 <code>discard<\/code> \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u043b\u043e\u043a\u0430 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432, \u043a\u0430\u043a \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <strong>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438<\/strong>.<\/p>\n<h3>\u0418\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b<\/h3>\n<p>  \u0411\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0443 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u043c\u043d\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u0442\u0440\u0443\u0434\u043d\u043e \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0432 \u043a\u0430\u043a\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u043e\u043d\u0438 \u0438\u0434\u0443\u0442. \u042d\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432\u0435\u0440\u043d\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u0443\u044e\u0442 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440 \u043c\u043e\u0436\u043d\u043e \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u0435\u0435, \u043a\u0430\u043a\u043e\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043a\u0430\u043a\u043e\u043c\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0443 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442:<\/p>\n<pre><code class=\"ruby\">proc createWindow(x, y, width, height: int; title: string;                   show: bool): Window =    ...  var w = createWindow(show = true, title = &quot;My Application&quot;,                      x = 0, y = 0, height = 600, width = 800) <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 <code>createWindow<\/code>, \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041c\u043e\u0436\u043d\u043e \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0441 \u043d\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438, \u043d\u043e \u044d\u0442\u043e \u0443\u0445\u0443\u0434\u0448\u0430\u0435\u0442 \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c:<\/p>\n<pre><code class=\"ruby\">var w = createWindow(0, 0, title = &quot;My Application&quot;,                      height = 600, width = 800, true) <\/code><\/pre>\n<p>  \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0440\u043e\u0432\u043d\u043e \u043e\u0434\u0438\u043d \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442.<\/p>\n<h3>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/h3>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 <code>createWindow<\/code> \u0441\u0442\u0430\u043b\u043e \u043f\u0440\u043e\u0449\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u043e\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c <em>\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e,<\/em> \u0442\u043e \u0435\u0441\u0442\u044c \u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0435\u0441\u043b\u0438 \u0432\u044b\u0437\u0432\u0430\u0432\u0448\u0438\u0439 \u0438\u0445 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043b:<\/p>\n<pre><code class=\"ruby\">proc createWindow(x = 0, y = 0, width = 500, height = 700,                   title = &quot;unknown&quot;,                   show = true): Window =    ...  var w = createWindow(title = &quot;My Application&quot;, height = 600, width = 800) <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 <code>createWindow<\/code> \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043b\u0438\u0448\u044c \u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<p>  \u041e\u0442\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u044b\u0432\u043e\u0434 \u0442\u0438\u043f\u043e\u0432, \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0438\u0441\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>title: string = &quot;unknown&quot;<\/code>.<\/p>\n<h3>\u041f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b<\/h3>\n<p>  Nim \u0434\u0430\u0451\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 C++:<\/p>\n<pre><code class=\"ruby\">proc toString(x: int): string = ... proc toString(x: bool): string =   if x: result = &quot;true&quot;   else: result = &quot;false&quot;  echo(toString(13))   # \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 toString(x: int) echo(toString(true)) # \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 toString(x: bool) <\/code><\/pre>\n<p>  (\u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435, \u0447\u0442\u043e <code>toString<\/code> \u0432 Nim \u043e\u0431\u044b\u0447\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c <code>$<\/code>.) \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0432\u044b\u0431\u0435\u0440\u0435\u0442 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0443\u044e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 <code>toString<\/code>. \u041a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0432\u044b\u0431\u043e\u0440\u0430 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440, \u0442\u0443\u0442 \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 (\u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u043e\u0440\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d \u0432 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435). \u041e\u0434\u043d\u0430\u043a\u043e \u043e\u043d \u043d\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u043c \u0441\u044e\u0440\u043f\u0440\u0438\u0437\u0430\u043c \u0438 \u0431\u0430\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 \u0443\u043d\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u041d\u0435\u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442 \u043a \u0432\u044b\u0432\u043e\u0434\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435.<\/p>\n<h3>\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b<\/h3>\n<p>  \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Nim \u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u2013 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043f\u0440\u0438\u0447\u0438\u043d \u044d\u0442\u043e\u0433\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043d\u0430\u043f\u043e\u0434\u043e\u0431\u0438\u0435 <code>+<\/code> \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430. \u041f\u0430\u0440\u0441\u0435\u0440 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0432 <em>\u0438\u043d\u0444\u0438\u043a\u0441\u043d\u043e\u0439<\/em> <code>(a + b)<\/code> \u0438\u043b\u0438 <em>\u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043d\u043e\u0439 \u043d\u043e\u0442\u0430\u0446\u0438\u0438<\/em> <code>(+ a)<\/code>. \u0418\u043d\u0444\u0438\u043a\u0441\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0434\u0432\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430, \u0430 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043d\u044b\u0439 \u2013 \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0434\u0438\u043d. \u041f\u043e\u0441\u0442\u0444\u0438\u043a\u0441\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u044b, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043d\u0435\u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e\u0441\u0442\u0438: <code>a @ @ b<\/code> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 <code>(a) @ (@b)<\/code> \u0438\u043b\u0438 <code>(a@) @ (b)<\/code>? \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u043e\u0441\u0442\u0444\u0438\u043a\u0441\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0432 Nim \u043d\u0435\u0442, \u044d\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c <code>(a) @ (@b)<\/code>.<\/p>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432-\u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0441\u043b\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a <code>and<\/code>, <code>or<\/code> \u0438 <code>not<\/code>, \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u0442 \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432: <code>+ - * \\ \/ &lt; &gt; = @ $ ~ &amp; % ! ? ^ . |<\/code><\/p>\n<p>  \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u044e\u0442\u0441\u044f. \u041d\u0438\u0447\u0442\u043e \u043d\u0435 \u043f\u043e\u043c\u0435\u0448\u0430\u0435\u0442 \u0432\u0430\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <code>@!?+~<\/code>, \u043d\u043e \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0441\u0442\u0440\u0430\u0434\u0430\u0442\u044c.<\/p>\n<p>  \u041f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0435\u0433\u043e \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u0441\u0438\u043c\u0432\u043e\u043b\u0443. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440, \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0435\u0433\u043e \u0432 \u0430\u043f\u043e\u0441\u0442\u0440\u043e\u0444\u044b:<\/p>\n<pre><code class=\"ruby\">proc `$` (x: myDataType): string = ... # \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 $ \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u0441 myDataType, \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0432\u0430\u044f \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 $, # \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0440\u0430\u043d\u0435\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 <\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u043d\u043e\u0442\u0430\u0446\u0438\u044f \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043a\u0430\u043a \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b:<\/p>\n<pre><code class=\"ruby\">if `==`( `+`(3, 4), 7): echo(&quot;True&quot;) <\/code><\/pre>\n<p>  <\/p>\n<h3>\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f<\/h3>\n<p>  \u041a\u0430\u0436\u0434\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0438 \u0442.\u0434. \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0430, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0435\u0451 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. (\u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u044f\u0437\u044b\u043a\u0430, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u043c\u0435\u0442\u0430\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0442\u043e\u0439 \u0436\u0435 \u0441\u0442\u0435\u043f\u0435\u043d\u0438, \u0432 \u043a\u0430\u043a\u043e\u0439 \u0435\u0433\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 Nim.) \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u043e \u0432\u0437\u0430\u0438\u043c\u043d\u043e \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430\u0445:<\/p>\n<pre><code class=\"ruby\"># \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435: proc even(n: int): bool proc even(n: int): bool  proc odd(n: int): bool =   assert(n &gt;= 0) # \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u0441\u0432\u0430\u043b\u0438\u043c\u0441\u044f \u0432 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u044e   if n == 0: false   else:   n == 1 or even(n-1)  proc even(n: int): bool =   assert(n &gt;= 0) # \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u0441\u0432\u0430\u043b\u0438\u043c\u0441\u044f \u0432 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u044e   if n == 1: false   else:   n == 0 or odd(n-1) <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c <code>odd<\/code> \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 <code>even<\/code> \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, <code>even<\/code> \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443 \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430. \u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0434\u043b\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u0441\u043b\u043e\u0436\u0435\u043d: \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u0435 <code>=<\/code> \u0438 \u0442\u0435\u043b\u043e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b. <code>assert<\/code> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0438 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d \u043f\u043e\u0437\u0434\u043d\u0435\u0435 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <strong>\u041c\u043e\u0434\u0443\u043b\u0438<\/strong>.<\/p>\n<p>  \u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u044f\u0437\u044b\u043a\u0430 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0439 \u0431\u0443\u0434\u0443\u0442 \u043c\u0435\u043d\u0435\u0435 \u0441\u0442\u0440\u043e\u0433\u0438\u043c\u0438.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a \u0442\u0435\u043b\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u0438\u0437 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0447\u044c\u0451 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u044f\u0432\u043d\u043e.<\/p>\n<h2>\u0418\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b<\/h2>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0435\u0440\u043d\u0451\u043c\u0441\u044f \u043a \u0441\u043a\u0443\u0447\u043d\u043e\u043c\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u0441 \u043f\u043e\u0434\u0441\u0447\u0451\u0442\u043e\u043c:<\/p>\n<pre><code class=\"ruby\">echo(&quot;\u0421\u0447\u0438\u0442\u0430\u0435\u043c \u0434\u043e \u0434\u0435\u0441\u044f\u0442\u0438: &quot;) for i in countup(1, 10):   echo($i) <\/code><\/pre>\n<p>  \u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u0441\u0430\u043c\u0438\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 <code>countup<\/code> \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0442\u0430\u043a\u043e\u043c \u0446\u0438\u043a\u043b\u0435? \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c:<\/p>\n<pre><code class=\"ruby\">proc countup(a, b: int): int =   var res = a   while res &lt;= b:     return res     inc(res) <\/code><\/pre>\n<p>  \u0423\u0432\u044b, \u044d\u0442\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0430 <strong>\u0432\u0435\u0440\u043d\u0443\u0442\u044c<\/strong> \u0438 <strong>\u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c<\/strong> \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438. \u0412\u043e\u0442 \u044d\u0442\u043e <em>\u00ab\u0432\u0435\u0440\u043d\u0443\u0442\u044c<\/em> \u0438 <em>\u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c\u00bb<\/em> \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <code>yield<\/code>. \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043b\u0438\u0448\u044c \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e <code>proc<\/code> \u043d\u0430 <code>iterator<\/code> \u0438 \u0432\u043e\u0442 \u043e\u043d \u2013 \u043d\u0430\u0448 \u043f\u0435\u0440\u0432\u044b\u0439 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440:<\/p>\n<pre><code class=\"ruby\">iterator countup(a, b: int): int =   var res = a   while res &lt;= b:     yield res     inc(res) <\/code><\/pre>\n<p>  \u0418\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0438 \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b, \u043d\u043e \u0438\u043c\u0435\u044e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0436\u043d\u044b\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439:  <\/p>\n<ul>\n<li>\u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u0446\u0438\u043a\u043b\u043e\u0432 <code>for<\/code>;<\/li>\n<li>\u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>return<\/code>, \u0430 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>yield<\/code>;<\/li>\n<li>\u0443 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u043d\u0435\u0442 \u043d\u0435\u044f\u0432\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>result<\/code>;<\/li>\n<li>\u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u044e;<\/li>\n<li>\u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u044b \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0438\u0442\u044c (inline) \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440 (\u044d\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u0431\u0440\u0430\u043d\u043e \u0432 \u0431\u0443\u0434\u0443\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430).<\/li>\n<\/ul>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440 <code>closure<\/code>, \u0438\u043c\u0435\u044e\u0449\u0438\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 <a href=\"http:\/\/nim-lang.org\/docs\/manual.html#iterators-and-the-for-statement-first-class-iterators\">\u00ab\u0418\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430\u00bb<\/a>. \u0418\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043c\u043e\u0433\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u0442\u0435 \u0436\u0435 \u0438\u043c\u0435\u043d\u0430 \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0447\u0442\u043e \u0438 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b: \u0443 \u043d\u0438\u0445 \u0441\u0432\u043e\u0451 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0451\u043d. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0441\u0442\u044c \u043e\u0431\u0449\u0435\u043f\u0440\u0438\u043d\u044f\u0442\u0430\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430 \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0432 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u0441 \u0442\u0435\u043c\u0438 \u0436\u0435 \u0438\u043c\u0435\u043d\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043a\u0430\u043f\u043b\u0438\u0432\u0430\u044e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u0435\u0433\u043e \u0432 \u0432\u0438\u0434\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043a\u0430\u043a <code>split<\/code> \u0438\u0437 \u043c\u043e\u0434\u0443\u043b\u044f <code>strutils<\/code>.<\/p>\n<h2>\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u0442\u0438\u043f\u044b<\/h2>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043b\u044f \u043d\u0438\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b.<\/p>\n<h3>\u041b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f<\/h3>\n<p>  \u041b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0442\u0438\u043f \u0432 Nim \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>bool<\/code> \u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0434\u0432\u0443\u0445 \u043f\u0440\u0435\u0434\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <code>true<\/code> \u0438 <code>false<\/code>. \u0423\u0441\u043b\u043e\u0432\u0438\u044f \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445 <code>while<\/code>, <code>if<\/code>, <code>elif<\/code> \u0438 <code>when<\/code> \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u0442\u0438\u043f <code>bool<\/code>.<\/p>\n<p>  \u0414\u043b\u044f \u0442\u0438\u043f\u0430 <code>bool<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b <code>not<\/code>, <code>and<\/code>, <code>or<\/code>, <code>xor<\/code>, <code>&lt;<\/code>, <code>&lt;=<\/code>, <code>&gt;<\/code>, <code>&gt;=<\/code>, <code>!=<\/code> \u0438 <code>==<\/code>. \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b <code>and<\/code> \u0438 <code>or<\/code> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u0441\u043e\u043a\u0440\u0430\u0449\u0451\u043d\u043d\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f. \u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"ruby\">while p != nil and p.name != &quot;xyz&quot;:   # p.name \u043d\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 p == nil   p = p.next <\/code><\/pre>\n<p>  <\/p>\n<h3>\u0421\u0438\u043c\u0432\u043e\u043b\u044b<\/h3>\n<p>  <em>\u0421\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0439<\/em> \u0442\u0438\u043f \u0432 Nim \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>char<\/code>. \u0415\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u0440\u0430\u0432\u0435\u043d \u043e\u0434\u043d\u043e\u043c\u0443 \u0431\u0430\u0439\u0442\u0443. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043e\u043d \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u0431\u043e\u0439 \u0441\u0438\u043c\u0432\u043e\u043b UTF-8, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0433\u043e \u0447\u0430\u0441\u0442\u044c. \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u044d\u0442\u043e\u0433\u043e \u0432 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438: \u0432 \u043f\u043e\u0434\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 UTF-8, \u0442\u0430\u043a \u043a\u0430\u043a UTF-8 \u0431\u044b\u043b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e. \u0421\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u044b\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0438.<\/p>\n<p>  \u0421\u0438\u043c\u0432\u043e\u043b\u044b \u043c\u043e\u0433\u0443\u0442 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 <code>==<\/code>, <code>&lt;<\/code>, <code>&lt;=<\/code>, <code>&gt;<\/code> \u0438 <code>&gt;=<\/code>. \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <code>$<\/code> \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 <code>char<\/code> \u0432 <code>string<\/code>. \u0421\u0438\u043c\u0432\u043e\u043b\u044b \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u0446\u0435\u043b\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438; \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 <code>ord<\/code>. \u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0437 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0441\u0438\u043c\u0432\u043e\u043b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b <code>chr<\/code>.<\/p>\n<h3>\u0421\u0442\u0440\u043e\u043a\u0438<\/h3>\n<p>  \u0421\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 Nim <strong>\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0435<\/strong>, \u0442\u0430\u043a \u0447\u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438 \u043a \u0441\u0442\u0440\u043e\u043a\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0430. \u0421\u0442\u0440\u043e\u043a\u0438 \u0432 Nim \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0443\u043b\u0451\u043c \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043f\u043e\u043b\u0435 \u0434\u043b\u0438\u043d\u044b. \u0414\u043b\u0438\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043e\u0439 <code>len<\/code>; \u0434\u043b\u0438\u043d\u0430 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u044e\u0449\u0438\u0439 \u043d\u043e\u043b\u044c. \u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u044e\u0449\u0435\u043c\u0443 \u043d\u043e\u043b\u044e \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044e \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"ruby\">if s[i] == 'a' and s[i+1] == 'b':   # \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c, \u0447\u0442\u043e i &lt; len(s)!   ... <\/code><\/pre>\n<p>  \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <code>&amp;<\/code> \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0430\u0446\u0438\u0438 \u0441\u0442\u0440\u043e\u043a \u0438 <code>add<\/code> \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<p>  \u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043b\u0435\u043a\u0441\u0438\u043a\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b \u043b\u044e\u0431\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f. \u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044e, \u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438 UTF-8, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u0447\u0442\u0435\u043d\u0438\u0438 \u0441\u0442\u0440\u043e\u043a \u0438\u0437 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u043e\u043d\u0438, \u0441\u043a\u043e\u0440\u0435\u0435, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0431\u0430\u0439\u0442\u043e\u0432. \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f <code>s[i]<\/code> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 <code>i<\/code>-\u0439 <em>\u0441\u0438\u043c\u0432\u043e\u043b<\/em> (\u0430 \u043d\u0435 <code>i<\/code>-\u0439 <em>\u044e\u043d\u0438\u043a\u043e\u0434\u043d\u044b\u0439 \u0441\u0438\u043c\u0432\u043e\u043b)<\/em> \u0441\u0442\u0440\u043e\u043a\u0438 <code>s<\/code>.<\/p>\n<p>  \u0421\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>nil<\/code>. \u041e\u0434\u043d\u0430\u043a\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 <code>nil<\/code> (\u044d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0432\u043e\u0437\u0431\u0443\u0436\u0434\u0435\u043d\u0438\u044e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f) \u043f\u043e \u0441\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0412\u043c\u0435\u0441\u0442\u043e <code>nil<\/code> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0443\u0441\u0442\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0443\u0441\u0442\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 <code>&quot;&quot;<\/code>. \u041d\u043e <code>&quot;&quot;<\/code> \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0432 \u043a\u0443\u0447\u0435, \u0442\u0430\u043a \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441 \u043c\u0435\u0436\u0434\u0443 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<h3>\u0426\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430<\/h3>\n<p>  Nim \u0438\u043c\u0435\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u044b: <code>int<\/code>, <code>int8<\/code>, <code>int16<\/code>, <code>int32<\/code>, <code>int64<\/code>, <code>uint<\/code>, <code>uint8<\/code>, <code>uint16<\/code>, <code>uint32<\/code> \u0438 <code>uint64<\/code>.<\/p>\n<p>  \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0439 \u0442\u0438\u043f <code>int<\/code>. \u0426\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b \u043c\u043e\u0433\u0443\u0442 \u0438\u043c\u0435\u0442\u044c <em>\u0441\u0443\u0444\u0444\u0438\u043a\u0441,<\/em> \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0438\u0439 \u0438\u0445 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u043d\u043e\u0441\u0442\u044c \u043a \u0442\u043e\u043c\u0443 \u0438\u043b\u0438 \u0438\u043d\u043e\u043c\u0443 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u0442\u0438\u043f\u0443:<\/p>\n<pre><code class=\"ruby\">let   x = 0     # x \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f int   y = 0'i8  # y \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f int8   z = 0'i64 # z \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f int64   u = 0'u   # u \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f uint <\/code><\/pre>\n<p>  \u0427\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0434\u0441\u0447\u0451\u0442\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0440\u0430\u0437\u043c\u0435\u0449\u0451\u043d\u043d\u044b\u0445 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438, \u0442\u0430\u043a \u0447\u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0440 <code>int<\/code> \u0440\u0430\u0432\u0435\u043d \u0440\u0430\u0437\u043c\u0435\u0440\u0443 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b <code>+<\/code>, <code>-<\/code>, <code>*<\/code>, <code>div<\/code>, <code>mod<\/code>, <code>&lt;<\/code>, <code>&lt;=<\/code>, <code>==<\/code>, <code>!=<\/code>, <code>&gt;<\/code> \u0438 <code>&gt;=<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0434\u043b\u044f \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b <code>and<\/code>, <code>or<\/code>, <code>xor<\/code> \u0438 <code>not<\/code> \u0442\u0430\u043a\u0436\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0434\u043b\u044f \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. \u0411\u0438\u0442\u043e\u0432\u044b\u0439 \u0441\u0434\u0432\u0438\u0433 \u0432\u043b\u0435\u0432\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <code>shl<\/code>, \u0430 \u0441\u0434\u0432\u0438\u0433 \u0432\u043f\u0440\u0430\u0432\u043e \u2013 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <code>shr<\/code>. \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0431\u0438\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0434\u0432\u0438\u0433\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u0442\u0440\u0430\u043a\u0442\u0443\u044e\u0442 \u0441\u0432\u043e\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043a\u0430\u043a \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u0447\u0438\u0441\u043b\u043e. \u041e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0412\u0441\u0435 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043d\u0430\u0431\u0436\u0435\u043d\u044b \u043e\u0431\u0451\u0440\u0442\u043a\u0430\u043c\u0438, \u043e\u043d\u0438 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043e\u0448\u0438\u0431\u043a\u0430\u043c \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0438\u043f\u043e\u0432 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445, \u0433\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u044b. \u041e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 \u0432\u0435\u0434\u0451\u0442 \u043a \u043f\u043e\u0442\u0435\u0440\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u0432\u043e\u0437\u0431\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 <code>EOutOfRange<\/code> (\u0435\u0441\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0430 \u043d\u0435 \u0431\u044b\u043b\u0430 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0430 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438).<\/p>\n<h3>\u0427\u0438\u0441\u043b\u0430 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439<\/h3>\n<p>  Nim \u0438\u043c\u0435\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0447\u0438\u0441\u0435\u043b \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439: <code>float<\/code>, <code>float32<\/code> \u0438 <code>float64<\/code>.<\/p>\n<p>  \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u0438\u043f <code>float<\/code>. \u0412 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <code>float<\/code> \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u043c\u0435\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 64 \u0431\u0438\u0442\u0430.<\/p>\n<p>  \u041b\u0438\u0442\u0435\u0440\u0430\u043b\u044b \u0447\u0438\u0441\u0435\u043b \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u043c\u043e\u0433\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u0441\u0443\u0444\u0444\u0438\u043a\u0441, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0438\u0439 \u0438\u0445 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u043d\u043e\u0441\u0442\u044c \u043a \u0442\u043e\u043c\u0443 \u0438\u043b\u0438 \u0438\u043d\u043e\u043c\u0443 \u0442\u0438\u043f\u0443 \u0447\u0438\u0441\u0435\u043b \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439:<\/p>\n<pre><code class=\"ruby\">var   x = 0.0      # x \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f float   y = 0.0'f32  # y \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f float32   z = 0.0'f64  # z \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f float64 <\/code><\/pre>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b <code>+<\/code>, <code>-<\/code>, <code>*<\/code>, <code>\/<\/code>, <code>&lt;<\/code>, <code>&lt;=<\/code>, <code>==<\/code>, <code>!=<\/code>, <code>&gt;<\/code> \u0438 <code>&gt;=<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0434\u043b\u044f \u0447\u0438\u0441\u0435\u043b \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443 IEEE.<\/p>\n<p>  \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0438\u043f\u043e\u0432 \u0432 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445 \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0432\u0438\u0434\u0430\u043c\u0438 \u0442\u0438\u043f\u043e\u0432 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f: \u043c\u0435\u043d\u044c\u0448\u0438\u0435 \u0442\u0438\u043f\u044b \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u0435. \u0426\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u043d\u0435 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432 \u0442\u0438\u043f\u044b \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442. \u0414\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0439 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b <code>toInt<\/code> \u0438 <code>toFloat<\/code>.<\/p>\n<h3>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0438\u043f\u043e\u0432<\/h3>\n<p>  \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0431\u0430\u0437\u043e\u0432\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0432 Nim \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u0451\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0438\u043f\u0430 \u043a\u0430\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<pre><code class=\"ruby\">var   x: int32 = 1.int32   #  \u0442\u043e \u0436\u0435, \u0447\u0442\u043e \u0432\u044b\u0437\u043e\u0432 int32(1)   y: int8  = int8('a') # 'a' == 97'i8   z: float = 2.5       # int(2.5) \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e 2   sum: int = int(x) + int(y) + int(z) # sum == 100 <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u043e\u0432<\/h2>\n<p>  \u041a\u0430\u043a \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u043e\u0441\u044c \u0440\u0430\u043d\u0435\u0435, \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0441\u0442\u0440\u043e\u043a\u0443 <code>$<\/code> \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043b\u044e\u0431\u043e\u0439 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0442\u0438\u043f \u0432 \u0441\u0442\u0440\u043e\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b <code>echo<\/code>. \u041e\u0434\u043d\u0430\u043a\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <code>$<\/code> \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0438\u043b\u0438 \u0442\u0438\u043f\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u043f\u043e\u043a\u0430 \u0432\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u0435 \u0435\u0433\u043e \u0434\u043b\u044f \u043d\u0438\u0445.<\/p>\n<p>  \u0418\u043d\u043e\u0433\u0434\u0430 \u043f\u0440\u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0443\u0437\u043d\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u043d\u0435 \u043f\u0440\u0438\u0431\u0435\u0433\u0430\u044f \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <code>$<\/code>. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043e\u0439 <code>repr<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043b\u044e\u0431\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0438 \u0434\u0430\u0436\u0435 \u0441\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0433\u0440\u0430\u0444\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u0434\u043b\u044f \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 <code>$<\/code> \u0438 <code>repr<\/code>:<\/p>\n<pre><code class=\"ruby\">var   myBool = true   myCharacter = 'n'   myString = &quot;nim&quot;   myInteger = 42   myFloat = 3.14 echo($myBool, &quot;:&quot;, repr(myBool)) # --&gt; true:true echo($myCharacter, &quot;:&quot;, repr(myCharacter)) # --&gt; n:'n' echo($myString, &quot;:&quot;, repr(myString)) # --&gt; nim:0x10fa8c050&quot;nim&quot; echo($myInteger, &quot;:&quot;, repr(myInteger)) # --&gt; 42:42 echo($myFloat, &quot;:&quot;, repr(myFloat)) # --&gt; 3.1400000000000001e+00:3.1400000000000001e+00 <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0442\u0438\u043f\u044b<\/h2>\n<p>  \u041d\u043e\u0432\u044b\u0435 \u0442\u0438\u043f\u044b \u0432 Nim \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>type<\/code>:<\/p>\n<pre><code class=\"ruby\">type   biggestInt = int64      # \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0439 \u0442\u0438\u043f, \u0431\u043e\u043b\u044c\u0448\u0438\u0439, \u0447\u0435\u043c \u044d\u0442\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e   biggestFloat = float64  # \u0442\u0438\u043f \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439, \u0431\u043e\u043b\u044c\u0448\u0438\u0439, \u0447\u0435\u043c \u044d\u0442\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e <\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c\u0441\u044f \u00ab\u043d\u0430 \u043b\u0435\u0442\u0443\u00bb, \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 <code>type<\/code>.<\/p>\n<h3>\u041f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f<\/h3>\n<p>  \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0430\u044f\u0441\u044f \u043a \u0442\u0438\u043f\u0443 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439, \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043b\u0438\u0448\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u042d\u0442\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432. \u041a\u0430\u0436\u0434\u044b\u0439 \u0441\u0438\u043c\u0432\u043e\u043b \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u041f\u0435\u0440\u0432\u044b\u0439 \u0441\u0438\u043c\u0432\u043e\u043b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0447\u0438\u0441\u043b\u0443 0, \u0432\u0442\u043e\u0440\u043e\u0439 \u2013 \u0447\u0438\u0441\u043b\u0443 1 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"ruby\">type   Direction = enum     north, east, south, west  var x = south      # `x` \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f `Direction`; \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 `south` echo($x)           # \u0432\u044b\u0432\u043e\u0434\u0438\u0442 &quot;south&quot; \u043d\u0430 `stdout` <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043b\u044e\u0431\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0412\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u043d\u0438\u0435 \u043d\u0435\u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e\u0441\u0442\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043a\u0432\u0430\u043b\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u044b: <code>Direction.south<\/code>.<\/p>\n<p>  \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <code>$<\/code> \u043c\u043e\u0436\u0435\u0442 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432 \u0435\u0433\u043e \u0438\u043c\u044f, \u0430 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 <code>ord<\/code> \u2013 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0414\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u044f\u0437\u044b\u043a\u0430\u043c\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043c\u043e\u0433\u0443\u0442 \u044f\u0432\u043d\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0442\u044c\u0441\u044f \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041e\u0434\u043d\u0430\u043a\u043e \u043e\u043d\u0438 \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043d\u0438\u044f. \u0421\u0438\u043c\u0432\u043e\u043b, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043d\u0435 \u0431\u044b\u043b\u043e \u044f\u0432\u043d\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043e \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u043f\u043b\u044e\u0441 1.<\/p>\n<p>  \u042f\u0432\u043d\u043e \u043f\u0440\u043e\u043d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0438:<\/p>\n<pre><code class=\"ruby\">type   MyEnum = enum     a = 2, b = 4, c = 89 <\/code><\/pre>\n<p>  <\/p>\n<h3>\u041f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u043c\u044b\u0435 \u0442\u0438\u043f\u044b<\/h3>\n<p>  \u041f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0431\u0435\u0437 \u0440\u0430\u0437\u0440\u044b\u0432\u043e\u0432, \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u044b, <code>char<\/code>, <code>bool<\/code> (\u0438 \u0438\u0445 \u043f\u043e\u0434\u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b) \u2013 \u0432\u0441\u0435 \u043e\u043d\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u043c\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438. \u0414\u043b\u044f \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u043c\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439:  <\/p>\n<table>\n<tr>\n<th>\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f<\/th>\n<th>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439<\/th>\n<\/tr>\n<tr>\n<td><code>ord(x)<\/code><\/td>\n<td>\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>x<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>inc(x)<\/code><\/td>\n<td>\u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 <code>x<\/code> \u043d\u0430 1<\/td>\n<\/tr>\n<tr>\n<td><code>inc(x, n)<\/code><\/td>\n<td>\u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 <code>x<\/code> \u043d\u0430 <code>n<\/code>; <code>n<\/code> \u2013 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e<\/td>\n<\/tr>\n<tr>\n<td><code>dec(x)<\/code><\/td>\n<td>\u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442 <code>x<\/code> \u043d\u0430 1<\/td>\n<\/tr>\n<tr>\n<td><code>dec(x, n)<\/code><\/td>\n<td>\u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442 <code>x<\/code> \u043d\u0430 <code>n<\/code>; <code>n<\/code> \u2013 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e<\/td>\n<\/tr>\n<tr>\n<td><code>succ(x)<\/code><\/td>\n<td>\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u0430 <code>x<\/code> \u044d\u043b\u0435\u043c\u0435\u043d\u0442<\/td>\n<\/tr>\n<tr>\n<td><code>succ(x, n)<\/code><\/td>\n<td>\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>n<\/code>-\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u0430 <code>x<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>pred(x)<\/code><\/td>\n<td>\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a\u0430 <code>x<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>pred(x, n)<\/code><\/td>\n<td>\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>n<\/code>-\u0433\u043e \u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a\u0430 <code>x<\/code><\/td>\n<\/tr>\n<\/table>\n<p>  \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 <code>inc<\/code>, <code>dec<\/code>, <code>succ<\/code> \u0438 <code>pred<\/code> \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c\u0441\u044f \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439, \u0432\u043e\u0437\u0431\u0443\u0434\u0438\u0432 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 <code>EOutOfRange<\/code> \u0438\u043b\u0438 <code>EOverflow<\/code>. (\u0415\u0441\u043b\u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043a\u043e\u0434 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d \u0441\u043e \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u043c\u0438 \u043d\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.)<\/p>\n<h3>\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b<\/h3>\n<p>  \u042d\u0442\u043e\u0442 \u0442\u0438\u043f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f (\u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0442\u0438\u043f\u0430). \u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"ruby\">type   Subrange = range[0..5] <\/code><\/pre>\n<p>  <code>Subrange<\/code> \u044d\u0442\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d <code>int<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0442 0 \u0434\u043e 5. \u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u044e\u0431\u044b\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u0438\u043f\u0430 <code>Subrange<\/code> \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u043e\u0448\u0438\u0431\u043a\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0438\u043b\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043e\u0434\u043d\u043e\u043c\u0443 \u0438\u0437 \u0435\u0433\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u0432 (\u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442) \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u041c\u043e\u0434\u0443\u043b\u044c <code>system<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0432\u0430\u0436\u043d\u044b\u0439 \u0442\u0438\u043f <code>Natural<\/code> \u043a\u0430\u043a <code>range[0..high(int)]<\/code> (<code>high<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043c\u0430\u043a\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435). \u0414\u0440\u0443\u0433\u0438\u0435 \u044f\u0437\u044b\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043d\u0443\u0436\u0434\u0430\u044e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430. \u042d\u0442\u043e \u0447\u0430\u0441\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442 <strong>\u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e<\/strong>: \u0432\u0430\u0441 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u0443\u044e \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0443 \u043b\u0438\u0448\u044c \u043f\u043e \u0442\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435, \u0447\u0442\u043e \u0447\u0438\u0441\u043b\u0430 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438. \u0422\u0438\u043f <code>Natural<\/code> \u044f\u0437\u044b\u043a\u0430 Nim \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u044d\u0442\u043e\u0439 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<h3>\u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430<\/h3>\n<p>  \u0422\u0438\u043f <code>set<\/code> \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u0443\u0435\u0442 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430. \u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u0442\u0438\u043f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u043c\u044b\u043c \u0442\u0438\u043f\u043e\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e: <\/p>\n<ul>\n<li><code>int8-int16<\/code><\/li>\n<li><code>uint8\/byte-uint16<\/code><\/li>\n<li><code>char<\/code><\/li>\n<li><code>enum<\/code><\/li>\n<\/ul>\n<p> \u0438\u043b\u0438 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b\u043c. \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u043a\u0430\u043a \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0431\u0438\u0442\u043e\u0432\u044b\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u044b. \u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u0442\u0438\u043f\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u043e\u0448\u0438\u0431\u043a\u0435:<\/p>\n<pre><code class=\"ruby\">var s: set[int64] # Error: set is too large <\/code><\/pre>\n<p>  \u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430: <code>{}<\/code> \u044d\u0442\u043e \u043f\u0443\u0441\u0442\u043e\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e. \u041f\u0443\u0441\u0442\u043e\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e \u043f\u043e \u0442\u0438\u043f\u0443 \u0441 \u043b\u044e\u0431\u044b\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u0442\u0438\u043f\u043e\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430. \u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 (\u0438 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432):<\/p>\n<pre><code class=\"ruby\">type   CharSet = set[char] var   x: CharSet x = {'a'..'z', '0'..'9'} # \u0417\u0434\u0435\u0441\u044c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0435 \u0431\u0443\u043a\u0432\u044b \u043e\u0442                          # 'a' \u0434\u043e 'z' \u0438 \u0446\u0438\u0444\u0440\u044b \u043e\u0442 '0' \u0434\u043e '9' <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438:  <\/p>\n<table>\n<tr>\n<th>\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f<\/th>\n<th>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/th>\n<\/tr>\n<tr>\n<td><code>A + B<\/code><\/td>\n<td>\u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432<\/td>\n<\/tr>\n<tr>\n<td><code>A * B<\/code><\/td>\n<td>\u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432<\/td>\n<\/tr>\n<tr>\n<td><code>A - B<\/code><\/td>\n<td>\u0440\u0430\u0437\u043d\u043e\u0441\u0442\u044c \u0434\u0432\u0443\u0445 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432 (<code>A<\/code> \u0431\u0435\u0437 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 <code>B<\/code>)<\/td>\n<\/tr>\n<tr>\n<td><code>A == B<\/code><\/td>\n<td>\u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432<\/td>\n<\/tr>\n<tr>\n<td><code>A &lt;= B<\/code><\/td>\n<td>\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 (<code>A<\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c <code>B<\/code> \u0438\u043b\u0438 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e <code>B<\/code>)<\/td>\n<\/tr>\n<tr>\n<td><code>A &lt; B<\/code><\/td>\n<td>\u0441\u0442\u0440\u043e\u0433\u043e\u0435 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 (<code>A<\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c <code>B<\/code>)<\/td>\n<\/tr>\n<tr>\n<td><code>e in A<\/code><\/td>\n<td>\u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0443 (<code>A<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 <code>e<\/code>)<\/td>\n<\/tr>\n<tr>\n<td><code>e notin A<\/code><\/td>\n<td><code>A<\/code> \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 <code>e<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>contains(A, e)<\/code><\/td>\n<td><code>A<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 <code>e<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>card(A)<\/code><\/td>\n<td>\u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c <code>A<\/code> (\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 <code>A<\/code>)<\/td>\n<\/tr>\n<tr>\n<td><code>incl(A, elem)<\/code><\/td>\n<td>\u0442\u043e \u0436\u0435, \u0447\u0442\u043e <code>A = A + {elem}<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>excl(A, elem)<\/code><\/td>\n<td>\u0442\u043e \u0436\u0435, \u0447\u0442\u043e <code>A = A - {elem}<\/code><\/td>\n<\/tr>\n<\/table>\n<p>  \u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0444\u043b\u0430\u0433\u043e\u0432 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b. \u042d\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0435 (\u0438 \u0442\u0438\u043f\u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0435) \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0447\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0434\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0435\u0439 <code>or<\/code>.<\/p>\n<h3>\u041c\u0430\u0441\u0441\u0438\u0432\u044b<\/h3>\n<p>  \u041c\u0430\u0441\u0441\u0438\u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430. \u0412\u0441\u0435 \u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438\u043c\u0435\u044e\u0442 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u0442\u0438\u043f. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043b\u044e\u0431\u043e\u0439 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u043c\u044b\u0439 \u0442\u0438\u043f.<\/p>\n<p>  \u041c\u0430\u0441\u0441\u0438\u0432 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>[]<\/code>:<\/p>\n<pre><code class=\"ruby\">type   IntArray = array[0..5, int] # \u043c\u0430\u0441\u0441\u0438\u0432 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043e\u0442 0 \u0434\u043e 5 var   x: IntArray x = [1, 2, 3, 4, 5, 6] for i in low(x)..high(x):   echo(x[i]) <\/code><\/pre>\n<p>  \u041d\u043e\u0442\u0430\u0446\u0438\u044f <code>x[i]<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a <code>i<\/code>-\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 <code>x<\/code>. \u041f\u0440\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0435 \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0433\u0440\u0430\u043d\u0438\u0446 (\u043b\u0438\u0431\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u043b\u0438\u0431\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f). \u042d\u0442\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0440\u0430\u0433\u043c\u0430\u043c\u0438 \u0438\u043b\u0438 \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0441 \u043a\u043b\u044e\u0447\u043e\u043c <code>--bound_checks:off<\/code>.<\/p>\n<p>  \u041c\u0430\u0441\u0441\u0438\u0432\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u0438\u043f\u0430\u043c\u0438-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438, \u043a\u0430\u043a \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u0438\u043f\u044b Nim. \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0446\u0435\u043b\u0438\u043a\u043e\u043c.<\/p>\n<p>  \u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 <code>len<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0434\u043b\u0438\u043d\u0443 \u043c\u0430\u0441\u0441\u0438\u0432\u0430. <code>low(a)<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 <code>a<\/code>, \u0430 <code>high(a)<\/code> \u2013 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0438\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441.<\/p>\n<pre><code class=\"ruby\">type   Direction = enum     north, east, south, west   BlinkLights = enum     off, on, slowBlink, mediumBlink, fastBlink   LevelSetting = array[north..west, BlinkLights] var   level: LevelSetting level[north] = on level[south] = slowBlink level[east] = fastBlink echo repr(level)  # --&gt; [on, fastBlink, slowBlink, off] echo low(level)   # --&gt; north echo len(level)   # --&gt; 4 echo high(level)  # --&gt; west <\/code><\/pre>\n<p>  \u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0434\u043b\u044f \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432 (\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c) \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0445 \u0441\u043a\u043e\u0431\u043e\u043a, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u0431\u044b\u0447\u043d\u043e \u043a\u0430\u0436\u0434\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0442\u043e\u0433\u043e \u0436\u0435 \u0442\u0438\u043f\u0430, \u0447\u0442\u043e \u0438 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435. \u0412 Nim \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438, \u0442\u0430\u043a \u0447\u0442\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0440\u0443\u0433\u043e\u0439. \u041e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u0433\u0434\u0435 <code>level<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d \u043a\u0430\u043a \u043c\u0430\u0441\u0441\u0438\u0432 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439, \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435\u043c, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u0434\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0442\u0438\u043f\u0443 \u043c\u0430\u044f\u043a\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0442\u044c\u0441\u044f \u043f\u043e \u0443\u0440\u043e\u0432\u043d\u044f\u043c, \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0438\u0445 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441:<\/p>\n<pre><code class=\"ruby\">type   LightTower = array[1..10, LevelSetting] var   tower: LightTower tower[1][north] = slowBlink tower[1][east] = mediumBlink echo len(tower)     # --&gt; 10 echo len(tower[1])  # --&gt; 4 echo repr(tower)    # --&gt; [[slowBlink, mediumBlink, ...\u0438 \u0442.\u0434... # \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u043d\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0438\u0437-\u0437\u0430 \u043d\u0435\u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u043e\u0432 #tower[north][east] = on #tower[0][1] = on <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 <code>len<\/code> \u0432\u0435\u0440\u043d\u0451\u0442 \u0434\u043b\u0438\u043d\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f. \u0427\u0442\u043e\u0431\u044b \u0435\u0449\u0451 \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u043f\u0440\u0438\u0440\u043e\u0434\u0443 <code>LightTower<\/code>, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 <code>LevelSetting<\/code>, \u0430 \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0442\u0438\u043f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"ruby\">type   LightTower = array[1..10, array[north..west, BlinkLights]] <\/code><\/pre>\n<p>  \u0414\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0447\u0430\u0441\u0442\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0441 \u043d\u0443\u043b\u044f, \u0442\u0430\u043a \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0441\u043e\u043a\u0440\u0430\u0449\u0451\u043d\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 \u043e\u0442 \u043d\u0443\u043b\u044f \u0434\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043c\u0438\u043d\u0443\u0441 \u043e\u0434\u0438\u043d:<\/p>\n<pre><code class=\"ruby\">type   IntArray = array[0..5, int] # \u043c\u0430\u0441\u0441\u0438\u0432, \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043e\u0442 0 \u0434\u043e 5   QuickArray = array[6, int]  # \u043c\u0430\u0441\u0441\u0438\u0432, \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043e\u0442 0 \u0434\u043e 5 var   x: IntArray   y: QuickArray x = [1, 2, 3, 4, 5, 6] y = x for i in low(x)..high(x):   echo(x[i], y[i]) <\/code><\/pre>\n<p>  <\/p>\n<h3>\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0445\u043e\u0436\u0438 \u043d\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u044b, \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0445 \u0434\u043b\u0438\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u0445\u043e\u0434\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f (\u043a\u0430\u043a \u0443 \u0441\u0442\u0440\u043e\u043a). \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440, \u043e\u043d\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f \u0432 \u043a\u0443\u0447\u0435 \u0438 \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u044e\u0442 \u0432 \u0441\u0431\u043e\u0440\u043a\u0435 \u043c\u0443\u0441\u043e\u0440\u0430.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0443\u044e\u0442\u0441\u044f <code>int<\/code>, \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u043c\u0441\u044f \u0441 0. \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 <code>len<\/code>, <code>low<\/code> \u0438 <code>high<\/code> \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u044b \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439. \u041d\u043e\u0442\u0430\u0446\u0438\u044f <code>x[i]<\/code> \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a <code>i<\/code>-\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 <code>x<\/code>.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0433\u0443\u0442 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 <code>[]<\/code>, \u0441\u043e\u0435\u0434\u0438\u043d\u0451\u043d\u043d\u043e\u0433\u043e \u0441 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c <code>@<\/code>. \u0414\u0440\u0443\u0433\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0432\u044b\u0437\u043e\u0432\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b <code>newSeq<\/code>.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 <code>openarray<\/code>.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"ruby\">var   x: seq[int] # \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b x = @[1, 2, 3, 4, 5, 6] # @ \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0440\u0430\u0437\u043c\u0435\u0449\u0451\u043d\u043d\u0443\u044e \u0432 \u043a\u0443\u0447\u0435 <\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <code>nil<\/code>. \u041e\u0434\u043d\u0430\u043a\u043e, \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043d\u0430\u0434 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 <code>nil<\/code> (\u044d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u0432\u043e\u0437\u0431\u0443\u0436\u0434\u0435\u043d\u0438\u044e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f) \u043f\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e. \u0422\u0430\u043a \u0447\u0442\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0443\u0441\u0442\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0443\u0441\u0442\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c <code>@[]<\/code>, \u0430 \u043d\u0435 <code>nil<\/code>. \u041d\u043e <code>@[]<\/code> \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432 \u043a\u0443\u0447\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u043e\u0435 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f.<\/p>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>for<\/code>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043e\u0434\u043d\u043e\u0439 \u0438\u043b\u0438 \u0434\u0432\u0443\u043c\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438. \u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0444\u043e\u0440\u043c\u0443 \u0441 \u043e\u0434\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>for<\/code> \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u043c \u0438\u0437 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <code>items()<\/code> \u043c\u043e\u0434\u0443\u043b\u044f <code>system<\/code>. \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0444\u043e\u0440\u043c\u0443 \u0441 \u0434\u0432\u0443\u043c\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438, \u0442\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0432\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043d\u0434\u0435\u043a\u0441 \u043f\u043e\u0437\u0438\u0446\u0438\u0438, \u0430 \u0432\u0442\u043e\u0440\u0430\u044f \u2013 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>for<\/code> \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <code>pairs()<\/code> \u0438\u0437 \u043c\u043e\u0434\u0443\u043b\u044f <code>system<\/code>. \u041f\u0440\u0438\u043c\u0435\u0440\u044b:<\/p>\n<pre><code class=\"ruby\">for i in @[3, 4, 5]:   echo($i) # --&gt; 3 # --&gt; 4 # --&gt; 5  for i, value in @[3, 4, 5]:   echo(&quot;index: &quot;, $i, &quot;, value:&quot;, $value) # --&gt; index: 0, value:3 # --&gt; index: 1, value:4 # --&gt; index: 2, value:5 <\/code><\/pre>\n<p>  <\/p>\n<h3>\u041e\u0442\u043a\u0440\u044b\u0442\u044b\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u044b<\/h3>\n<p>  <\/p>\n<blockquote><p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435<\/strong>: \u041e\u0442\u043a\u0440\u044b\u0442\u044b\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432.<\/p><\/blockquote>\n<p> \u0427\u0430\u0441\u0442\u043e \u0432\u044b\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0433\u0438\u0431\u043a\u0438: \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430\u043c \u0431\u044b\u0432\u0430\u0435\u0442 \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0434\u0435\u043b\u043e \u0441 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0442\u0438\u043f \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430. \u041e\u0442\u043a\u0440\u044b\u0442\u044b\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0446\u0435\u043b\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u0438 \u043d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 0. \u0414\u043b\u044f \u043d\u0438\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 <code>len<\/code>, <code>low<\/code> \u0438 <code>high<\/code>. \u041b\u044e\u0431\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0441 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u043c \u0442\u0438\u043f\u043e\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u043d \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u0442\u0438\u043f \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"ruby\">var   fruits:   seq[string]       # \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0440\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u0430\u044f                               # \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c 'nil'   capitals: array[3, string]  # \u043c\u0430\u0441\u0441\u0438\u0432 \u0441\u0442\u0440\u043e\u043a \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c  fruits = @[]                  # \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0432 \u043a\u0443\u0447\u0435 \u043f\u0443\u0441\u0442\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043d\u0430                               # \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u0443\u0434\u0435\u0442 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f 'fruits'  capitals = [&quot;New York&quot;, &quot;London&quot;, &quot;Berlin&quot;]   # \u043c\u0430\u0441\u0441\u0438\u0432 'capitals' \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442                                               # \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u043b\u0438\u0448\u044c \u0442\u0440\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 fruits.add(&quot;Banana&quot;)          # \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c 'fruits' \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438                               # \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u0442\u0441\u044f \u0432 \u0445\u043e\u0434\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f fruits.add(&quot;Mango&quot;)  proc openArraySize(oa: openArray[string]): int =   oa.len  assert openArraySize(fruits) == 2     # \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c                                       # \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 assert openArraySize(capitals) == 3   # \u043d\u043e \u0438 \u043c\u0430\u0441\u0441\u0438\u0432 \u0442\u043e\u0436\u0435 <\/code><\/pre>\n<p>  \u0422\u0438\u043f \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c: \u043c\u043d\u043e\u0433\u043e\u043c\u0435\u0440\u043d\u044b\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0443\u0436\u0434\u0430 \u0432 \u043d\u0438\u0445 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0440\u0435\u0434\u043a\u043e \u0438 \u0438\u0445 \u043d\u0435\u043b\u044c\u0437\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e.<\/p>\n<h3>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432<\/h3>\n<p>  \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>varargs<\/code> \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432. \u041e\u0434\u043d\u0430\u043a\u043e, \u0432\u0434\u043e\u0431\u0430\u0432\u043e\u043a \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u043b\u044e\u0431\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432:<\/p>\n<pre><code class=\"ruby\">proc myWriteln(f: File, a: varargs[string]) =   for s in items(a):     write(f, s)   write(f, &quot;\\n&quot;)  myWriteln(stdout, &quot;abc&quot;, &quot;def&quot;, &quot;xyz&quot;) # \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c \u0432: myWriteln(stdout, [&quot;abc&quot;, &quot;def&quot;, &quot;xyz&quot;]) <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>varargs<\/code> \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0438\u043f\u043e\u0432 \u0432 \u044d\u0442\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435:<\/p>\n<pre><code class=\"ruby\">proc myWriteln(f: File, a: varargs[string, `$`]) =   for s in items(a):     write(f, s)   write(f, &quot;\\n&quot;)  myWriteln(stdout, 123, &quot;abc&quot;, 4.0) # \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c \u0432: myWriteln(stdout, [$123, $&quot;abc&quot;, $4.0]) <\/code><\/pre>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 <code>$<\/code> \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0443, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>a<\/code>. \u0417\u0430\u043c\u0435\u0442\u044c\u0442\u0435, \u0447\u0442\u043e <code>$<\/code>, \u043f\u0440\u0438\u043c\u0435\u043d\u0451\u043d\u043d\u044b\u0439 \u043a \u0441\u0442\u0440\u043e\u043a\u0430\u043c, \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e.<\/p>\n<h3>\u0421\u043b\u0430\u0439\u0441\u044b<\/h3>\n<p>  \u0421\u043b\u0430\u0439\u0441\u044b \u043f\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0443 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0442\u0438\u043f\u0430\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u0432, \u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435. \u0421\u043b\u0430\u0439\u0441 \u2013 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 <code>Slice<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0432\u0435 \u0433\u0440\u0430\u043d\u0438\u0446\u044b, <code>a<\/code> \u0438 <code>b<\/code>. \u0421\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u0441\u043b\u0430\u0439\u0441 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u0435\u043d, \u043d\u043e \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u0438\u043f\u044b \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u044b <code>Slice<\/code> \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u0432.<\/p>\n<pre><code class=\"ruby\">  var     a = &quot;Nim is a progamming language&quot;     b = &quot;Slices are useless.&quot;    echo a[7..12] # --&gt; 'a prog'   b[11..^2] = &quot;useful&quot;   echo b # --&gt; 'Slices are useful.' <\/code><\/pre>\n<p>  \u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u043b\u0430\u0439\u0441\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430 \u0441\u0442\u0440\u043e\u043a\u0438. \u0413\u0440\u0430\u043d\u0438\u0446\u044b \u0441\u043b\u0430\u0439\u0441\u0430 \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0445 \u0442\u0438\u043f\u043e\u043c, \u043d\u043e \u043b\u0438\u0448\u044c \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0430\u044f \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u043b\u0430\u0439\u0441\u0430, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043f\u0440\u0438\u043c\u0435\u0442 \u043b\u0438 \u043e\u043d\u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<h3>\u041a\u043e\u0440\u0442\u0435\u0436\u0438 (tuples)<\/h3>\n<p>  \u0422\u0438\u043f \u043a\u043e\u0440\u0442\u0435\u0436\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u044f \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u0438 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u044d\u0442\u0438\u0445 \u043f\u043e\u043b\u0435\u0439. \u0414\u043b\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 <code>()<\/code>. \u041f\u043e\u0440\u044f\u0434\u043e\u043a \u043f\u043e\u043b\u0435\u0439 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u043c \u043f\u043e\u043b\u0435\u0439 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043a\u043e\u0440\u0442\u0435\u0436\u0430. \u0420\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439 \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b\u043c\u0438, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0437\u0430\u0434\u0430\u044e\u0442 \u043f\u043e\u043b\u044f \u0442\u0435\u0445 \u0436\u0435 \u0442\u0438\u043f\u043e\u0432 \u0441 \u0442\u0435\u043c\u0438 \u0436\u0435 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 \u0432 \u0442\u043e\u043c \u0436\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0435.<\/p>\n<p>  \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442. \u041d\u043e\u0442\u0430\u0446\u0438\u044f <code>t.field<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043f\u043e\u043b\u044e \u043a\u043e\u0440\u0442\u0435\u0436\u0430. \u0414\u0440\u0443\u0433\u0430\u044f \u043d\u043e\u0442\u0430\u0446\u0438\u044f, <code>t[i]<\/code> \u0434\u0430\u0451\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a <code>i<\/code>-\u043c\u0443 \u043f\u043e\u043b\u044e (<code>i<\/code> \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0439 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043e\u0439).<\/p>\n<pre><code class=\"ruby\">type   Person = tuple[name: string, age: int] # \u0442\u0438\u043f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0441\u043e\u043d\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f                                          # \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0438\u043c\u0435\u043d\u0438 \u0438 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430 var   person: Person person = (name: &quot;Peter&quot;, age: 30) # \u0442\u043e \u0436\u0435, \u043d\u043e \u043c\u0435\u043d\u0435\u0435 \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e: person = (&quot;Peter&quot;, 30)  echo(person.name) # &quot;Peter&quot; echo(person.age)  # 30  echo(person[0]) # &quot;Peter&quot; echo(person[1]) # 30  # \u0412\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c \u043a\u043e\u0440\u0442\u0435\u0436\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u043a\u0446\u0438\u0438 \u0442\u0438\u043f\u043e\u0432. var building: tuple[street: string, number: int] building = (&quot;Rue del Percebe&quot;, 13) echo(building.street)  # \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043d\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u044d\u0442\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u043a\u043e\u0440\u0442\u0435\u0436\u0438! #person = building # --&gt; Error: type mismatch: got (tuple[street: string, number: int]) #     but expected 'Person'  # \u0410 \u044d\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u043c\u0435\u043d\u0430 \u0438 \u0442\u0438\u043f\u044b \u043f\u043e\u043b\u0435\u0439 \u0442\u0435 \u0436\u0435. var teacher: tuple[name: string, age: int] = (&quot;Mark&quot;, 42) person = teacher <\/code><\/pre>\n<p>  \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c \u0442\u0438\u043f \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0440\u0442\u0435\u0436\u0430, \u043a\u043e\u0440\u0442\u0435\u0436\u0438, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 \u043f\u043e\u043b\u0435\u0439, \u0431\u0443\u0434\u0443\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438, \u043f\u0443\u0441\u0442\u044c \u0434\u0430\u0436\u0435 \u0443 \u043d\u0438\u0445 \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u0442\u0438\u043f\u044b \u043f\u043e\u043b\u0435\u0439.<\/p>\n<p>  \u041a\u043e\u0440\u0442\u0435\u0436\u0438 \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 (\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435!). \u042d\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u043a\u043e\u0440\u0442\u0435\u0436\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 <code>splitFile<\/code> \u0438\u0437 \u043c\u043e\u0434\u0443\u043b\u044f <code>os<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433, \u0438\u043c\u044f \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043f\u0443\u0442\u0438. \u0414\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0438 \u043a\u043e\u0440\u0442\u0435\u0436\u0430 \u0432\u0430\u043c \u043d\u0430\u0434\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0440\u0443\u0433\u043b\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 \u0432\u043e\u043a\u0440\u0443\u0433 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0435 \u043a\u043e\u0440\u0442\u0435\u0436, \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u044b \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u0435 \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u044d\u0442\u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445! \u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"ruby\">import os  let   path = &quot;usr\/local\/nimc.html&quot;   (dir, name, ext) = splitFile(path)   baddir, badname, badext = splitFile(path) echo dir      # \u0432\u044b\u0432\u043e\u0434\u0438\u0442 usr\/local echo name     # \u0432\u044b\u0432\u043e\u0434\u0438\u0442 nimc echo ext      # \u0432\u044b\u0432\u043e\u0434\u0438\u0442 .html # \u0410 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u0441\u0442\u0440\u043e\u043a\u0443: # `(dir: usr\/local, name: nimc, ext: .html)` echo baddir echo badname echo badext <\/code><\/pre>\n<p>  \u0420\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0430 \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0431\u043b\u043e\u043a\u0430\u0445 <code>var<\/code> \u0438\u043b\u0438 <code>let<\/code>. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f:<\/p>\n<pre><code class=\"ruby\">import os  var   path = &quot;usr\/local\/nimc.html&quot;   dir, name, ext = &quot;&quot;  (dir, name, ext) = splitFile(path) # --&gt; Error: '(dir, name, ext)' cannot be assigned to <\/code><\/pre>\n<p>  <\/p>\n<h3>\u0421\u0441\u044b\u043b\u043e\u0447\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438<\/h3>\n<p>  \u0421\u0441\u044b\u043b\u043a\u0438 (\u0442\u043e \u0436\u0435, \u0447\u0442\u043e \u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f) \u044d\u0442\u043e \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u00ab\u043c\u043d\u043e\u0433\u0438\u0435-\u043a-\u043e\u0434\u043d\u043e\u043c\u0443\u00bb. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u043c\u0435\u0441\u0442\u043e \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e.<\/p>\n<p>  Nim \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0435\u0442 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 (traced) \u0438 \u043d\u0435\u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 (untraced) \u0441\u0441\u044b\u043b\u043a\u0438. \u041d\u0435\u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 <em>\u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u043c\u0438.<\/em> \u041e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0432 \u043a\u0443\u0447\u0435 \u0441\u043e \u0441\u0431\u043e\u0440\u043a\u043e\u0439 \u043c\u0443\u0441\u043e\u0440\u0430, \u043d\u0435\u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u2013 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043f\u0430\u043c\u044f\u0442\u044c \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0430 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0438\u043b\u0438 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u043f\u0430\u043c\u044f\u0442\u0438. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u0435\u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b. \u041e\u0434\u043d\u0430\u043a\u043e \u0434\u043b\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 (\u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u00ab\u0436\u0435\u043b\u0435\u0437\u0443\u00bb) \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0431\u0435\u0437 \u043d\u0438\u0445 \u043d\u0435\u043b\u044c\u0437\u044f.<\/p>\n<p>  \u041e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u043e\u043c <code>ref<\/code>, \u043d\u0435\u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u2013 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u043e\u043c <code>ptr<\/code>.<\/p>\n<p>  \u041f\u0443\u0441\u0442\u0430\u044f subscript-\u043d\u043e\u0442\u0430\u0446\u0438\u044f <code>[]<\/code> \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0441\u044b\u043b\u043a\u0438, \u0442\u043e \u0435\u0441\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0430. \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b <code>.<\/code> (\u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u043e\u043b\u044e \u043a\u043e\u0440\u0442\u0435\u0436\u0430\/\u043e\u0431\u044a\u0435\u043a\u0442\u0430) \u0438 <code>[]<\/code> (\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u0430\/\u0441\u0442\u0440\u043e\u043a\u0438\/\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438) \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u043d\u0435\u044f\u0432\u043d\u043e\u0435 \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u0441\u0441\u044b\u043b\u043e\u0447\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432:<\/p>\n<pre><code class=\"ruby\">type   Node = ref NodeObj   NodeObj = object     le, ri: Node     data: int var   n: Node new(n) n.data = 9 # \u043d\u0435 \u043d\u0430\u0434\u043e \u043f\u0438\u0441\u0430\u0442\u044c n[].data, \u044d\u0442\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u0441\u0431\u0438\u0432\u0430\u0435\u0442 \u0441 \u0442\u043e\u043b\u043a\u0443! <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u043e\u0434 \u043d\u043e\u0432\u044b\u0439 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 <code>new<\/code>. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0435\u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b <code>alloc<\/code>, <code>dealloc<\/code> \u0438 <code>realloc<\/code>. \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f <code>system<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u044d\u0442\u0438\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0438 \u043d\u0430 \u0447\u0442\u043e \u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043e\u043d\u0430 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>nil<\/code>.<\/p>\n<h3>\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043d\u044b\u0439 \u0442\u0438\u043f<\/h3>\n<p>  \u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043d\u044b\u0439 \u0442\u0438\u043f \u044d\u0442\u043e (\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e) \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>nil<\/code>. Nim \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043d\u044b\u0439 \u0442\u0438\u043f \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0435\u0445\u043d\u0438\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"ruby\">proc echoItem(x: int) = echo(x)  proc forEach(action: proc (x: int)) =   const     data = [2, 3, 5, 7, 11]   for d in items(data):     action(d)  forEach(echoItem) <\/code><\/pre>\n<p>  \u041d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043d\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0442\u0438\u043f\u043e\u0432: \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f \u0432\u044b\u0437\u043e\u0432\u0430. \u0420\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u0432 <a href=\"http:\/\/nim-lang.org\/docs\/manual.html\">\u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435<\/a>.<\/p>\n<h2>\u041c\u043e\u0434\u0443\u043b\u0438<\/h2>\n<p>  Nim \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 \u0447\u0430\u0441\u0442\u0438 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u041a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435. \u041c\u043e\u0434\u0443\u043b\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u043e\u043a\u0440\u044b\u0442\u0438\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e. \u041e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>import<\/code>. \u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u043e\u0433\u0443\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f, \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0435 \u0437\u0432\u0451\u0437\u0434\u043e\u0447\u043a\u043e\u0439 (<code>*<\/code>):<\/p>\n<pre><code class=\"ruby\"># \u041c\u043e\u0434\u0443\u043b\u044c A var   x*, y: int  proc `*` *(a, b: seq[int]): seq[int] =   # \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c:   newSeq(result, len(a))   # \u043f\u0435\u0440\u0435\u043c\u043d\u043e\u0436\u0438\u0442\u044c \u0434\u0432\u0435 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438:   for i in 0..len(a)-1: result[i] = a[i] * b[i]  when isMainModule:   # \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 ``*`` \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439:   assert(@[1, 2, 3] * @[1, 2, 3] == @[1, 4, 9]) <\/code><\/pre>\n<p>  \u041c\u043e\u0434\u0443\u043b\u044c <code>A<\/code> \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 <code>x<\/code> \u0438 <code>*<\/code>, \u043d\u043e \u043d\u0435 <code>y<\/code>.<\/p>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  \u0412 \u043a\u0430\u0436\u0434\u043e\u043c \u043c\u043e\u0434\u0443\u043b\u0435 \u0435\u0441\u0442\u044c \u043e\u0441\u043e\u0431\u0430\u044f \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 <code>isMainModule<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u0442\u0438\u043d\u043d\u0430, \u0435\u0441\u043b\u0438 \u043c\u043e\u0434\u0443\u043b\u044c \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u044c \u043c\u043e\u0434\u0443\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435.<\/p>\n<p>  \u041c\u043e\u0434\u0443\u043b\u0438, \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0435 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f, \u043d\u043e \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u044b, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0431\u0435\u0437 \u0441\u0432\u043e\u0438\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p>  \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0442\u0430\u043a\u043e\u0432:<\/p>\n<ul>\n<li>\u0421\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e, \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c <code>import<\/code>.<\/li>\n<li>\u0415\u0441\u043b\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d \u0446\u0438\u043a\u043b, \u0442\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0436\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b (\u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435); \u0435\u0441\u043b\u0438 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u043b\u0441\u044f \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u0442\u043e \u043f\u0440\u0435\u0440\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443.<\/li>\n<\/ul>\n<p>  \u042d\u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435:<\/p>\n<pre><code class=\"ruby\"># \u041c\u043e\u0434\u0443\u043b\u044c A type   T1* = int  # \u041c\u043e\u0434\u0443\u043b\u044c A \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0442\u0438\u043f ``T1`` import B     # \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c B  proc main() =   var i = p(3) # \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 B \u0437\u0434\u0435\u0441\u044c \u0443\u0436\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d  main() <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"ruby\"># \u041c\u043e\u0434\u0443\u043b\u044c B import A  # A \u043f\u043e\u043a\u0430 \u0435\u0449\u0451 \u043d\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d \u0434\u043e \u043a\u043e\u043d\u0446\u0430! \u0411\u0443\u0434\u0443\u0442 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435           # \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d\u044b \u0432 A \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442.  proc p*(x: A.T1): A.T1 =   # \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0443\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043b T1 \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 A   result = x + 1 <\/code><\/pre>\n<p>  \u0421\u0438\u043c\u0432\u043e\u043b\u044b \u043c\u043e\u0434\u0443\u043b\u044f <em>\u043c\u043e\u0433\u0443\u0442<\/em> \u0431\u044b\u0442\u044c <em>\u043a\u0432\u0430\u043b\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u044b<\/em> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 <code>module.symbol<\/code>. \u0415\u0441\u043b\u0438 \u0441\u0438\u043c\u0432\u043e\u043b \u043d\u0435\u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u0435\u043d, \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u043a\u0432\u0430\u043b\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u0421\u0438\u043c\u0432\u043e\u043b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u044b\u043c, \u0435\u0441\u043b\u0438 \u043e\u043d \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d \u0432 \u0434\u0432\u0443\u0445 (\u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435) \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u044f\u0445 \u0438 \u043e\u0431\u0430 \u043c\u043e\u0434\u0443\u043b\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0442\u0440\u0435\u0442\u044c\u0438\u043c:<\/p>\n<pre><code class=\"ruby\"># \u041c\u043e\u0434\u0443\u043b\u044c A var x*: string <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"ruby\"># \u041c\u043e\u0434\u0443\u043b\u044c B var x*: int <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"ruby\"># \u041c\u043e\u0434\u0443\u043b\u044c C import A, B write(stdout, x) # \u043e\u0448\u0438\u0431\u043a\u0430: x \u043d\u0435\u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u0435\u043d write(stdout, A.x) # \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435\u0442: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0432\u0430\u043b\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440  var x = 4 write(stdout, x) # \u043d\u0435\u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e\u0441\u0442\u0438 \u043d\u0435\u0442: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f x \u043c\u043e\u0434\u0443\u043b\u044f C <\/code><\/pre>\n<p>  \u041d\u043e \u044d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043d\u0435\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e \u043a \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430\u043c \u0438\u043b\u0438 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u043c. \u0417\u0434\u0435\u0441\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0438:<\/p>\n<pre><code class=\"ruby\"># \u041c\u043e\u0434\u0443\u043b\u044c A proc x*(a: int): string = $a <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"ruby\"># \u041c\u043e\u0434\u0443\u043b\u044c B proc x*(a: string): string = $a <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"ruby\"># \u041c\u043e\u0434\u0443\u043b\u044c C import A, B write(stdout, x(3))   # \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435\u0442: \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f A.x write(stdout, x(&quot;&quot;))  # \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435\u0442: \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f B.x  proc x*(a: int): string = nil write(stdout, x(3))   # \u043d\u0435\u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e\u0441\u0442\u044c: \u043a\u0430\u043a\u043e\u0439 `x` \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c? <\/code><\/pre>\n<p>  <\/p>\n<h3>\u0418\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432<\/h3>\n<p>  \u041e\u0431\u044b\u0447\u043d\u043e, \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>import<\/code> \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u0432\u0441\u0435 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c, \u0443\u043a\u0430\u0437\u0430\u0432 \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0441 \u043a\u0432\u0430\u043b\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c <code>except<\/code>.<\/p>\n<pre><code class=\"ruby\">import mymodule except y <\/code><\/pre>\n<p>  <\/p>\n<h3>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 from<\/h3>\n<p>  \u041c\u044b \u0443\u0436\u0435 \u0432\u0438\u0434\u0435\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>import<\/code>, \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0449\u0443\u044e \u0432\u0441\u0435 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b. \u041c\u043e\u0436\u043d\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>from import<\/code>:<\/p>\n<pre><code class=\"ruby\">from mymodule import x, y, z <\/code><\/pre>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>from<\/code> \u043c\u043e\u0436\u0435\u0442 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0451\u043d \u0434\u043b\u044f \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0447\u0435\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b, \u043d\u043e \u0434\u043b\u044f \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0432\u0430\u043b\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440.<\/p>\n<pre><code class=\"ruby\">from mymodule import x, y, z  x()           # \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c x \u0431\u0435\u0437 \u043a\u0432\u0430\u043b\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"ruby\">from mymodule import nil  mymodule.x()  # \u043d\u0443\u0436\u043d\u043e \u043a\u0432\u0430\u043b\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c x, \u0443\u043a\u0430\u0437\u0430\u0432 \u0438\u043c\u044f \u043c\u043e\u0434\u0443\u043b\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430  x()           # \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 x \u0431\u0435\u0437 \u043a\u0432\u0430\u043b\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u043e\u0448\u0438\u0431\u043a\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u043c\u0435\u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043e\u0431\u044b\u0447\u043d\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0434\u043b\u0438\u043d\u043d\u044b\u0435, \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0434\u0430\u0442\u044c \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0435 \u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043a\u0432\u0430\u043b\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<pre><code class=\"ruby\">from mymodule as m import nil  m.x()         # m \u044d\u0442\u043e \u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c \u0434\u043b\u044f mymodule <\/code><\/pre>\n<p>  <\/p>\n<h3>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 include<\/h3>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>include<\/code> \u0434\u0435\u043b\u0430\u0435\u0442 \u043d\u0435\u0447\u0442\u043e, \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0449\u0435\u0435\u0441\u044f \u043e\u0442 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f: \u043e\u043d\u0430 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430 \u0441\u0432\u043e\u0451 \u043c\u0435\u0441\u0442\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430. \u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432\u0435\u0441\u044c\u043c\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u043e\u0432:<\/p>\n<pre><code class=\"ruby\">include fileA, fileB, fileC <\/code><\/pre>\n<p>  <i>(\u041d\u0430 \u0434\u043d\u044f\u0445 \u0437\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0432\u0442\u043e\u0440\u0443\u044e \u0447\u0430\u0441\u0442\u044c.)<\/i>       <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/271197\/\"> http:\/\/habrahabr.ru\/post\/271197\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u043e\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\u042d\u0442\u043e\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0434\u0435\u043b\u0430\u043b\u0441\u044f \u043f\u043e \u043c\u043e\u0442\u0438\u0432\u0430\u043c <a href=\"http:\/\/habrahabr.ru\/post\/258119\/#comment_8459961\">\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f<\/a> \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f  <a href=\"http:\/\/habrahabr.ru\/users\/stas3k\/\" class=\"user_link\">stas3k<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043d \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b  <a href=\"http:\/\/habrahabr.ru\/users\/frol\/\" class=\"user_link\">frol<\/a> \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0434\u0432\u0435 \u0447\u0430\u0441\u0442\u0438 \u00abNim Tutorial\u00bb. \u041c\u0435\u043d\u044f \u044d\u0442\u043e \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u043e \u0438 \u044f \u043f\u0435\u0440\u0435\u0432\u0451\u043b \u0438\u0445 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u0432 \u043c\u0435\u0440\u0443 \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u0430\u0437\u0443\u043c\u0435\u043d\u0438\u044f. \u0415\u0436\u0435\u043b\u0438 \u043a\u0442\u043e \u043d\u0430\u0439\u0434\u0451\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 (\u043e\u043d\u0438 \u0442\u0430\u043c \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u0435\u0441\u0442\u044c \u2014 \u0433\u043b\u0430\u0437 \u043f\u043e\u0434 \u043a\u043e\u043d\u0435\u0446 \u0441\u043e\u0432\u0441\u0435\u043c \u0443\u0436\u0435 \u0437\u0430\u043c\u044b\u043b\u0438\u043b\u0441\u044f), \u0441\u043e\u043e\u0431\u0449\u0430\u0439\u0442\u0435 \u0432 \u043b\u0438\u0447\u043a\u0443, \u0431\u0443\u0434\u0443 \u043f\u0440\u0430\u0432\u0438\u0442\u044c.  <\/div>\n<\/div>\n<p>  <\/p>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<blockquote><p>\u201cDer Mensch ist doch ein Augentier \u2013 sch\u00f6ne Dinge w\u00fcnsch ich mir.\u201d<\/p><\/blockquote>\n<p><em>(\u0426\u0438\u0442\u0430\u0442\u0430 \u0438\u0437 \u043f\u0435\u0441\u043d\u0438 \u00abMorgenstern\u00bb \u0433\u0440\u0443\u043f\u043f\u044b \u00abRammstein\u00bb. \u041f\u0440\u0438\u043c\u0435\u0440\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434: \u00ab\u041d\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u2013 \u0433\u043b\u0430\u0437\u0430\u0441\u0442\u044b\u0439 \u0437\u0432\u0435\u0440\u044c, \u2013 \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0445 \u0432\u0435\u0449\u0435\u0439\u00bb.)<\/em><\/p>\n<p>  \u042d\u0442\u043e \u2013 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b (tutorial) \u043f\u043e \u044f\u0437\u044b\u043a\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f <em>Nim.<\/em> \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u043c\u0438 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f\u043c\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0442\u0430\u043a\u0438\u043c\u0438 \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0442\u0438\u043f\u044b \u0438\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043d\u043e \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u0435 \u0437\u043d\u0430\u043d\u0438\u044f \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b. \u0411\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043f\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u043c \u043d\u044e\u0430\u043d\u0441\u0430\u043c \u044f\u0437\u044b\u043a\u0430, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435. \u0412\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u043e\u0434\u0430 \u0432 \u044d\u0442\u043e\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0442 <em>\u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0443 \u043f\u043e \u0441\u0442\u0438\u043b\u044e \u044f\u0437\u044b\u043a\u0430 Nim.<\/em><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-268737","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/268737","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=268737"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/268737\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=268737"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=268737"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=268737"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}