{"id":509,"date":"2008-01-04T19:03:01","date_gmt":"2008-01-05T02:03:01","guid":{"rendered":"http:\/\/members.crystalreportsbook.com\/crystal-reports-xi\/815-while-and-do-loops\/"},"modified":"2008-10-24T11:34:00","modified_gmt":"2008-10-24T18:34:00","slug":"815-while-and-do-loops","status":"publish","type":"post","link":"http:\/\/www.crystalreportsonlinetraining.com\/training\/815-while-and-do-loops\/","title":{"rendered":"8.13 While and Do Loops"},"content":{"rendered":"<h2>While and Do Loops<\/h2>\n<p>The While and Do loops all follow the standard VB .NET syntax. The While block is terminated with a Wend statement. The Do loops are terminated with a Loop statement. The While keyword is used to continue looping as long as the condition evaluates to True. The Until keyword is used to continue looping when a condition evaluates to False. You can exit a Do loop with an Exit Do statement.<\/p>\n<p>Code template for While \u2026 Wend:<\/p>\n<p><code>While true_condition<\/code><br \/>\n<code>...code...<\/code><br \/>\n<code>Wend<\/code><\/p>\n<p>Code template for Do While \u2026 Loop:<\/p>\n<p><code>Do While true_condition<\/code><br \/>\n<code>...code...<\/code><br \/>\n<code>Loop<\/code><\/p>\n<p>Code template for Do Until \u2026 Loop:<\/p>\n<p><code>Do Until false_condition<\/code><br \/>\n<code>...code...<\/code><br \/>\n<code>Loop<\/code><\/p>\n<p>Code template for Do \u2026 Loop While:<\/p>\n<p><code>Do<\/code><br \/>\n<code>...code...<\/code><br \/>\n<code>Loop While true_condition<\/code><\/p>\n<p>Code template for Do \u2026 Loop Until:<\/p>\n<p><code>Do<\/code><br \/>\n<code>...code...<\/code><br \/>\n<code>Loop Until false_condition<\/code><\/p>\n<p>Crystal syntax has few looping structures to choose from. It has the While..Do loop and the Do..While loop. It uses parentheses to define the code block.<\/p>\n<p>Code template for While \u2026 Do:<\/p>\n<p><code>While true_condition Do<\/code><br \/>\n<code>(<\/code><br \/>\n<code>...code...<\/code><br \/>\n<code>)<\/code><\/p>\n<p>Code template for Do..While:<\/p>\n<p><code>Do<\/code><br \/>\n<code>(<\/code><br \/>\n<code>...code...<\/code><br \/>\n<code>) While true_condition<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>While and Do Loops The While and Do loops all follow the standard VB .NET syntax. The While block is terminated with a Wend statement. The Do loops are terminated with a Loop statement. The While keyword is used to continue looping as long as the condition evaluates to True. The Until keyword is used [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28,2],"tags":[],"class_list":["post-509","post","type-post","status-publish","format-standard","hentry","category-chapter-8-programming-with-basic-syntax","category-crystal-reportsnet-2003","entry"],"_links":{"self":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/posts\/509","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/comments?post=509"}],"version-history":[{"count":0,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/posts\/509\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/media?parent=509"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/categories?post=509"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/tags?post=509"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}