Errorlog gives wrong line number

Errorlog gives wrong line number

Postby demont frank » Wed Aug 08, 2007 7: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

Code: Select all  Expand view  RUN
# 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

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

Postby Antonio Linares » Wed Aug 08, 2007 9: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 51 guests