Sitemap Sitemap  |  Contact Us Contact Us  |  Clients Clients
   Errors reference
  Home |  Downloads |  HareScript |  Websites/CMS |  Applications
Search for:  in: 
HareScript
Errors reference
 

Duplicate case.

This error occurs when defining a duplicate case in a SWITCH statement. To resolve this error, make sure all cases are unique.

An example of a SWITCH statement that will trigger this error:

INTEGER number := 2;
SWITCH (number)
{
CASE 1 { PRINT("The number is one"); }
CASE 2 { PRINT("The number is two"); }
// Incorrect: case 2 already exists
CASE 2 { PRINT("The number is two"); }
}

<< Back to errors overview

 
Related
Download documents
The online documents are also available for download in PDF format, for offline use.
Read more...
 
Top To top of page