{"id":4072,"date":"2012-04-02T00:14:45","date_gmt":"2012-04-01T15:14:45","guid":{"rendered":"http:\/\/rentan.org\/blog\/?p=4072"},"modified":"2012-04-16T00:37:13","modified_gmt":"2012-04-15T15:37:13","slug":"dmonkey-global-parseint","status":"publish","type":"post","link":"https:\/\/rentan.org\/blog\/2012\/04\/02\/dmonkey-global-parseint\/","title":{"rendered":"DMonkey: Global.parseInt()"},"content":{"rendered":"<p>dmonkeydoc.html \u3088\u308a\u3002<\/p>\n<blockquote><p>parseInt(\u5024\uff09 ... \u5024\u3092\u6574\u6570\u5024\u306b\u5909\u63db\u3057\u307e\u3059\u3002\u8fd4\u5024\u306f\u6574\u6570\u5024\u3002<\/p><\/blockquote>\n<p>\u53c2\u8003\uff1a<a href=\"https:\/\/developer.mozilla.org\/ja\/JavaScript\/Reference\/Global_Objects\/parseInt\">parseInt - MDN<\/a><\/p>\n<p>JavaScript \u3067\u306f\u5024\u306f\u307e\u305a\u6587\u5b57\u5217\u5316\u3057\u3066\u304b\u3089\u89e3\u6790\u3055\u308c\u307e\u3059\u304c\u3001DMonkey \u3067\u306f\u6587\u5b57\u5217\u5316\u3055\u308c\u305a\u578b\u3054\u3068\u306b\u5909\u63db\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u304c\u9069\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u57fa\u6570\u3092\u6307\u5b9a\u3059\u308b\u7b2c\u4e8c\u5f15\u6570\u306f\u6e21\u305b\u307e\u305b\u3093\u3002<\/p>\n<div class=\"prog_code javascript\">\n<code>parseInt (\u6574\u6570) \u2192 \u305d\u306e\u307e\u307e<\/p>\n<p>parseInt (\u5c0f\u6570) \u2192 \u5c0f\u6570\u90e8\u3092\u56db\u6368\u4e94\u5165 (round)<br \/>\nparseInt (-1.5) \u2192 -2<br \/>\n# JavaScript \u3067\u306f parseInt (-1.5) \u2192 -1<\/p>\n<p>parseInt (true) \u2192 1<br \/>\nparseInt (false) \u2192 0<\/p>\n<p>parseInt () \u2192 undefined<\/p>\n<p>parseInt (NaN) \u2192 NaN<br \/>\nparseInt (null) \u2192 NaN<\/p>\n<p>var Infinity = Number.POSITIVE_INFINITY;<br \/>\nvar undefined = (function () {}) ();<\/p>\n<p>parseInt (Infinity) \u2192 NaN<br \/>\nparseInt (undefined) \u2192 NaN<\/code>\n<\/div>\n<p>\u6587\u5b57\u5217\u306f\u3001DMonkey \u306e\u5185\u90e8\u3067 Delphi \u306e StrToIntDef \u95a2\u6570\u3092\u547c\u3073\u51fa\u3057\u3066\u3044\u307e\u3059\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\u5024 0\uff09\u3002<\/p>\n<div class=\"prog_code javascript\">\n<code>\/^ *\\d+$\/ \u2192 10\u9032\u6570\uff080 \u307e\u305f\u306f\u6b63\u6570\uff09<br \/>\n\/^ *+\\d+$\/ \u2192 10\u9032\u6570\uff080 \u307e\u305f\u306f\u6b63\u6570\uff09<br \/>\n\/^ *-\\d+$\/ \u2192 10\u9032\u6570\uff080 \u307e\u305f\u306f\u8ca0\u6570\uff09<\/p>\n<p>\/^ *[-+]?(\\d+\\.?|\\d*\\.\\d+) *$\/ \u2192 0<\/p>\n<p>\/^ *\\d+(\\.\\d*)?e\\d* *$\/i \u2192 0<\/p>\n<p>\/^ *$[0-9a-f]+$\/i \u2192 16\u9032\u6570<br \/>\n\/^ *0x[0-9a-f]+$\/i \u2192 16\u9032\u6570<\/p>\n<p>\u305d\u308c\u4ee5\u5916 \u2192 NaN<\/code>\n<\/div>\n<p>\u3084\u3084\u3053\u3057\u3044\u52d5\u4f5c\u3092\u3059\u308b\u306e\u3067\u6b63\u898f\u8868\u73fe\u306b\u3057\u3066\u307f\u307e\u3057\u305f\u304c\u3001\u9069\u5f53\u306b\u5165\u308c\u3066\u307f\u305f\u30d1\u30bf\u30fc\u30f3\u304b\u3089\u9006\u7b97\u3057\u305f\u3060\u3051\u306a\u306e\u3067\u9593\u9055\u3044\u304c\u3042\u308b\u304b\u3082\u77e5\u308c\u307e\u305b\u3093\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>dmonkeydoc.html \u3088\u308a\u3002 parseInt(\u5024\uff09 ... \u5024\u3092\u6574\u6570\u5024\u306b\u5909\u63db\u3057\u307e\u3059\u3002\u8fd4\u5024\u306f\u6574\u6570\u5024\u3002 \u53c2\u8003\uff1aparseInt - MDN JavaScript \u3067\u306f\u5024\u306f\u307e\u305a\u6587\u5b57\u5217\u5316\u3057\u3066\u304b\u3089\u89e3\u6790\u3055\u308c\u307e\u3059\u304c\u3001DMo [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[640],"tags":[1191],"class_list":["post-4072","post","type-post","status-publish","format-standard","hentry","category-irvine","tag-dmonkey"],"_links":{"self":[{"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/posts\/4072","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/comments?post=4072"}],"version-history":[{"count":4,"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/posts\/4072\/revisions"}],"predecessor-version":[{"id":4111,"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/posts\/4072\/revisions\/4111"}],"wp:attachment":[{"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/media?parent=4072"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/categories?post=4072"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/tags?post=4072"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}