Chapter 4-3: Specifying Statements
Patterns of Statement Keyword Use
With the previous definitions and categories in mind, there are several patterns that govern how different statement keywords operate. The following are some general principles to help you understand some of the differences in how certain statements require you to specify different components and types of data:
· The condition testing statements (IF, AND, and OR) require that you specify two fields to be compared. The two fields must be of the same data type (alpha-to-alpha, numeric-to-numeric, etc.). You are allowed to compare two numeric fields regardless of their storage format. For example, you can check to see if an integer field is greater than a packed decimal field. No intermediate data conversion is required. To compare two fields of different data types, first use a SET statement to convert one of the fields to a type compatible with the other field. You can also use the condition testing statements to compare a field to a constant.
· Several statements deal only with external data representations, such as BLINK, BRIGHT, and INVERSE. You use these keywords to affect how an item appears to an end user on the screen or in a report. These statements are known as characteristic-type statements.
· Several statements operate only on internal data representations, such as SET, COMPUTE, APPEND, and SET TEMP. You use them to compute or modify stored data values.
· Some statements deal specifically with numeric computations, and the destination field (the result of the computation) must be a numeric data type. COMPUTE and CALC are examples of this category of statements.
· Another category of statements, such as READ and READNEXT, operates at a file level. These statements require you to specify a file name.
· The text statements allow you to provide a message string that displays or prints information for a user under circumstances that you specify.
APPX Application Design Manual (01/13/03)
© 2003 by APPX Software, Inc. All rights reserved