I'm getting compiler errors on these 2 (red) lines. What is wrong ? Thank you.
The errors are the same.
Error E0030 Syntax error: "syntax error at '['"
Error E0030 Syntax error: "syntax error at '['"
Under Clipper 5.2e they compile with no problems.
// Scatter / Gather
#include "Dbstruct.ch"
#translate Gather(<a>) => AEVAL(<a>, {|x, i| FIELDPUT(i, <a>\[i\]) })
FUNCTION Scatter (aVars, lBlank)
LOCAL nSize := FCOUNT(), aDBStruct, cFieldType
aVars := ARRAY(nSize)
IF lBlank
aDBStruct := DBSTRUCT()
AEVAL(aVars, {|x, nI| aVars[nI] := IIF(aDBStruct[nI,DBS_TYPE] == "N", 0, ;
IIF(aDBStruct[nI, DBS_TYPE] == "C", SPACE(aDBStruct[nI, DBS_LEN]), ;
IIF(aDBStruct[nI, DBS_TYPE] == "D", CTOD(""), ;
IIF(aDBStruct[nI, DBS_TYPE] == "L", .F., " "))))})
ELSE
AEVAL(aVars, {|x, nI| aVars[nI] := FIELDGET(nI)})
ENDIF
RETURN aVars