strange errors

strange errors

Postby Silvio.Falconi » Mon Jan 15, 2018 4: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: Select all  Expand view

#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: Select all  Expand view
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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6716
Joined: Thu Oct 18, 2012 7:17 pm

Re: strange errors

Postby James Bott » Mon Jan 15, 2018 9: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: strange errors

Postby Silvio.Falconi » Tue Jan 16, 2018 8: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6716
Joined: Thu Oct 18, 2012 7:17 pm

Re: strange errors

Postby Enrico Maria Giordano » Tue Jan 16, 2018 9:59 am

Silvio,

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8242
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: strange errors

Postby Silvio.Falconi » 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6716
Joined: Thu Oct 18, 2012 7:17 pm

Re: strange errors

Postby James Bott » Tue Jan 16, 2018 3: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: strange errors

Postby Silvio.Falconi » Tue Jan 16, 2018 6: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6716
Joined: Thu Oct 18, 2012 7:17 pm

Re: strange errors

Postby Enrico Maria Giordano » Tue Jan 16, 2018 6:47 pm

They look old. These are mine:

Microsoft Edge 41.16299.15.0
Microsoft EdgeHTML 16.16299

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8242
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: strange errors

Postby James Bott » Tue Jan 16, 2018 7: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: strange errors

Postby Silvio.Falconi » 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6716
Joined: Thu Oct 18, 2012 7:17 pm

Re: strange errors

Postby James Bott » 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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: strange errors

Postby Enrico Maria Giordano » Wed Jan 17, 2018 9: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
User avatar
Enrico Maria Giordano
 
Posts: 8242
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: strange errors

Postby Silvio.Falconi » Wed Jan 17, 2018 2: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6716
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 8 guests