{"id":1724,"date":"2015-06-26T00:06:24","date_gmt":"2015-06-25T21:06:24","guid":{"rendered":"https:\/\/www.about1c.ru\/v77\/?p=1724"},"modified":"2020-09-22T15:52:23","modified_gmt":"2020-09-22T12:52:23","slug":"how-end-the-loop","status":"publish","type":"post","link":"https:\/\/www.about1c.ru\/v77\/developer-faq\/how-end-the-loop","title":{"rendered":"\u041a\u0430\u043a \u0432\u044b\u0439\u0442\u0438 \u0438\u0437 \u0446\u0438\u043a\u043b\u0430?"},"content":{"rendered":"<p style=\"text-align: justify;\">\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b-\u043d\u043e\u0432\u0438\u0447\u043a\u0438 \u0447\u0430\u0441\u0442\u043e \u0442\u0435\u0440\u044f\u044e\u0442\u0441\u044f, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u044f\u0437\u044b\u043a\u0430. \u0412\u043e\u0437\u044c\u043c\u0435\u043c, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, <a title=\"\u0423\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b\" href=\"http:\/\/www.about1c.ru\/v77\/for-developer\/language-reference\/about-language\/operators\/flow-control\">\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0446\u0438\u043a\u043b\u0430<\/a>: \u043c\u043d\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e 3\u00a0\u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437\u00a0\u0446\u0438\u043a\u043b\u0430, \u0430 \u0412\u0430\u043c!?<!--more--><\/p>\n<h3 style=\"text-align: justify;\">1. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u041f\u0440\u0435\u0440\u0432\u0430\u0442\u044c<\/h3>\n<p style=\"text-align: justify;\">\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <code>\u041f\u0440\u0435\u0440\u0432\u0430\u0442\u044c<\/code>\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0446\u0438\u043a\u043b\u0430 \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0438\u00a0\u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439.<\/p>\n<pre class=\"code\"><span style=\"color:green\">\/\/\u043f\u043e\u0438\u0441\u043a \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0431\u0435\u0437 \u0443\u0447\u0435\u0442\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430<\/span>\r\n\u0421\u043f\u0438\u0441\u043e\u043a<span style=\"color:red\">.<\/span>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435<span style=\"color:red\">(<\/span><span style=\"color:black\">1<\/span><span style=\"color:red\">,<\/span> <span style=\"color:black\">\"\u041e\u0434\u0438\u043d\"<\/span><span style=\"color:red\">)<\/span><span style=\"color:red\">;<\/span>\r\n\u0421\u043f\u0438\u0441\u043e\u043a<span style=\"color:red\">.<\/span>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435<span style=\"color:red\">(<\/span><span style=\"color:black\">2<\/span><span style=\"color:red\">,<\/span> <span style=\"color:black\">\"\u0414\u0432\u0430\"<\/span><span style=\"color:red\">)<\/span><span style=\"color:red\">;<\/span>\r\n\u0421\u043f\u0438\u0441\u043e\u043a<span style=\"color:red\">.<\/span>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435<span style=\"color:red\">(<\/span><span style=\"color:black\">3<\/span><span style=\"color:red\">,<\/span> <span style=\"color:black\">\"\u0422\u0440\u0438\"<\/span><span style=\"color:red\">)<\/span><span style=\"color:red\">;<\/span>\r\n\r\n<span style=\"color:red\">\u0414\u043b\u044f<\/span> \u0418\u043d\u0434 <span style=\"color:red\">=<\/span> <span style=\"color:black\">1<\/span> <span style=\"color:red\">\u041f\u043e<\/span> \u0421\u043f\u0438\u0441\u043e\u043a<span style=\"color:red\">.<\/span>\u0420\u0430\u0437\u043c\u0435\u0440\u0421\u043f\u0438\u0441\u043a\u0430<span style=\"color:red\">()<\/span> <span style=\"color:red\">\u0426\u0438\u043a\u043b<\/span>\r\n        <span style=\"color:red\">\u0415\u0441\u043b\u0438<\/span> \u043d\u0440\u0435\u0433<span style=\"color:red\">(<\/span>\u0421\u043f\u0438\u0441\u043e\u043a<span style=\"color:red\">.<\/span>\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435<span style=\"color:red\">(<\/span>\u0418\u043d\u0434<span style=\"color:red\">)<\/span><span style=\"color:red\">)<\/span> <span style=\"color:red\">=<\/span> <span style=\"color:black\">\"\u0434\u0432\u0430\"<\/span> <span style=\"color:red\">\u0422\u043e\u0433\u0434\u0430<\/span>\r\n                <span style=\"color:red\">\u0421\u043e\u043e\u0431\u0449\u0438\u0442\u044c<\/span><span style=\"color:red\">(<\/span>\u0418\u043d\u0434<span style=\"color:red\">)<\/span><span style=\"color:red\">;<\/span>\r\n                <span style=\"color:red\">\u041f\u0440\u0435\u0440\u0432\u0430\u0442\u044c<\/span><span style=\"color:red\">;<\/span>\r\n        <span style=\"color:red\">\u041a\u043e\u043d\u0435\u0446\u0415\u0441\u043b\u0438<\/span><span style=\"color:red\">;<\/span>\r\n<span style=\"color:red\">\u041a\u043e\u043d\u0435\u0446\u0426\u0438\u043a\u043b\u0430<\/span><span style=\"color:red\">;<\/span>\r\n<\/pre>\n<h3>2. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0412\u043e\u0437\u0432\u0440\u0430\u0442<\/h3>\n<p style=\"text-align: justify;\">\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <a href=\"http:\/\/www.about1c.ru\/v77\/language-reference\/operators\/return\">\u0412\u043e\u0437\u0432\u0440\u0430\u0442 <\/a>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430\u0445 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u0434\u043b\u044f \u0438\u0445 \u0434\u043e\u0441\u0440\u043e\u0447\u043d\u043e\u0433\u043e\u00a0\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f. \u041f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0446\u0438\u043a\u043b, \u0430 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0412\u043e\u0437\u0432\u0440\u0430\u0442 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u043f\u0440\u0435\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0446\u0438\u043a\u043b\u0430, \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0442\u043e\u0447\u043a\u0443 \u0432\u044b\u0437\u043e\u0432\u0430!?<\/p>\n<pre class=\"code\"><span style=\"color:red\">\u0424\u0443\u043d\u043a\u0446\u0438\u044f<\/span> \u041d\u0430\u0439\u0442\u0438\u0412\u0421\u043f\u0438\u0441\u043a\u0435<span style=\"color:red\">(<\/span>\u0421\u043f\u0438\u0441\u043e\u043a<span style=\"color:red\">,<\/span> \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435<span style=\"color:red\">)<\/span>\r\n\t\r\n    <span style=\"color:red\">\u0414\u043b\u044f<\/span> \u0418\u043d\u0434 <span style=\"color:red\">=<\/span> <span style=\"color:black\">1<\/span> <span style=\"color:red\">\u041f\u043e<\/span> \u0421\u043f\u0438\u0441\u043e\u043a<span style=\"color:red\">.<\/span>\u0420\u0430\u0437\u043c\u0435\u0440\u0421\u043f\u0438\u0441\u043a\u0430<span style=\"color:red\">()<\/span> <span style=\"color:red\">\u0426\u0438\u043a\u043b<\/span>\r\n        <span style=\"color:red\">\u0415\u0441\u043b\u0438<\/span> \u043d\u0440\u0435\u0433<span style=\"color:red\">(<\/span>\u0421\u043f\u0438\u0441\u043e\u043a<span style=\"color:red\">.<\/span>\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435<span style=\"color:red\">(<\/span>\u0418\u043d\u0434<span style=\"color:red\">)<\/span><span style=\"color:red\">)<\/span> <span style=\"color:red\">=<\/span> \u043d\u0440\u0435\u0433<span style=\"color:red\">(<\/span>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435<span style=\"color:red\">)<\/span> <span style=\"color:red\">\u0422\u043e\u0433\u0434\u0430<\/span>\r\n            <span style=\"color:red\">\u0412\u043e\u0437\u0432\u0440\u0430\u0442<\/span> \u0418\u043d\u0434<span style=\"color:red\">;<\/span>\r\n        <span style=\"color:red\">\u041a\u043e\u043d\u0435\u0446\u0415\u0441\u043b\u0438<\/span><span style=\"color:red\">;<\/span>\r\n    <span style=\"color:red\">\u041a\u043e\u043d\u0435\u0446\u0426\u0438\u043a\u043b\u0430<\/span><span style=\"color:red\">;<\/span>\r\n\t\r\n<span style=\"color:red\">\u041a\u043e\u043d\u0435\u0446\u0424\u0443\u043d\u043a\u0446\u0438\u0438<\/span> <span style=\"color:green\">\/\/\u041d\u0430\u0439\u0442\u0438\u0412\u0421\u043f\u0438\u0441\u043a\u0435(\u0421\u043f\u0438\u0441\u043e\u043a)<\/span>\r\n\r\n\u041f\u043e\u0437\u0438\u0446\u0438\u044f <span style=\"color:red\">=<\/span> \u041d\u0430\u0439\u0442\u0438\u0412\u0421\u043f\u0438\u0441\u043a\u0435<span style=\"color:red\">(<\/span>\u0421\u043f\u0438\u0441\u043e\u043a<span style=\"color:red\">,<\/span> <span style=\"color:black\">\"\u0434\u0432\u0430\"<\/span><span style=\"color:red\">)<\/span><span style=\"color:red\">;<\/span>\r\n\t\r\n<span style=\"color:green\">\/\/\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/span>\r\n<span style=\"color:green\">\/\/\t2<\/span>\r\n<\/pre>\n<h3>3. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u041f\u0435\u0440\u0435\u0439\u0442\u0438<\/h3>\n<p style=\"text-align: justify;\">\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <code>\u041f\u0435\u0440\u0435\u0439\u0442\u0438<\/code> \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0434\u043e\u0441\u0440\u043e\u0447\u043d\u043e\u0433\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0446\u0438\u043a\u043b\u043e\u0432, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0443\u0440\u043e\u0432\u043d\u0435\u043c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h3 style=\"text-align: justify;\">\u0427\u0438\u0442\u0430\u0439\u0442\u0435 \u0442\u0430\u043a\u0436\u0435:<\/h3>\n<ol>\n<li style=\"text-align: justify;\"><a title=\"\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u041f\u0440\u0435\u0440\u0432\u0430\u0442\u044c\" href=\"http:\/\/www.about1c.ru\/v77\/language-reference\/operators\/break\">\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u041f\u0440\u0435\u0440\u0432\u0430\u0442\u044c<\/a><\/li>\n<li style=\"text-align: justify;\"><a title=\"\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u041f\u0435\u0440\u0435\u0439\u0442\u0438\" href=\"http:\/\/www.about1c.ru\/v77\/language-reference\/operators\/goto\">\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u041f\u0435\u0440\u0435\u0439\u0442\u0438<\/a><\/li>\n<li style=\"text-align: justify;\"><a title=\"\u041a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u041f\u0435\u0440\u0435\u0439\u0442\u0438?\" href=\"http:\/\/www.about1c.ru\/v77\/developer-faq\/how-use-goto\">\u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u041f\u0435\u0440\u0435\u0439\u0442\u0438?<\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b-\u043d\u043e\u0432\u0438\u0447\u043a\u0438 \u0447\u0430\u0441\u0442\u043e \u0442\u0435\u0440\u044f\u044e\u0442\u0441\u044f, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u044f\u0437\u044b\u043a\u0430. \u0412\u043e\u0437\u044c\u043c\u0435\u043c, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0446\u0438\u043a\u043b\u0430: \u043c\u043d\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e 3\u00a0\u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437\u00a0\u0446\u0438\u043a\u043b\u0430, \u0430 \u0412\u0430\u043c!?<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-1724","post","type-post","status-publish","format-standard","hentry","category-developer-faq"],"_links":{"self":[{"href":"https:\/\/www.about1c.ru\/v77\/wp-json\/wp\/v2\/posts\/1724","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.about1c.ru\/v77\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.about1c.ru\/v77\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.about1c.ru\/v77\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.about1c.ru\/v77\/wp-json\/wp\/v2\/comments?post=1724"}],"version-history":[{"count":7,"href":"https:\/\/www.about1c.ru\/v77\/wp-json\/wp\/v2\/posts\/1724\/revisions"}],"predecessor-version":[{"id":2455,"href":"https:\/\/www.about1c.ru\/v77\/wp-json\/wp\/v2\/posts\/1724\/revisions\/2455"}],"wp:attachment":[{"href":"https:\/\/www.about1c.ru\/v77\/wp-json\/wp\/v2\/media?parent=1724"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.about1c.ru\/v77\/wp-json\/wp\/v2\/categories?post=1724"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.about1c.ru\/v77\/wp-json\/wp\/v2\/tags?post=1724"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}