FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour extended code block does not working in Harbour
Posts: 336
Joined: Mon Dec 07, 2009 02:49 PM
extended code block does not working in Harbour
Posted: Sun Sep 22, 2013 07:00 PM
Hi ,

I am moving to step by step from xHarbour to Harbour. I have compiled the below code in Harbour its gives an error but where as the same code works fine in xHarbour. I am not able find out why ? or whether Harbour supports this kind of syntax. Please help on this. Thanks in advance..!

Code (fw): Select all Collapse
    oLovBrw:bKeyChar := < | n, f |
    IF n == VK_RETURN
       oGet:cText( PadR(AllTrim( oQry:FieldGet(  "acct_name" )  ),50 ) )
       aPartyInfo := { oQry:FieldGet(  "coctr_id" ) , oQry:FieldGet(  "tcs_percent" )  }
       oLovWnd:END()
    ENDIF
                        >



Thanks
Shridhar
Thanks

Shridhar

FWH 24.04, BCC 7 32 bit, MariaDB
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: extended code block does not working in Harbour
Posted: Sun Sep 22, 2013 09:10 PM

The syntax for Harbour is

{ |p1,p2,..|
....code ...
}

If you include "hbcompat.ch", then you can use the present syntax as in xharbour and that will be automatically translates to harbour syntax.

If you are using recent FWH, fivewin.ch also translates xharbour syntax to harbour syntax.

Regards



G. N. Rao.

Hyderabad, India
Posts: 336
Joined: Mon Dec 07, 2009 02:49 PM
Re: extended code block does not working in Harbour
Posted: Mon Sep 23, 2013 07:08 AM

Hi Rao ,

Included "hbcompat.ch" now its working fine..! Thanks a lot..!

Thanks
Shridhar

Thanks

Shridhar

FWH 24.04, BCC 7 32 bit, MariaDB

Continue the discussion