>There is more fun, after I upgrade to VFP 6.0 I found I need to do something with the command set collate, here is what I found:
>
>
coldcollate = set("collate")
>set collate to &coldcollate && NOT WORKING
>set collate to coldcollate && WORKING >
>It seems that there are no consistency in the VFP SET command at all.
Actually Chen, the above example is consistent with my guess about SET commands. Namely, some SET commands really do not have arguments and some do.
SET EXCLUSIVE ON
SET EXCLUSIVE OFF
Are examples of two commands which do not take arguments.
SET COLLATE TO
is a command which accepts a string argument. But if you use a macro, the interpreter expands it just before interpreting (compiling?) it. So
SET COLLATE TO &coldcollate
results in
SET COLLATE TO collate
and since collate is not a name of a variable which contains a string, an error results.
SET COLLATE TO coldcollate works because coldcollate is the name of a variable which contains a string argument that SET COLLATE TO accepts. I bet all of the following will work!
collate = set("collate")
SET COLLATE TO &collate
SET COLLATE to collate
"The Iron Fish: The water is cold...but the fish don't mind"
...Jay Jenks, boyhood chum