{"id":1190,"date":"2014-09-20T00:14:36","date_gmt":"2014-09-19T20:14:36","guid":{"rendered":"https:\/\/www.about1c.ru\/v77\/?p=1190"},"modified":"2020-09-28T19:34:07","modified_gmt":"2020-09-28T16:34:07","slug":"how-round-number-upward","status":"publish","type":"post","link":"https:\/\/www.about1c.ru\/v77\/developer-faq\/how-round-number-upward","title":{"rendered":"\u041a\u0430\u043a \u043e\u043a\u0440\u0443\u0433\u043b\u0438\u0442\u044c \u0447\u0438\u0441\u043b\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443?"},"content":{"rendered":"<p style=\"text-align: justify;\">\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0412\u044b\u00a0\u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <a title=\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u041e\u043a\u0440\" href=\"http:\/\/www.about1c.ru\/v77\/language-reference\/system\/math-functions\/function-round\">\u041e\u043a\u0440()<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043a\u0440\u0443\u0433\u043b\u0438\u0442\u044c \u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e\u00a0\u0434\u043e \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0433\u043e \u0446\u0435\u043b\u043e\u0433\u043e. \u0412\u0441\u0435 \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u0435\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c. \u041d\u043e \u0432\u0441\u0451 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u0412\u0430\u043c\u00a0\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u043a\u0440\u0443\u0433\u043b\u0438\u0442\u044c \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u0433\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443.<!--more-->\u0411\u044b\u0432\u0430\u043b\u044b\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u0431\u0440\u043e\u0441\u0438\u0442\u0441\u044f\u00a0\u0437\u0430 \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u0435\u0441\u0430. \u0427\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0443 \u043c\u0438\u043d\u0443\u0442 \u0440\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u043e\u0432\u0430\u044f <a title=\"\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0424\u0443\u043d\u043a\u0446\u0438\u044f\" href=\"http:\/\/www.about1c.ru\/v77\/language-reference\/operators\/function\">\u0444\u0443\u043d\u043a\u0446\u0438\u044f<\/a>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a\u0430\u044f:<\/p>\n<pre class=\"code\">\u041d\u043e\u0432\u043e\u0435\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 = \u0426\u0435\u043b(\u0418\u0441\u0445\u043e\u0434\u043d\u043e\u0435\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435) + 1;<\/pre>\n<p style=\"text-align: justify;\">\u041f\u0440\u043e\u0432\u0435\u0440\u043e\u0447\u043d\u043e\u0435 <a title=\"\u0412\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\" href=\"http:\/\/www.about1c.ru\/v77\/for-developer\/language-reference\/about-language\/expressions\">\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435<\/a> <code>\u0426\u0435\u043b(1.1) + 1 = 2<\/code>, \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0435 \u0432 <em>\u0442\u0430\u0431\u043b\u043e,<\/em>\u00a0\u0443\u0431\u0435\u0436\u0434\u0430\u0435\u0442 \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438\u00a0\u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0443\u0442\u0438, \u0438\u00a0\u043d\u043e\u0432\u043e\u0438\u0441\u043f\u0435\u0447\u0435\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0435\u0441\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043c\u043e\u043b\u043e\u0442\u0438\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438, \u0442.\u043a. \u043d\u0430\u00a0\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430 \u0432\u0441\u0435\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0447\u0435\u0433\u043e-\u0442\u043e \u043d\u0435 \u0445\u0432\u0430\u0442\u0438\u043b\u043e (\u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 ;D). \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u0430\u0436\u0435 \u0446\u0435\u043b\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0435\u0442 \u0432\u0432\u0435\u0440\u0445 <code>\u0426\u0435\u043b(1) + 1 = 2<\/code><\/p>\n<p>\u041d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u00a0\u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0438\u0437\u043e\u0449\u0440\u0435\u043d\u043d\u044b\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a\u0438\u043c:<\/p>\n<pre class=\"code\">\u041d\u043e\u0432\u043e\u0435\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 = \u041e\u043a\u0440(\u0418\u0441\u0445\u043e\u0434\u043d\u043e\u0435\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 + 0.5, 0, 0);<\/pre>\n<p style=\"text-align: justify;\">\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0435\u0433\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435: \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u041e\u043a\u0440() \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f \u0434\u043e \u0446\u0435\u043b\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430, \u0430 \u0442\u0440\u0435\u0442\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 0.5 \u043a\u0430\u043a 0 (\u043d\u043e\u043b\u044c). \u0418 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b\u00a0\u0441\u043f\u0440\u043e\u0432\u043e\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u00a0\u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0432 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0441\u043e\u0437\u043d\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043a \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0447\u0438\u0441\u043b\u043e 0.5. \u0422\u0435\u043f\u0435\u0440\u044c, \u0435\u0441\u043b\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0446\u0435\u043b\u043e\u0433\u043e \u0445\u043e\u0442\u044f \u0431\u044b \u043d\u0430 \u0441\u043e\u0442\u0443\u044e, \u0442\u044b\u0441\u044f\u0447\u043d\u0443\u044e \u0438\u043b\u0438 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043d\u0443\u044e \u0434\u043e\u043b\u044e, \u043e\u043d\u043e\u00a0\u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0442\u044c\u0441\u044f \u0432\u0432\u0435\u0440\u0445.<\/p>\n<p style=\"text-align: justify;\">\u0422\u0435\u043f\u0435\u0440\u044c \u043b\u043e\u0436\u043a\u0430 \u0434\u0435\u0433\u0442\u044f: \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0442\u044c\u0441\u044f \u0432\u0432\u0435\u0440\u0445 \u0431\u0443\u0434\u0443\u0442\u00a0\u0438 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0421 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f -2 \u043c\u0435\u043d\u044c\u0448\u0435 -1, \u043d\u043e \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <a title=\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u041e\u043a\u0440\" href=\"http:\/\/www.about1c.ru\/v77\/language-reference\/system\/math-functions\/function-round\">\u041e\u043a\u0440()<\/a> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e, \u0430 \u043d\u0435 \u043f\u043e \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c \u0438 \u043d\u0430\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u0435\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0442\u044c \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p style=\"text-align: justify;\">\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0435\u0441\u043b\u0438 \u0412\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0435\u0439 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0432 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <a title=\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u041e\u043a\u0440\" href=\"http:\/\/www.about1c.ru\/v77\/language-reference\/system\/math-functions\/function-round\">\u041e\u043a\u0440()<\/a>, \u0412\u044b \u043f\u043e\u043f\u0430\u043b\u0438 \u043a\u0443\u0434\u0430 \u043d\u0443\u0436\u043d\u043e:<\/p>\n<pre class=\"code\"><span style=\"color:red\">\u0424\u0443\u043d\u043a\u0446\u0438\u044f<\/span> \u041e\u043a\u0440\u0412\u0432\u0435\u0440\u0445<span style=\"color:red\">(<\/span>\u0418\u0441\u0445\u043e\u0434\u043d\u043e\u0435\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435<span style=\"color:red\">)<\/span>\r\n       \r\n     <span style=\"color:red\">\u041f\u0435\u0440\u0435\u043c<\/span> \u041d\u043e\u0432\u043e\u0435\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435<span style=\"color:red\">;<\/span>\r\n     \r\n     <span style=\"color:red\">\u0415\u0441\u043b\u0438<\/span> \u0418\u0441\u0445\u043e\u0434\u043d\u043e\u0435\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <span style=\"color:red\">><\/span><span style=\"color:red\">=<\/span> <span style=\"color:black\">0<\/span> <span style=\"color:red\">\u0422\u043e\u0433\u0434\u0430<\/span>\r\n        \u041d\u043e\u0432\u043e\u0435\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <span style=\"color:red\">=<\/span> \u041e\u043a\u0440<span style=\"color:red\">(<\/span>\u0418\u0441\u0445\u043e\u0434\u043d\u043e\u0435\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <span style=\"color:red\">+<\/span> <span style=\"color:black\">0.5<\/span><span style=\"color:red\">,<\/span> <span style=\"color:black\">0<\/span><span style=\"color:red\">,<\/span> <span style=\"color:black\">0<\/span><span style=\"color:red\">)<\/span><span style=\"color:red\">;<\/span>\r\n     <span style=\"color:red\">\u0418\u043d\u0430\u0447\u0435<\/span>\r\n        \u041d\u043e\u0432\u043e\u0435\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <span style=\"color:red\">=<\/span> \u041e\u043a\u0440<span style=\"color:red\">(<\/span>\u0418\u0441\u0445\u043e\u0434\u043d\u043e\u0435\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <span style=\"color:red\">-<\/span> <span style=\"color:black\">0.5<\/span><span style=\"color:red\">,<\/span> <span style=\"color:black\">0<\/span><span style=\"color:red\">,<\/span> <span style=\"color:black\">0<\/span><span style=\"color:red\">)<\/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     \r\n     <span style=\"color:red\">\u0412\u043e\u0437\u0432\u0440\u0430\u0442<\/span> \u041d\u043e\u0432\u043e\u0435\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435<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>\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443<\/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-1190","post","type-post","status-publish","format-standard","hentry","category-developer-faq"],"_links":{"self":[{"href":"https:\/\/www.about1c.ru\/v77\/wp-json\/wp\/v2\/posts\/1190","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=1190"}],"version-history":[{"count":10,"href":"https:\/\/www.about1c.ru\/v77\/wp-json\/wp\/v2\/posts\/1190\/revisions"}],"predecessor-version":[{"id":2512,"href":"https:\/\/www.about1c.ru\/v77\/wp-json\/wp\/v2\/posts\/1190\/revisions\/2512"}],"wp:attachment":[{"href":"https:\/\/www.about1c.ru\/v77\/wp-json\/wp\/v2\/media?parent=1190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.about1c.ru\/v77\/wp-json\/wp\/v2\/categories?post=1190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.about1c.ru\/v77\/wp-json\/wp\/v2\/tags?post=1190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}