This is my first attempt at trying to compile some VFP code and I will list some initial errors that the compiler produces.
I have tried to find documentation that would indicate if these are supported or unsupported VFP syntax, but I either see no mention of it or perhaps a mention related to VO instead - if there is a definitive and recent list of unsupported syntax or an FAQ on unsupported coding patterns then please let me know where to look.
[*]
[*]
Code: Select all
#INCLUDE PROGRAM.h
I changed this to
Code: Select all
#INCLUDE "PROGRAM.h"
- error XS1025: Single-line comment or end-of-line expected 1,17 tlcvfptools.prg
It appears that the compiler understands .h files (#defines), because it produced some errors about those files that I cleared up; but I'm not sure how to include them into .prg files
[*]
Code: Select all
If InList(Cursorgetprop("Buffering"), DB_BUFLOCKTABLE, DB_BUFOPTTABLE)
OldError = On("error")
On Error ChangeBufferingSuccessful = .F.
OldBufferingMode = Cursorgetprop("Buffering")
Cursorsetprop("Buffering", DB_BUFOPTRECORD)
On Error &OldError
BufferModeChanged = ChangeBufferingSuccessful
EndIf
Error on the last line - the VFP syntax is correct, it is just an if/endif block; but the compiler is expecting something else?
[*]
Code: Select all
set memowidth To 200
I thought I read somewhere that set memowidth is supported?
[*]
Code: Select all
use DBF(m.IndexDictionary) again alias IndexList
Perhaps dbf() is not yet supported?
[*]
Code: Select all
If NumberOfObjects > 0
For Each CurrentMember In MemberArray
TheCurrentObject = "TheDataEnvironment." + CurrentMember
If pemstatus(&TheCurrentObject, "cursorsource", 5) And pemstatus(&TheCurrentObject, "exclusive", 5) And &TheCurrentObject..exclusive
Do AddIndexTags With &TheCurrentObject..alias, &TheCurrentObject..alias, "IndexList"
EndIf
EndFor
EndIf
This error occurs on the
Code: Select all
Do AddIndexTags with...
Perhaps the compiler doesn't like the macro on the line preceding it?
[*]
Code: Select all
If AlreadyUsed
set filter To &OldFilter
set order To &OldOrder
Else
use
EndIf
Perhaps
Code: Select all
set filter
[*]
Code: Select all
ExtraFieldsClause = Iif(Empty(ExtraFieldsClause), "", "," + ExtraFieldsClause)
select * &ExtraFieldsClause From DBFToCursorSource ;
Into cursor (TheTargetCursor) nofilter readwrite
Perhaps SQL Select with a macro substitution is not supported? (But if I remove the macro, the compiler complains about the word "into" instead...)
[*]
Code: Select all
NewCursorAdapterObject = newobject("StandardCursorAdapter", "DataAdapters", "", ;
"", TheViewName, TheAliasName)
...
...
If Type("EnvironmentObject.ObjectManager") = "O"
EnvironmentObject.ObjectManager.AddObjectHook(NewCursorAdapterObject)
EndIf
Release NewCursorAdapterObject
This error relates to the final line, where a variable is being released.
[*]
Code: Select all
#DEFINE NULL chr(0)
There are several other #defines before this one, but the compiler does not like this one.
Thanks.
Paul