FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Migrar a Harbour - Errores del compilador
Posts: 563
Joined: Sun Oct 09, 2005 07:23 PM
Migrar a Harbour - Errores del compilador
Posted: Tue Dec 16, 2014 01:44 PM
La compilaci贸n en xHarbour va bien.
Pero el mismo c贸digo fuento en Harbour no pasa.
Les ruego una ayuda porque no los entiendo. Los errores son los siguientes:

Error E0030 Syntax error "syntax error at '|'"
C贸digo:
Code (fw): Select all Collapse
  cPathDestino:=cGetDir( "Seleccione Carpeta",cPathDestino,,;
                         "Seleccione la carpeta donde copiar las novedades para ordenador CENTRAL", BIF_RETURNONLYFSDIRS + BIF_DONTGOBELOWDOMAIN + BIF_USENEWUI + BIF_NONEWFOLDERBUTTON )


Error E0030 Syntax error "syntax error at ','"
C贸digo:
Code (fw): Select all Collapse
REDEFINE BUTTON oBtnDel ID 426 OF oDlg MESSAGE 'Borra 煤ltimo d铆gito';
             ACTION (::cUltima:='CE'            ,;
                     iif(::cUltimaOp='=' .or. ::cUltimaOp='AP' .or. ::cUltimaOp='AE',(::cUltimaOp:='',::nResult:=0,aadd( ::aRolloCalc, {' ',' '} ), oBrw:gobottom(),oBrw:refresh()),NIL),;
                     iif(nGet<>0,(              ,;
                     cGet:=LEFT(cGet,len(cget)-1),;
                     nGet:=val(cGet)),NIL)       ,;
                     oGet:SetText(cGet)         ,;
                     oBtnIgual:Setfocus()       ,;
                     sysrefresh() ) UPDATE
Posts: 1283
Joined: Fri Feb 10, 2006 02:34 PM
Re: Migrar a Harbour - Errores del compilador
Posted: Tue Dec 16, 2014 01:52 PM
Prueba
Code (fw): Select all Collapse
 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 iif(nGet<>0,( 聽 聽 聽 聽 聽 聽 聽;


en lugar de
Code (fw): Select all Collapse
 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 iif(nGet<>0,( 聽 聽 聽 聽 聽 聽 聽,;
Salutacions, saludos, regards

"...programar es f谩cil, hacer programas es dif铆cil..."

UT Page -> https://carles9000.github.io/
Forum UT -> https://discord.gg/bq8a9yGMWh
HIX -> https://github.com/carles9000/hix
Posts: 563
Joined: Sun Oct 09, 2005 07:23 PM
Re: Migrar a Harbour - Errores del compilador
Posted: Tue Dec 16, 2014 04:25 PM

Hola Carles,
Entiendo que la soluci贸n que me dices no puede ser, pues la coma lo que hace es separar las distintas variables de una funci贸n y si la quito va a asignar a una variable de la funci贸n el valor que en realidad se quiere pasar a otra.
Saludos.

Posts: 563
Joined: Sun Oct 09, 2005 07:23 PM
Re: Migrar a Harbour - Errores del compilador
Posted: Tue Dec 16, 2014 04:39 PM
El suguiente c贸digo tambi茅n da el error: Error E0030 Syntax error "syntax error at ','"

Code (fw): Select all Collapse
  ACTIVATE DIALOG oDlg CENTER ON INIT(iif(lBtnProd[1] .and. lEligeMa,NIL,oBtnProd1:hide()),;
                                      iif(lBtnProd[2] .and. lEligeMa,NIL,oBtnProd2:hide()),;
                                      iif(lBtnProd[3] .and. lEligeMa,NIL,oBtnProd3:hide()),;
                                      iif(lBtnProd[4] .and. lEligeMa,NIL,oBtnProd4:hide()),;
                                      oBtnCancelar:hide() )
Posts: 682
Joined: Tue Feb 14, 2006 09:48 AM
Re: Migrar a Harbour - Errores del compilador
Posted: Tue Dec 16, 2014 04:47 PM
Yo creo que Carles tiene raz贸n.
Code (fw): Select all Collapse
iif(nGet<>0,( 聽 聽 聽 聽 聽 聽 聽,;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽cGet:=LEFT(cGet,len(cget)-1),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽nGet:=val(cGet)),NIL) 聽 聽 聽 ,;

La coma sobra, no separa par谩metros, separa acciones a realizar cuano nGet<>0
iif(nGet<>0,( , cGet:=LEFT(cGet,len(cget)-1), nGet:=val(cGet) ) , NIL)

Este a mi no me da error.
Verhoven wrote:El suguiente c贸digo tambi茅n da el error: Error E0030 Syntax error "syntax error at ','"

Code (fw): Select all Collapse
 聽ACTIVATE DIALOG oDlg CENTER ON INIT(iif(lBtnProd[1] .and. lEligeMa,NIL,oBtnProd1:hide()),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 iif(lBtnProd[2] .and. lEligeMa,NIL,oBtnProd2:hide()),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 iif(lBtnProd[3] .and. lEligeMa,NIL,oBtnProd3:hide()),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 iif(lBtnProd[4] .and. lEligeMa,NIL,oBtnProd4:hide()),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 oBtnCancelar:hide() )
Saludos desde Mallorca
Biel Maim贸
http://bielsys.blogspot.com/
Posts: 563
Joined: Sun Oct 09, 2005 07:23 PM
Re: Migrar a Harbour - Errores del compilador
Posted: Tue Dec 16, 2014 04:49 PM
Ya he conseguido eliminar el error de las ",". Harbour es m谩s extricto que xHarbour con este asunto. No se puede poner una secuencia de instrucciones separadas por comas y que entre dos de ellas no se ponga nada.

Pero no logro quitar el error: Syntax error "syntax error at '|'" del c贸digo:
Code (fw): Select all Collapse
 聽 聽cPathDestino:=cGetDir( "Seleccione Carpeta","C:\",,;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"Seleccione la carpeta donde hacer la copia de seguridad", BIF_RETURNONLYFSDIRS + BIF_DONTGOBELOWDOMAIN + BIF_USENEWUI + BIF_NONEWFOLDERBUTTON )
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Migrar a Harbour - Errores del compilador
Posted: Tue Dec 16, 2014 05:31 PM
Intenta ahora...

Code (fw): Select all Collapse
#include "FiveWin.ch"

#define BIF_NONEWFOLDERBUTTON  0x200
#define BIF_RETURNONLYFSDIRS   0x0001
#define BIF_DONTGOBELOWDOMAIN  0x0002
#define BIF_STATUSTEXT         0x0004
#define BIF_RETURNFSANCESTORS  0x0008
#define BIF_EDITBOX            0x0010
#define BIF_VALIDATE           0x0020
#define BIF_NEWDIALOGSTYLE     0x0040
#define BIF_USENEWUI  (BIF_NEWDIALOGSTYLE | BIF_EDITBOX)
#define BIF_BROWSEINCLUDEURLS  0x0080
#define BIF_BROWSEFORCOMPUTER  0x1000
#define BIF_BROWSEFORPRINTER   0x2000
#define BIF_BROWSEINCLUDEFILES 0x4000
#define BIF_SHAREABLE          0x8000
#define MAX_PATH 260

FUNCTION Main()

   LOCAL cTitle, cPath, cCarpDest, cPathDest

   cTitle    := "Seleccione Carpeta"

   IF FWVERSION = "FWHX 13.06"
      cPath := GETCURDIR()
   ELSE
      cPath := CURDRIVE() + ":\" + GETCURDIR()
   ENDIF

   cCarpDest := "Seleccione la carpeta donde copiar las novedades"

   cPathDest := cGetDir( cTitle, cPath,, cCarpDest,            ;
                BIF_RETURNONLYFSDIRS + BIF_DONTGOBELOWDOMAIN + ;
                BIF_USENEWUI + BIF_NONEWFOLDERBUTTON )

   IF .NOT. EMPTY( cPathDest )
      ? cPathDest
   ENDIF

RETURN NIL


Jo茫o Santos - S茫o Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 563
Joined: Sun Oct 09, 2005 07:23 PM
Re: Migrar a Harbour - Errores del compilador
Posted: Tue Dec 16, 2014 07:26 PM

Los defines ya los ten铆a incluidos en el programa. He probado el ejemplo tal y como me lo has enviado y arroja el mismo error.

cgetdir.prg(36) Error E0030  Syntax error &quot;syntax error at '|'&quot;

Ese mismo c贸digo en xHarbour no da el error.

Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Migrar a Harbour - Errores del compilador
Posted: Tue Dec 16, 2014 07:41 PM
Porfa, cambia cGetdir() por cGetFile() si d谩 el mismo error...

No te falta ninguna LIB de Harbour?

http://wiki.fivetechsoft.com/doku.php?id=fivewin_function_cgetdir

Saludos.
Jo茫o Santos - S茫o Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 563
Joined: Sun Oct 09, 2005 07:23 PM
Re: Migrar a Harbour - Errores del compilador
Posted: Tue Dec 16, 2014 07:57 PM
Arroja el mismo error.
Uso el propio Buildh.bat que viene con la versi贸n FWH32 14.11 y Harbour 3.2.0dev (r1406271520).
Copio el Buildh.bat que trae FW al que a帽ado solamente una l铆nea para incluir la librer铆a TWBRWX32_H.lib (Browse de Hernan):

Code (fw): Select all Collapse
@ECHO OFF
CLS
ECHO 脷脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛驴
ECHO 鲁 FiveWin for Harbour 14.11 - Nov.  2014          Harbour development power  鲁脺
ECHO 鲁 (c) FiveTech, 1993-2014   for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8 鲁脹
ECHO 脌脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脛脵脹
ECHO 每 脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽脽

if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST

if "%FWDIR%" == "" set FWDIR=C:\fwh
if "%HBDIR%" == "" set HBDIR=c:\harbour
rem if "%2" == "/b" set GT=gtwin
rem if not "%2" == "/b" set GT=gtgui
set GT=gtgui

ECHO Compiling...

set hdir=%HBDIR%
set hdirl=%hdir%\lib
set fwh=%FWDIR%
if exist c:\bcc582 set bcdir=c:\bcc582
rem if exist c:\bcc64 set bcdir=c:\bcc64

%hdir%\bin\harbour %1 /n /i%fwh%\include;%hdir%\include /p %2 %3 > comp.log 2> warnings.log
if errorlevel 1 goto COMPILEERRORS
@type comp.log
@type warnings.log

echo -O2 -e%1.exe -I%hdir%\include -I%bcdir%\include %1.c > b32.bc
%bcdir%\bin\bcc32 -M -c -w-aus @b32.bc
:ENDCOMPILE

IF EXIST %1.rc %bcdir%\bin\brc32 -r -I%bcdir%\include -I%bcdir%\include\windows\sdk %1
rem IF EXIST %1.rc %vcdir%\bin\rc -r -d__FLAT__ %1

echo %bcdir%\lib\c0w32.obj + > b32.bc
echo %1.obj, + >> b32.bc
echo %1.exe, + >> b32.bc
echo %1.map, + >> b32.bc

rem 颅 Hay que poner delante las que sustituyen a las de FW, o mejor dicho
rem    el enlazador pone en el exe las que primero encuentra !
echo C:\CLIWIN\TBROWSE17b\LIB\TWBRWX32_H.lib + >> b32.bc

echo %fwh%\lib\FiveH.lib %fwh%\lib\FiveHC.lib %fwh%\lib\libmysql.lib %fwh%\lib\dolphin.lib + >> b32.bc
echo %hdirl%\hbwin.lib + >> b32.bc
echo %hdirl%\%GT%.lib + >> b32.bc
echo %hdirl%\hbrtl.lib + >> b32.bc
echo %hdirl%\hbvm.lib + >> b32.bc
echo %hdirl%\hblang.lib + >> b32.bc
echo %hdirl%\hbmacro.lib + >> b32.bc
echo %hdirl%\hbrdd.lib + >> b32.bc
echo %hdirl%\rddntx.lib + >> b32.bc
echo %hdirl%\rddcdx.lib + >> b32.bc
echo %hdirl%\rddfpt.lib + >> b32.bc
echo %hdirl%\hbsix.lib + >> b32.bc
echo %hdirl%\hbdebug.lib + >> b32.bc
echo %hdirl%\hbcommon.lib + >> b32.bc
echo %hdirl%\hbpp.lib + >> b32.bc
echo %hdirl%\hbcpage.lib + >> b32.bc
echo %hdirl%\hbcplr.lib + >> b32.bc
echo %hdirl%\hbct.lib + >> b32.bc
echo %hdirl%\hbpcre.lib + >> b32.bc
echo %hdirl%\xhb.lib + >> b32.bc
echo %hdirl%\hbziparc.lib + >> b32.bc
echo %hdirl%\hbmzip.lib + >> b32.bc
echo %hdirl%\hbzlib.lib + >> b32.bc
echo %hdirl%\minizip.lib + >> b32.bc
echo %hdirl%\png.lib + >> b32.bc
echo %hdirl%\hbcurl.lib + >> b32.bc
echo %hdirl%\hbusrrdd.lib + >> b32.bc

echo %hdirl%\hbcomm.lib + >> b32.bc

echo %fwh%\lib\libcurl.lib + >> b32.bc

rem Uncomment these two lines to use Advantage RDD
rem echo %hdirl%\rddads.lib + >> b32.bc
rem echo %hdirl%\Ace32.lib + >> b32.bc

rem echo %fwh%\lib\dolphin.lib + >> b32.bc
rem echo %fwh%\lib\libmysql.lib + >> b32.bc
 
echo %bcdir%\lib\cw32.lib + >> b32.bc
echo %bcdir%\lib\uuid.lib + >> b32.bc
echo %bcdir%\lib\import32.lib + >> b32.bc
echo %bcdir%\lib\wininet.lib + >> b32.bc
echo %bcdir%\lib\ws2_32.lib + >> b32.bc
echo %bcdir%\lib\psdk\odbc32.lib + >> b32.bc
echo %bcdir%\lib\psdk\nddeapi.lib + >> b32.bc
echo %bcdir%\lib\psdk\iphlpapi.lib + >> b32.bc
echo %bcdir%\lib\psdk\msimg32.lib + >> b32.bc
echo %bcdir%\lib\psdk\psapi.lib + >> b32.bc
echo %bcdir%\lib\psdk\rasapi32.lib + >> b32.bc
echo %bcdir%\lib\psdk\gdiplus.lib + >> b32.bc
echo %bcdir%\lib\psdk\shell32.lib, >> b32.bc

IF EXIST %1.res echo %1.res >> b32.bc
if %GT% == gtwin %bcdir%\bin\ilink32 -Gn -Tpe -s @b32.bc
IF ERRORLEVEL 1 GOTO LINKERROR
if %GT% == gtgui %bcdir%\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
IF ERRORLEVEL 1 GOTO LINKERROR
ECHO * Application successfully built *
rem signtool.exe sign /fd sha256 %1.exe
%1
GOTO EXIT
ECHO

rem delete temporary files
@del %1.c

:COMPILEERRORS
@type comp.log
@type warnings.log
ECHO * Compile errors *
GOTO EXIT

:LINKERROR
ECHO * Linking errors *
GOTO EXIT

:SINTAX
ECHO    SYNTAX: Build [Program]     {-- No especifiques la extensi垄n PRG
ECHO                                {-- Don't specify .PRG extension
GOTO EXIT

:NOEXIST
ECHO The specified PRG %1 does not exist

:EXIT
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Migrar a Harbour - Errores del compilador
Posted: Tue Dec 16, 2014 08:18 PM

El error viene de esta l铆nea:

define BIF_USENEWUI (BIF_NEWDIALOGSTYLE | BIF_EDITBOX)

hay que cambiarla por:

define BIF_USENEWUI nOr( BIF_NEWDIALOGSTYLE, BIF_EDITBOX )

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 563
Joined: Sun Oct 09, 2005 07:23 PM
Re: Migrar a Harbour - Errores del compilador
Posted: Tue Dec 16, 2014 08:30 PM

Con lo que dice Antonio queda arreglado ese error.

Pero ahora me da otros nuevos en el linkado:

call to function hb_itemRelease with no prototipe
call to function hb_itemReturn with no prototipe
call to function hb_itemArrayNew with no prototipe
call to function hb_itemPutC with no prototipe

unresolved external __HB_FUN_DBSKIPPER

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Migrar a Harbour - Errores del compilador
Posted: Tue Dec 16, 2014 08:58 PM

A帽ade este fichero de cabecera:

include <hbapiitm.h>

Y prueba a a帽adir esta funci贸n:

function DBSKIPPER( x )

return __DBSkipper( x )

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 563
Joined: Sun Oct 09, 2005 07:23 PM
Re: Migrar a Harbour - Errores del compilador
Posted: Tue Dec 16, 2014 09:18 PM

Antonio he a帽adido ese archivo de cabecera pero me dice el compilador que no encuentra el archivo include stdarg.h

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Migrar a Harbour - Errores del compilador
Posted: Tue Dec 16, 2014 09:23 PM

Tienes Borland configurado como se explica aqui ?

viewtopic.php?f=17t=13098

&

regards, saludos

Antonio Linares
www.fivetechsoft.com