∟Loop "next" Statement

This section describes what is a loop 'next' statement in H language.

A loop "next" statement is a statement that skips the rest sub-statements of the loop group statement and jumps to the beginning of the next iteration of the loop.

A loop "next" statement has the following syntax:

loop (
   ...;
   $next;
   ...;
);

Examples of loop "next" statements are:

weekDays = array(0,1,2,3,4,5,6);
$for d $in weekDays, (
   $if d < 1 & d > 5, (
      write("We are closed today!");
	  $next;
   );
   
   write("Welcome to our store!");
   write("We are open from 9am to 9pm today.");
);

Design options:

1. Use "$next" as the keyword to identify "next" statements.

2. Use "$continue" as the keyword to identify "next" statements.

3. Do not support "next" statements, because they can be replaced with "if" statements.

Table of Contents

 About This Book

 Introduction of H Language

 Syntax

 Data Types

 Variables

 Expressions

►Statements

 What Is an Statement

 Expression Statement

 Assignment Statement

 Conditional "if" Statement

 Conditional "elseif" Statement

 Conditional "else" Statement

 Group Statement

 "while" Loop Statement

 "for" Loop Statement

 Loop "break" Statement

►Loop "next" Statement

 "switch" Statement - Not Supported

 "do...while" Statement - Not Supported

 "boolean" Data Type

 "integer" Data Type

 "string" Data Type

 "real" Data Type

 "array" Data Type

 Source Code Packages

 Classes and Objects

 Object Oriented Programming

 Inheritance - Object Attachments

 Encapsulation - Private Members

 References

 Full Version in PDF/ePUB