You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Four legacy command forms from a FoxPro 2.x-era codebase #31
Four syntax forms that VFP 9 accepts and FoxDev rejects at compile time. We found all of them in a real application with a long history. Each one stops the whole file from compiling.
1. INDEX COMPACT ON ... TO (COMPACT before ON)
CREATE CURSOR t (cdes C(10))
INDEX COMPACT ON UPPER(cdes) TO (ADDBS(SYS(2023))+"t1") && error: INDEX needs ON and a key expression
INDEX ON cdes TO (ADDBS(SYS(2023))+"t2") COMPACT && OK
Expected: both forms compile and build the same compact .IDX file.
2. SELECT <array element> is taken for SQL SELECT
LOCAL ARRAY aa[1,2]
CREATE CURSOR t (f1 C(1))
aa[1,2] = "t"SELECT aa[1,2] && error: SELECT needs a FROM clause
SELECT (aa[1,2]) && OK
Expected: SELECT <name>[...] with no field list and no FROM is the work-area command, as in VFP 9.
3. ??? (raw output to the printer)
SET PRINTER TOFILE (ADDBS(SYS(2023))+"p.txt")
??? CHR(27)+"@" && error: expected expression, found '?'
??? ""
SET PRINTER TO
Expected: ??? sends its characters to the printer / SET PRINTER TO FILE target with no translation. Programs use it to send escape sequences straight to the printer. If raw printer output isn't planned, please list it as "Refused, by name" in language-coverage.md rather than leave it as a parse error.
4. APPEND FROM ... DELIMITED WITH <c> WITH CHARACTER <c>
CREATE CURSOR t (a C(5), b C(5))
APPEND FROM (ADDBS(SYS(2023))+"x.txt") DELIMITED WITH""WITH CHARACTER |
→ error 2:73 Unexpected character '|' and error 2:74 expected expression, found end of line
Expected: as in VFP 9, the WITH CHARACTER delimiter is a bare single character (|, ;, TAB, BLANK), not an expression. The same clause appears in COPY TO ... DELIMITED.
Activity