FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Source not compiling.
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM

Source not compiling.

Posted: Tue Nov 17, 2009 04:23 PM
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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM

Re: Source not compiling.

Posted: Wed Nov 18, 2009 04:53 AM

I am able to compile the above code and execute it without any problems

Regards



G. N. Rao.

Hyderabad, India
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

Re: Source not compiling.

Posted: Wed Nov 18, 2009 12:04 PM

Hunter,

Maybe try looking at the preprocessor output to see if something is being preprocessed incorrectly--perhaps due to the wrong include file being found.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM

Re: Source not compiling.

Posted: Wed Nov 18, 2009 01:55 PM

Thank you guys ! :D

Continue the discussion