New AND , OR etc. Foxpro Keywords
Posted: Mon Oct 21, 2019 1:44 pm
Hi Robert
1. I´ve tried the FP Evaluate() func with some expressions, and indeed FP allows e.g. ".and." and "and". :woohoo:
doing the same with X#, the macrocompiler currently throws an unexpected 'AND'' error
2. a Fox sample that creates successfully a CDX.
NOTE: The for condition uses "and" and not ".and."
With the little help from the VO STD.UDC i created a "INDEX ON TAG" UDC, but the X# index creation
fails if "and" is used, because the for condition is translated to:
Should i open a ticket, or is this already on the ToDo list ?
regards
Karl-Heinz
1. I´ve tried the FP Evaluate() func with some expressions, and indeed FP allows e.g. ".and." and "and". :woohoo:
Code: Select all
a = .t.
b = .f.
? evaluate ( "a .and. b" ) && .f.
? evaluate ( "a and b" ) && .f.
?
? evaluate ( "a .or. b" ) && .t.
? evaluate ( "a or b" ) && .t.
Code: Select all
? Evaluate( "a and b" )
? Eval( MCompile("a and b") )
NOTE: The for condition uses "and" and not ".and."
Code: Select all
set talk off
set safety off
clear
cpfad = "D:test"
cDBf = "small.dbf"
cCdx = "small2.cdx"
use ( cPfad + cDbf )
index on upper (last) for upper (last) = "O" and age >12 tag order1 of ( cPfad + cCdx )
Code: Select all
INDEX ON Upper(LAST) TAG ORDER1 TO (cPath + cCDX ) FOR Upper (LAST)= "O" AND AGE > 12
Code: Select all
DbSetOrderCondition( "Upper(LAST)="O"ANDAGE>12" , {||Upper(LAST)="O"ANDAGE>12} , , , , , , , , , , .F. , , , )
regards
Karl-Heinz