FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Syntactical compiler error
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Syntactical compiler error
Posted: Sat Jul 30, 2011 07:48 PM
Code (fw): Select all Collapse
function OSendMulti( o, cMsg, uVal )

   local aMsg  := HB_ATokens( cMsg, ":" )
   local n     := Len( aMsg ) - If( uVal == nil, 0, 1 )
   local p

   AEval( aMsg, { |c| o := OSendEx( o, c ) }, 1, n )
   if uVal != nil
      o        := OSend( o, "_" + ATail( aMsg ), uVal )
   endif

return o

function OSendEx( o, c )

   c        := StrTran( StrTran( c, '[', '(' ), ']', ')' )
   if '(' $ c
      c     := '"' + StrTran( StrTran( c, '(', '",' ), ')', '' )
      o     := HB_ExecFromArray( "OSend", { o, &c } )
   else
      o     := OSend( o, c )
   endif

return o

This code works with multiple parameters like "oSheet:Cells( 99, 9 ):Value" also. I think it should work with embedded "-" also, though I could not test that case here. Please test and let me know.

Tested on latest Harbour and xHarbour
Regards



G. N. Rao.

Hyderabad, India
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Syntactical compiler error
Posted: Sun Jul 31, 2011 04:25 PM

Rao

It WORKS in all situations ... :Click() :item(0) and in the case of a hyphen "-" in the Dom string ..

Thank you !!
Rick Lipkin

Continue the discussion