EvalLogical

<< Click to Display Table of Contents >>

Navigation:  Apollo VCL Components > Apollo VCL Component Reference > TApolloTable > TApolloTable Methods >

EvalLogical

Declaration

function EvalLogical( sExpression: String ): WordBool;

Description

Evaluates a logical xBase expression and retrieves a True or False value depending upon the outcome.

Parameters

sExpression: An xBase expression that will evaluate as a logical value passed as a literal string or as the contents of a string variable.

Return Value

True if the expression evaluates as True, and False if not. Note that False will also be returned if the expression is invalid. Always use EvalTest to verify an expression that is solicited from a user before actually performing the evaluation.

Delphi Example

// Set radio button for North American customers

bResult := ApTbl.EvalLogical( 'upper(trim(country)) = "U.S.A." .or. upper(trim(country)) = "CANADA"' );

See Also

EvalNumeric, EvalString, EvalTest