{"id":844,"date":"2024-12-09T15:04:23","date_gmt":"2024-12-09T15:04:23","guid":{"rendered":"http:\/\/monkey.ploogie.co.uk\/?page_id=844"},"modified":"2024-12-09T15:11:10","modified_gmt":"2024-12-09T15:11:10","slug":"mwnci-type-function","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-type-function\/","title":{"rendered":"Mwnci type() Function"},"content":{"rendered":"<h2>Syntax<\/h2>\n<p>type<strong>(<em>value<\/em>)<\/strong><\/p>\n<h2>Description<\/h2>\n<p>The <i>type()<\/i> function returns the data type of the given value.<\/p>\n<h2>Example<\/h2>\n<pre>\r\na=10\r\nb=1.5\r\nc=\"foobar\"\r\nd=[1,2]\r\ne={\"One\": 1}\r\nf=true\r\ng=fn(n) {return n}\r\nfunction h(n) {return n}\r\nfoo=open(\"\/etc\/passwd\")\r\nprintln(type(a))\r\nprintln(type(b))\r\nprintln(type(c))\r\nprintln(type(d))\r\nprintln(type(e))\r\nprintln(type(f))\r\nprintln(type(g))\r\nprintln(type(h))\r\nprintln(type(foo))\r\n\r\n\r\ninteger\r\nfloat\r\nstring\r\narray\r\nhash\r\nbool\r\nfunction\r\nfunction\r\nfile\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Syntax type(value) Description The type() function returns the data type of the given value. Example a=10 b=1.5 c=&#8221;foobar&#8221; d=[1,2] e={&#8220;One&#8221;: 1} f=true g=fn(n) {return n} function h(n) {return n} foo=open(&#8220;\/etc\/passwd&#8221;) println(type(a)) println(type(b)) println(type(c)) println(type(d)) println(type(e)) println(type(f)) println(type(g)) println(type(h)) println(type(foo)) integer float string array hash bool function function file<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-844","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/844","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=844"}],"version-history":[{"count":2,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/844\/revisions"}],"predecessor-version":[{"id":847,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/844\/revisions\/847"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=844"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}