FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour strange errors
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
strange errors
Posted: Mon Jan 15, 2018 04:08 PM
Today I compiles this test and I have strange errors on compilation and I not Know why
I have Harbour and last fwh with bcc7
where are the errors ?

the test

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

Function SalvaImage(oImg)
   Local nType
   local oBmp  := GdiBmp():New()
      local cFile := cGetFile( "Bitmap (*.bmp)| *.bmp|" +         ;
                                "JPEG  (*.jpg)| *.jpg|" +          ;
                                "GIF   (*.gif)| *.gif|"  +         ;
                                "TIFF (*.tif)| *.tif|" +           ;
                                "PNG   (*.png)| *.png"            ;
                                ,"Salva con il nome",  hb_CurDrive() , .t. )


  // oBmp:hBmp   := GDIP_FROMHBITMAP( oImg:GetHBitmap(), oImg:aPalBmp[ 1 ], .T. )
   oBmp:hBmp   := oImg:aPalBmp[ 1 ]

   IF .NOT. EMPTY( cFile )
             nType := NGETFILEFILTER()

            DO CASE
                  CASE nType == 1
                   cExt := "bmp"
                  CASE nType == 2
                   cExt := "jpg"
                  CASE nType == 3
                   cExt := "gif"
                  CASE nType == 4
                   cExt := "tif"
                  CASE nType == 5
                   cExt := "png"
                ENDCASE


             cFile := cFilePath( cFile ) + cFileNoExt( cFile ) + "." + cExt

               IF oImagePreview:nZoom == 1 .and. oImagePreview:nRotate == 0
                 oImagePreview:SaveImage( cFile )
               ELSE
                  SaveImgMod( oImagePreview,  cFile,,oBmp )
              ENDIF

             MsgInfo( "saved as: "+ cFile)
     ENDIF

     RETURN NIL

//------------------------------------------------------------------//

 Function SaveImgMod( oImg, cFile, lDimImg,oBmp )

   local lRet       := .F.
  // local oBmp
   local oRect
   DEFAULT lDimImg  := .F.
   if !Empty( cFile )
      oRect      := if( lDimImg, oImg:oRect, oImg:GetCliRect() )
     // oBmp       := GdiBmp():New()
      oBmp:hBmp  := GDIPLUSCAPTURERECTWND( oImg:hWnd, ;
                       oRect:nTop  + if( oImg:lBorder, 1, 0 ), ;
                       oRect:nLeft + if( oImg:lBorder, 1, 0 ), ;
                       oRect:nRight - oRect:nLeft - 1 - if( oImg:lBorder, 1, 0 ), ;
                       oRect:nBottom - oRect:nTop - 1 - if( oImg:lBorder, 1, 0 ) )
      lRet  := oBmp:Save( cFile )
      oBmp:End()
   else
      MsgInfo( "Name File Empty", "Attention" )
   endif

Return lRet

//------------------------------------------------------------------/




the errors
Code (fw): Select all Collapse
Progetto: test, Ambiente: bcc7Harbor:
[1]:Harbour.Exe test2.prg  /m /n0 /gc1 /es2 /a /iC:\Work\fwh\include /iC:\work\HARBOUR\Include /jI18n\Main.hil /iinclude;c:\work\fwh\include;C:\work\HARBOUR\include /oObj\test2.c
Harbour 3.2.0dev (r1703231115)
Copyright (c) 1999-2016, http://harbour-project.org/
Compiling 'test2.prg'...
test2.prg(5) Error E0030  Syntax error "syntax error at ' '"
test2.prg(11) Error E0030  Syntax error "syntax error at ' '"
test2.prg(14) Error E0030  Syntax error "syntax error at ' '"
test2.prg(15) Error E0030  Syntax error "syntax error at ' '"
test2.prg(17) Error E0030  Syntax error "syntax error at ' '"
test2.prg(18) Error E0030  Syntax error "syntax error at ' '"
test2.prg(20) Error E0030  Syntax error "syntax error at ' '"
test2.prg(21) Error E0030  Syntax error "syntax error at ' '"
test2.prg(22) Error E0030  Syntax error "syntax error at ' '"
test2.prg(23) Error E0030  Syntax error "syntax error at ' '"
test2.prg(24) Error E0030  Syntax error "syntax error at ' '"
test2.prg(25) Error E0030  Syntax error "syntax error at ' '"
test2.prg(26) Error E0030  Syntax error "syntax error at ' '"
test2.prg(27) Error E0030  Syntax error "syntax error at ' '"
test2.prg(28) Error E0030  Syntax error "syntax error at ' '"
test2.prg(29) Error E0030  Syntax error "syntax error at ' '"
test2.prg(30) Error E0030  Syntax error "syntax error at ' '"
test2.prg(31) Error E0030  Syntax error "syntax error at ' '"
test2.prg(43) Error E0010  ENDIF does not match IF
test2.prg(51) Error E0030  Syntax error "syntax error at ' '"
test2.prg(52) Error E0030  Syntax error "syntax error at ' '"
test2.prg(53) Error E0030  Syntax error "syntax error at ' '"
test2.prg(54) Error E0030  Syntax error "syntax error at ' '"
test2.prg(55) Error E0030  Syntax error "syntax error at ' '"
test2.prg(56) Error E0030  Syntax error "syntax error at ' '"
test2.prg(57) Error E0030  Syntax error "syntax error at ' '"
test2.prg(62) Error E0030  Syntax error "syntax error at ' '"
test2.prg(63) Error E0030  Syntax error "syntax error at ' '"
test2.prg(64) Error E0030  Syntax error "syntax error at ' '"
test2.prg(65) Error E0030  Syntax error "syntax error at ' '"
test2.prg(66) Error E0030  Syntax error "syntax error at ' '"
test2.prg(67) Error E0030  Syntax error "syntax error at ' '"
32 errors

No code generated.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: strange errors
Posted: Mon Jan 15, 2018 09:01 PM

Silvio,

I can't test your code since I don't use Harbour and I don't have the latest FW version installed. However all those syntax errors look like they might be invisible characters. This used to happen whenever you copied code online using the MS Edge browser--it stuck in a lot of characters that you couldn't see but generated lots of syntax errors.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: strange errors
Posted: Tue Jan 16, 2018 08:58 AM

ok
I found the error
I used Edge on win10
this morning I use moxilla and it is compiled
thanks

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: strange errors
Posted: Tue Jan 16, 2018 09:59 AM

Silvio,

you are using an old version of Edge. Please update Windows 10. MS has fixed this problem months ago.

EMG

Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: strange errors
Posted: Tue Jan 16, 2018 10:03 AM

strange I have edge updated

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: strange errors
Posted: Tue Jan 16, 2018 03:58 PM

Silvio,

My Edge is also fixed.

Check your file date:

c:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe

Mine is dated 12/7/2017.

Alternately, you can use Explorer.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: strange errors
Posted: Tue Jan 16, 2018 06:30 PM

mine date is 06.01.2018

Microsoft Edge 40.15063.0.0
Microsoft EdgeHTML 15.15063

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: strange errors
Posted: Tue Jan 16, 2018 06:47 PM

They look old. These are mine:

Microsoft Edge 41.16299.15.0
Microsoft EdgeHTML 16.16299

EMG

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: strange errors
Posted: Tue Jan 16, 2018 07:30 PM

I have the same versions as Enrico.

Slivio, something seems very wrong with yours. You have a newer date on the file and an older version number.

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: strange errors
Posted: Tue Jan 16, 2018 10:14 PM

I not Know How upgrade edge not found on Internet a link and my Pc windowsupdaye let me say the system is updated on 12.01.2018 last windows 10 Pro update

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: strange errors
Posted: Tue Jan 16, 2018 11:37 PM

Silvio,

It may just be that the Win 10 Home and Win 10 Pro versions are different, and that they have not fixed the Pro version of Edge yet. If so, then you will just have to wait and avoid using Edge to copy code from. I know it will be hard to remember, because I kept forgetting and doing it myself.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: strange errors
Posted: Wed Jan 17, 2018 09:02 AM
James Bott wrote:It may just be that the Win 10 Home and Win 10 Pro versions are different, and that they have not fixed the Pro version of Edge yet.


No, I have Windows 10 Pro 1709 16299.192 and Edge is updated.

EMG
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: strange errors
Posted: Wed Jan 17, 2018 02:18 PM

I have w19 home. Perhaps win10pro is updated.

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion