sx_EvalLogical

<< Click to Display Table of Contents >>

Navigation:  Apollo API Listing >

sx_EvalLogical

VB Declaration

Declare Function sx_EvalLogical Lib "Apollo9.dll"

(ByVal cpExpression As String)

As Integer

C Declaration

BOOL FAR PASCAL sx_EvalLogical(BYTEP cpExpression);

Description

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

Parameters

cpExpression: 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 sx_EvalTest to verify an expression that is solicited from a user before actually performing the evaluation.

VB Example

' set radio button for north american customers

NAstat.Value = -sx_EvalLogical("upper(trim(country)) = 'U.S.A.'

Ä .or. upper(trim(country)) = 'CANADA'")

C Example

// set check box value

m_married->SetNumProperty("Value", sx_EvalLogical("married"));

See Also

sx_EvalNumeric, sx_EvalString, sx_EvalTest