On Tue, 07 Jul 2009, Szak�ts Viktor wrote:

Hi,

> Is there any way to use some core functions to replace
> HB_EXEC() custom C function implemented in hbtip lib?
> (it's in utils.c)

I added this function as xHarbour compatible HB_EXEC() function.
In HB_TIP() library it's used without additional parameters to
execute functions using function symbol so it can be replaced
by sending EXEC or EVAL message to function symbol. F.e. instead of:
   aValue := HB_Exec( aValue[1] )
you can use:
   aValue := aValue[1]:exec()

or instead of:
   xResult := HB_Exec( sFunc, NIL, p1, p2, p3 )
you can use:
   xResult := sFunc:exec( p1, p2, p3 )

HB_EXEC() can be also used to send messages to given object.
It happens if second argument is different then NIL, f.e.:
   xResult := HB_Exec( sMsg, oVal, p1, p2 )
Such usage can be replaced by HB_ExecMsg() function, i.e.:
   xResult := HB_ExecMsg( sMsg, oVal, p1, p2 )

This is .prg replacement of HB_EXEC()

   func hb_exec( sSym, ... )
      if hb_pvalue( 2 ) != nil
         return hb_execMsg( sSym, ... )
      endif
      return sSym:exec( ... )


best regards,
Przemek
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to