Page 1 of 1

hb_inline() not working in xharbour from fivewin

Posted: Sat Jun 16, 2007 12:49 pm
by nageswaragunupudi
I have installed fwh705 and xharbour provided by fivewin (99.71). After upgrading, the hb_inline() is giving compliation error. ( used to work earlier with xharbour 99.70 binaries downloaded from xharbour.org). We can try compiling inline_c.prg in the samples folder.

error E0020 : Incomplete statement or unbalanced delimiters.

can you pl suggest the solution Mr.Antanio?

Re: hb_inline() not working in xharbour from fivewin

Posted: Sat Jun 16, 2007 3:04 pm
by Enrico Maria Giordano
Try the following sample:

Code: Select all

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL n := 5

    ? n

    HB_INLINE( @n );
    {
        int n = hb_parni( 1 ) ;
        n++;
        hb_storni( n, 1 );
    }

    ? n

    RETURN NIL
EMG

Posted: Sat Jun 16, 2007 4:46 pm
by nageswaragunupudi
Thanks. This is working now.
The difference is semicolon is _now_ required between hb_inline( .. ) and the following curly braces ( { )

Earlier it used to work without this semicolon.

Thank you very much Mr. Enrico.

Posted: Sat Jun 16, 2007 5:30 pm
by nageswaragunupudi
Sorry. I understand now.
The syntax is hb_inline ( ... ) {
or
hb_inline( .. ) ; (semicolon is for continuation of { on the next line.
{

this solved the issue.