O'Reilly logo

Complete CL: The Definitive Control Language Programming Guide, Fourth Edition by Ron Hawkins, Doug Pence, Ted Holt, Kevin Forsythe, Ernie Malaga

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Control Statements

The preceding chapters cover only straightforward CL programming in which the statements are executed sequentially. Most programs (in any language) do not run that way. They perform decisions, execute loops, and so on. CL also has commands to control execution of the program.

The If Command

First and foremost is the IF command. You use the IF command to perform a decision based on the result of a test. The nature of this test is always a logical expression.

Simple Logical Expressions

A simple logical expression has one comparison operator between two expressions of any other type. For example, if you say, “the option number is equal to 5,” you have a comparison operator (“is equal to”) and two other expressions (“the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required