Qualification objects  Chapter 5: General Objects and Methods

Chapter 4: Production Objects and Methods

qual()

Description

Executes the production objects’s qualification from within a function contained by the production object. The method allows the construction of complex qualification expressions that check multiple conditions.

Syntax

int qual();

Return value

Integer.

Returns 1 if qualified, and 0 if failed.

Examples

Example 39

int qual_rv; 
int rv;
qual_rv = Qual_ZipCode.qual(); // where Qual_ZipCode is // a Qualification object built using TRAN-IDE
if( qual_rv )
{
	erm(" Zip Code is within the county");
	rv = 1;
}
else
{
	erm(" Zip Code is outside the county");
	rv = 0;
}
return rv;

Example 40

if( Qual_City.qual() && Qual_State.qual() )
	return 1;
else 
	return 0;
// where Qual_City and Qual_State are Qualification 
// objects defined using TRAN-IDE

Usage

Pointer to object

Object

clQual *pQual;int rv;...rv = pQual->qual();if (rv > 0){ // qualified...}else{ // did not qualify...

int rv;...rv = myQual.qual();if (rv > 0){ // qualified...}else{ // did not qualify...





Copyright © 2005. Sybase Inc. All rights reserved. Chapter 5: General Objects and Methods

View this book as PDF