Page

5.1.1- Two Kinds of Statements

  by NT Community Manager.
Last Updated  by Joel Bush.  

PublicCategorized as 05. ASP Control Structures.

Not tagged.
<< 5.1.0- An Example in Plain EnglishChapter55.2.0- Definitions >>

Two Kinds of Statements

Note that all of the lines of your code can be divided into two types:

 

  • Action statements carry out a task, such as showing the price of an item on a web page.
  • Control statements have the task of directing the execution of the action statements. In other words, they decide how often and in which order, action statements are carried out.

In our Motorpool example, instructions such as "Fill the tank with gasoline" and "Add the oil" are action statements. The rest are control statements, such as "If the truck needs gasoline then..." or "Repeat the above steps for the next truck."

 

This idea of controlling which lines of code execute in what order, and how often, has several names. Some people refer to these techniques as flow control or execution order, and the sets of code that we use to control the flow of execution are called, logically enough, Control Structures.

<< 5.1.0- An Example in Plain EnglishChapter55.2.0- Definitions >>

Copyright © 2003 by Wiley Publishing, Inc.

Powered by Near-TimeTerms of Services | Privacy Policy | Security Policy |