FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Errorlog gives wrong line number
Posts: 167
Joined: Thu Mar 22, 2007 11:24 AM
Errorlog gives wrong line number
Posted: Wed Aug 08, 2007 07:46 AM
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

# 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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Errorlog gives wrong line number
Posted: Wed Aug 08, 2007 09:46 AM

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

Continue the discussion