This page explains a basic Pascal instruction. If you want to see how to make your own instructions, see Procedures and Functions.
This article is part of the Getting Started series

In early programming, a common problem was met. If there were many choices to make and many conditions to test, then programmers had to use lots of IF's and programming became annoying. Pascal, just like C did, has an instruction for solving this problem. It's name is CASE. This verifies if a variable is equal to a list of elements. The sintax is:

case <variable> of
<element1>: command(s)
<element2>: command(s)
<element3>: command(s)
<elementN>: command(s)

The else is optional but end; is mandatory even if else is not met.

See Script:Opperations with numbers for an example.