Programming Guide:xppguide

Differences between Clipper '87 and Xbase++ Foundation

Optimization of logical expressions: When compiling Clipper '87 programs Xbase++ uses the same short-cut optimization for logical expressions like Clipper 5.x:

IF <ExprA> .AND. <ExprB> 
   // <ExprB> is not executed if <ExprA> == .F. 
ENDIF 

IF <ExprA> .OR. <ExprB> 
   // <ExprB> is not executed if <ExprA> == .T. 
ENDIF 

Use the compiler switch /z to disable short-cut optimization when compiling Clipper '87 programs with Xbase++. As an alternative the short-cut optimization can be activated|deactivated for a single line of code using #pragma Shortcut(OFF|ON).

Alias names: With Clipper '87, alias names consisting only of a single letter can be specified in the USE command. With Xbase++, this is only permitted for letters above "M". For example, the following lines cannot be used with Xbase++ since they raise a runtime error:

USE Test1 ALIAS A 
USE Test2 ALIAS K 

Instead, the correct program code for Xbase++ would:

SELECT A 
USE Test1 
SELECT K 
USE Test2 

In general, it is recommended to use alias names with more than one letter.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.