{"id":46,"date":"2024-09-25T03:20:18","date_gmt":"2024-09-25T02:20:18","guid":{"rendered":"http:\/\/monkey.ploogie.co.uk\/?page_id=46"},"modified":"2024-09-25T03:20:18","modified_gmt":"2024-09-25T02:20:18","slug":"if","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/if\/","title":{"rendered":"if"},"content":{"rendered":"<h2>Syntax<\/h2>\n<p>if (<em><strong>expression<\/strong><\/em>) {<em><strong>BLOCK<\/strong><\/em>}<\/p>\n<p>if (<em><strong>expression<\/strong><\/em>) {<em><strong>BLOCK<\/strong><\/em>} else {<em><strong>BLOCK<\/strong><\/em>}<\/p>\n<h2>Parameters<\/h2>\n<table class=\"confluenceTable tablesorter tablesorter-default\">\n<thead>\n<tr class=\"tablesorter-headerRow\">\n<th class=\"confluenceTh sortableHeader tablesorter-headerAsc\" data-column=\"0\">\n<div class=\"tablesorter-header-inner\">Parameter<\/div>\n<\/th>\n<th class=\"confluenceTh sortableHeader\" data-column=\"1\">\n<div class=\"tablesorter-header-inner\">Definition<\/div>\n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td class=\"confluenceTd\">BLOCK<\/td>\n<td class=\"confluenceTd\">one or more MSL statements that are executed once in accordance with the evaluation of the if or else if expressions<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\">expression<\/td>\n<td class=\"confluenceTd\">MSL statement that evaluates an expression and returns either <em>true<\/em> or<em> false<\/em><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Description<\/h2>\n<p>The <em>if<\/em> statement conditionally executes a BLOCK of code.<\/p>\n<h2>Example<\/h2>\n<pre>if (y = 10) {\r\n    x = 1\r\n}\r\n\r\n\r\nif (foo &lt; bar) {\r\n    small=foo\r\n} else {\r\n    small=bar\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Syntax if (expression) {BLOCK} if (expression) {BLOCK} else {BLOCK} Parameters Parameter Definition BLOCK one or more MSL statements that are executed once in accordance with the evaluation of the if or else if expressions expression MSL statement that evaluates an expression and returns either true or false Description The if statement conditionally executes a BLOCK &hellip; <a href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/if\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;if&#8221;<\/span><\/a><\/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-46","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/46","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=46"}],"version-history":[{"count":4,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/46\/revisions"}],"predecessor-version":[{"id":50,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/46\/revisions\/50"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=46"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}