Unfortunately, it does not work in my usual use case: as an alias.Example: use ccli where=evaluate("ccli") && Nope ? where.clcode
Well, in that case you should be using an alias:
use ccli alias TheTable
? TheTable.clcode
Well, I don't understand this at all.
"Use" is a VFP command that only opens a table. The following works fine for me:
CLOSE TABLES ALL
ccli = "C:\Some Path To\SomeTable.dbf"
USE (ccli) && table is now open
EVALUATE() applies when the parameter you feed it is the name of an object or a variable that stores the name of another variable.
You can do:
var1 = 3 var2 = "var1"
? EVALUATE(var2) && 3
And you can do:
myarray = "aList"
oMyObj.AddProperty(myarray)
? ALEN(oMyObj.&myarray.,1) && 1
But if you want to do this:
mytable = "foo" myfield = "bar"
? mytable.myfield
Then you need to do:
? &mytable..&myfield
A [table].[field] reference is not an object reference and can't be treated like one. It's a thing unto itself.
Ken Dibble www.stic-cil.org