{"id":55,"date":"2024-09-25T03:53:21","date_gmt":"2024-09-25T02:53:21","guid":{"rendered":"http:\/\/monkey.ploogie.co.uk\/?page_id=55"},"modified":"2024-09-25T03:53:21","modified_gmt":"2024-09-25T02:53:21","slug":"while","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/while\/","title":{"rendered":"while"},"content":{"rendered":"<h2>Syntax<\/h2>\n<p>while (<em><strong>expression<\/strong><\/em>) {<em><strong>BLOCK<\/strong><\/em>}<\/p>\n<h2 id=\"while-Parameters\">Parameters<\/h2>\n<div class=\"table-wrap\">\n<table class=\"confluenceTable tablesorter tablesorter-default\">\n<colgroup>\n<col \/>\n<col \/><\/colgroup>\n<thead>\n<tr class=\"tablesorter-headerRow\">\n<th class=\"confluenceTh sortableHeader\" 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\">expression<\/td>\n<td class=\"confluenceTd\">A statement whose evaluation returns either <em><strong>true<\/strong> <\/em>or <em><strong>false<\/strong><\/em><\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\">BLOCK<\/td>\n<td class=\"confluenceTd\">one or more statements that execute repeatedly as long as expression evaluates to <em><strong>true<\/strong><\/em><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Description<\/h2>\n<p>The while loop executes statements as long as expression is true<\/p>\n<h2>Example<\/h2>\n<pre>x=1\r\nwhile (x &lt;= 5) {\r\n    println(\"x=\", x)\r\n    x++\r\n}<\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Syntax while (expression) {BLOCK} Parameters Parameter Definition expression A statement whose evaluation returns either true or false BLOCK one or more statements that execute repeatedly as long as expression evaluates to true Description The while loop executes statements as long as expression is true Example x=1 while (x &lt;= 5) { println(&#8220;x=&#8221;, x) x++ }<\/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-55","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/55","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=55"}],"version-history":[{"count":1,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/55\/revisions"}],"predecessor-version":[{"id":56,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/55\/revisions\/56"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}