extended code block does not working in Harbour

extended code block does not working in Harbour

Postby shri_fwh » Sun Sep 22, 2013 7: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: Select all  Expand view

    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 19.12, BCC 7 32 bit, MariaDB
shri_fwh
 
Posts: 301
Joined: Mon Dec 07, 2009 2:49 pm

Re: extended code block does not working in Harbour

Postby nageswaragunupudi » Sun Sep 22, 2013 9: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
User avatar
nageswaragunupudi
 
Posts: 10632
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: extended code block does not working in Harbour

Postby shri_fwh » Mon Sep 23, 2013 7:08 am

Hi Rao ,

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

Thanks
Shridhar
Thanks
Shridhar
FWH 19.12, BCC 7 32 bit, MariaDB
shri_fwh
 
Posts: 301
Joined: Mon Dec 07, 2009 2:49 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 104 guests