Errorlog gives wrong line number

Post Reply
demont frank
Posts: 167
Joined: Thu Mar 22, 2007 11:24 am

Errorlog gives wrong line number

Post by demont frank »

Hello,

Trying to write a conversion program from oem to ansi or vice versa , fivewin error description gives :

Argument error : conditional , Main(17)

The problem is that the error only occurs on line 19 . Why ?

Can it be confirmed ?

Frank

Code: Select all

# include "fivewin.ch"
FUNCTION MAIN(DirBron,DirBest,lMode)
LOCAL aFiles , el , DbfFile , elem , aStruct , h , i , Blck
IF pCount() > 0
	IF (DirBron IN "NILnil")
		DirBron := nil
	END
END
IF pCount() > 1
	IF (DirBest IN "NILnil")
		DirBest := nil
	END
END
IF pCount() > 2
	lMode := (lMode=="T")    // .T. : ANSI->OEM
END
DEFAULT DirBron := "\HENDOS\DATA" 
DEFAULT DirBest := "DATA"
DEFAULT lMode := "F"  // .F. : OEM->ANSI     THIS CAUSES A ERROR ON NEXT LINE (20) , ERROR REPORT SHOWS 17 !!!!!!!
Blck := IIF(lMode , {|j|AnsiToOem(j)} , {|j|OemToAnsi(j)})
# ifndef TEST 
aFiles := Directory(DirBron+"\*.DBF")
# else
aFiles := Directory(DirBron+"\GEMEENTE.DBF")
# endif
FOR EACH el IN aFiles
	DbfFile := el[1]
	COPY FILE (DirBron+"\"+DbfFile) TO (DirBest+"\"+DbfFile)  
	USE (DirBest+"\"+DbfFile)
	aStruct := DbStruct()
	DO WHIL ! EOF()
		FOR EACH elem IN aStruct
			i := Hb_EnumIndex()
			IF Elem[2] == "C" .AND. Elem[3] > 3  .AND. (h := EVAL(Blck,Fieldget(i))) <> Fieldget(i)
				// FIELDLEN < 4 : Idnumbering , NO CONVERSION !
				Fieldput(i,h)
			END 
		NEXT
		SKIP 	
	END
NEXT
CLOS ALL
RETURN

User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Frank,

Thats a Harbour/xHarbour compiler issue. Please try to reproduce it without using FWH and report it to the Harbour mailing list or to comp.lang.xharbour, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply